Skip to content

awesome-erp/flask-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome-ERP Backend(Click Here)

Infrastructure

deployed at: https://awesome-erp-backend.herokuapp.com/

Usecase Resource
Backend Flask
Database Firebase
Lint Zulint
Deployment Heroku

Project Structure

║
╠══ 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

Deployment

  • 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 in main.py Eg python 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"
    

Development

  • 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
  • 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:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages