Skip to content

3874/reportMaker

Repository files navigation

ReportMaker

ReportMaker: A Flask Application for File and Project Management

Overview

ReportMaker is a web application built using Flask that manages files and projects with CRUD capabilities. It allows users to upload, update, delete, and search for files and projects, while also integrating with OpenAI and Google for intelligent search functionalities. The application uses TinyDB as a lightweight database solution for persistent data storage.

Features

  • File Management: Upload, update, delete, and search files.
  • Project Management: Create, update, delete, and search projects.
  • Company Management: Add, update, delete, and retrieve company data.
  • Complex Search: Integrates with external APIs for advanced search capabilities.
  • Configuration Management: Load and update application settings from a JSON file.
  • Backup Functionality: Backup database data to an external service.
  • Google Search: Execute Google searches based on keywords extracted from text.

Requirements

To run the application, you need:

  • Python 3.x
  • Flask
  • TinyDB
  • Flask-CORS
  • Requests
  • Beautiful Soup
  • Google API client library

You can install the required packages using pip:

pip install Flask tinydb Flask-CORS requests beautifulsoup4 google-api-python-client

Getting Started

  1. Clone the repository:

    git clone <repository-url>
    cd ReportMaker
  2. Setup Configuration: Ensure you have a config.json file in the setting directory with the following structure:

    {
        "OPENAI_KEY": "YOUR_OPENAI_KEY",
        "serpAPI": "YOUR_SERP_API_KEY",
        "n8n_URL": "YOUR_N8N_URL",
        "port": 5000
    }
  3. Create Directories: The application will automatically create necessary directories for uploads, databases, and settings. Ensure the application has the required permissions to create these directories.

  4. Run the Application:

    python app.py
  5. Access the Application: Open your web browser and navigate to http://localhost:5000 (or the port specified in your config).

API Endpoints

Below is a list of key API endpoints provided by the application:

File Management

  • Upload File: POST /uploadFile
  • Update File: PUT /updateFile/<fileId>
  • Remove File: DELETE /removeFile/<fileId>
  • Find File: GET /findFile/<fileId>
  • Search Files: GET /searchFile
  • Get Files: GET /files
  • Download File: GET /downloadFile/<fileId>

Project Management

  • New Project: POST /newProject
  • Update Project: PUT /updateProject/<projectId>
  • Remove Project: DELETE /removeProject/<projectId>
  • Find Project: GET /findProject/<projectId>
  • Search Projects: GET /searchProject
  • Get Projects: GET /projects

Company Management

  • Add Company: POST /addCompany
  • Update Company: PUT /updateCompany/<companyId>
  • Delete Company: DELETE /deleteCompany/<companyId>
  • Get Companies: GET /companies

Settings and Prompts

  • Get Prompts: GET /getPrompts
  • Update Prompts: PUT /updatePrompts
  • Get Settings: GET /getSettings
  • Save Settings: POST /saveSettings

Backup and Search

  • Backup Data: POST /backupData
  • AI Search: POST /AISearch
  • Google Search: POST /googleSearch

Logging

The application uses Python's logging module to log important events and errors. Make sure to check the logs for any issues.

Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.

License

This project is licensed under the MIT License.


For more information, please refer to the code comments and documentation within the project.

About

Report Making site using AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published