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.
- 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.
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
-
Clone the repository:
git clone <repository-url> cd ReportMaker
-
Setup Configuration: Ensure you have a
config.json
file in thesetting
directory with the following structure:{ "OPENAI_KEY": "YOUR_OPENAI_KEY", "serpAPI": "YOUR_SERP_API_KEY", "n8n_URL": "YOUR_N8N_URL", "port": 5000 }
-
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.
-
Run the Application:
python app.py
-
Access the Application: Open your web browser and navigate to
http://localhost:5000
(or the port specified in your config).
Below is a list of key API endpoints provided by the application:
- 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>
- 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
- Add Company:
POST /addCompany
- Update Company:
PUT /updateCompany/<companyId>
- Delete Company:
DELETE /deleteCompany/<companyId>
- Get Companies:
GET /companies
- Get Prompts:
GET /getPrompts
- Update Prompts:
PUT /updatePrompts
- Get Settings:
GET /getSettings
- Save Settings:
POST /saveSettings
- Backup Data:
POST /backupData
- AI Search:
POST /AISearch
- Google Search:
POST /googleSearch
The application uses Python's logging module to log important events and errors. Make sure to check the logs for any issues.
Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.
This project is licensed under the MIT License.
For more information, please refer to the code comments and documentation within the project.