Awesome-ERP Backend(Click Here)
deployed at: https://awesome-erp-backend.herokuapp.com/
Usecase | Resource |
---|---|
Backend | Flask |
Database | Firebase |
Lint | Zulint |
Deployment | Heroku |
║
╠══ aerp [The Main Project Directory]
║ ╠══ database [For all Database Utilities and Interactions]
║ ║ ╠══ models
║ ║ ║ ╠══ BaseModel.py [Prototype of a Model]
║ ║ ║ ╠══ Manager.py [Manager Level Functionalities]
║ ║ ║ ╚══ User.py [User Level Functionalities]
║ ║ ║
║ ║ ╠══ utils
║ ║ ║ ╠══ detailsExtraction.py [Functions to Filter Specific data from Piles of Useless Data]
║ ║ ║ ╚══ userDataValidity.py [Functions to Check Validity of Different Inputs to database]
║ ║ ║
║ ║ ╚══ __init__.py [Initialize the database]
║ ║
║ ╠══ modules [For Blueprints of Routes]
║ ║ ╠══ auth.py [Routes delivering Authentication Utilities]
║ ║ ╠══ employee.py [Routes delivering Employee Level Utilities]
║ ║ ╚══ manager.py [Routes delivering Manager Level Utilities]
║ ║
║ ╠══ utils [General Purpose Utils]
║ ║ ╠══ authorization.py [Functions Handling Auth Tokens]
║ ║ ╚══ responses.py [Predefined Response Types]
║ ║
║ ╚══ __init__.py [Initialize the App]
║
╠══ tools [The Utilities related to Deployment and Tests]
║ ╠══ custom_check.py [Defined Lint Rules]
║ ╠══ lint [The Main Lint Checker File]
║ ╠══ run-mypy [mypy rules file]
║ ╚══ set-env [Setup File for the Repository]
║
╠══ Config [The Configuration Files]
║ ╚══firebase_server.json [Optional can be passed with Environment Variables]
║
╠══ main.py [Starts Server]
╚══ requirements.txt
- sudo apt update && sudo apt upgrade -y
- Clone the repository
git clone https://github.com/awesome-erp/flask-be.git
- Install Dependencies
pip install -r requirements.txt
- Run Server from
app
inmain.py
Egpython main.py
- Add the Following Environment variables:
AERP_FIREBASE_CONFIG = "{ "type": "dummy", "project_id": "dummy", "private_key_id": "dummy", "private_key": "dummy", "client_email": "dummy", "client_id": "dummy", "auth_uri": "dummy", "token_uri": "dummy", "auth_provider_x509_cert_url": "dummy", "client_x509_cert_url": "dummy" }" ADMIN_EMAIL = "dummy@email.com"
- Fork the Repository
- Clone the Fork
git clone https://github.com/
Github-User-Name/flask-be.git
- Set upstream
git remote add upstream https://github.com/awesome-erp/flask-be.git
- Setup Environment
./tools/set-env
- Activate virtualenv
- Linux/OS X:
Source venv-awesome-erp/bin/activate
- Windows WSL:
Source venv-awesome-erp/Scripts/activate
- Linux/OS X:
- Run Server
python3 main.py
Good to Go:------------> - Make sure to run
./tools/lint
and get the tests passed before making commits - Contact for firebase_server.json at dganguly1120@gmail.com
For More Docs: