Skip to content

Project Structure

root/
├── config.py
|
├── app.py
├── blueprints/
│ ├── tenders_bp.py
│ ├── checkout_bp.py
│ ├── assistance_bp.py
│ ├── invite_bp.py
│ ├── proposal_generation_bp.py
│ ├── export_csv_bp.py
│ └── reports_bp.py
├── document_helper/
| └── format_word_document.py
├── downloaded_files/
├── email_helper/
│ ├── confirm_payment_template.py
│ ├── consultant_request_template.py
│ ├── free_plan_template.py
│ ├── invite_template.py
│ ├── welcome_email.py
│ ├── new_tender_template.py
│ └── send_email.py
├── firebase_functions/
│ ├── authentication.py
│ ├── file_upload_functions.py
│ ├── invoice_functions.py
│ ├── refferal_functions.py
│ └── send_email.py
├── generated_proposal/
├── models/
├── openai_functions/

Configuration File (config.py)

The script initializes a Flask web application, configures it to connect to a MongoDB database using environment variables, and sets up CORS to allow requests from any origin.

Entry point file (app.py)

This Python script is structured for a Flask application to manage various functionalities through different blueprints, which modularize the routing and event handling of a Flask application.

Blueprints Folder

The blueprints folder contains the various routes and event handling with the flask application

Document Helper

This folder contains files containing functions which are used to extract text from incoming documents and transform text from the ai generated proposal into a word document.

Downloaded Files Folder

Documents that are sent when the user uploads a contract or documents downloaded from the contracts in the mongodb database are temporarily stored here for text extraction. The folder is empty because we delete the documents after extracting the text to not exhaust disk space on the server.

Email Helper Folder

This folder mainly contains html email templates that are sent to the users after various events such as payment or sign up. It also contains a send_email file where we set up the sendgrid api.

Firebase Functions Folder

This folder various helper functions that are used to interact with the collections inside the firebase database.

Open Ai Helper Folder

This folder contains files that allow us to make requests to the openai api (for text summarization and ai proposal generation).

Repeating Functions Folder

This folder contains scheduled functions (e.g monthly, weekly, daily).

Request Config Folder

This folder contains the set up for interaction with FAC’s api for online payments

Models Folder

Contains the Tender class that we use to interact with the tenders mongodb collection