Skip to content

A custom-built ERP system designed for managing car shop operations, including inventory tracking, customer management, and billing. It features a RESTful API developed with Python and FastAPI.

Notifications You must be signed in to change notification settings

PeterImade/ERP-System-for-Car-Shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Car Shop ERP System

coverage

This REST API serves as an ERP system for a car shop.

Technologies Used

  • FastAPI: Web framework for building APIs
  • Uvicorn: ASGI server for FastAPI
  • SQLAlchemy: ORM for database management
  • Psycopg2: PostgreSQL adapter for Python
  • PyJWT: JSON Web Token implementation for authentication
  • Pydantic: Data validation and parsing
  • Starlette: Web framework for building APIs (FastAPI dependency)
  • pytest: Testing framework for Python
  • requests: HTTP library for making requests
  • coverage: Code coverage tool

Requirements

Ensure you have the following installed:


Setup Project

  1. Create a virtual environment:

    python3 -m venv env
  2. Activate the virtual environment:

    source env/bin/activate
  3. Install app dependencies:

    pip install -r requirements.txt

Running the Application

  1. Start the database (PostgreSQL:alpine3.14):

    docker-compose up
  2. Start the application:

    uvicorn app.main:app --reload

Note:

You can configure the database using an environment variable:

export DB_URL="postgresql://user-name:password@host-name/database-name"

Accessing the Application Locally

If required, add the following headers for authentication on routes:

  • token: my-jwt-token
  • x_token: fake-super-secret-token

Testing

  • Run tests:

    pytest
  • Run tests with coverage report:

    pytest --cov=app app/test/

Development

To update dependencies in requirements.txt:

  1. Remove the version constraint for dataclasses.
  2. Run:
    pip freeze > requirements.txt

Deploy on Heroku

Requirements

Install Heroku CLI

sudo snap install --classic heroku

Deployment

If automatic deploy is enabled for the master branch, simply commit to the master branch. Otherwise, deploy manually using the Heroku CLI as follows:

heroku login
heroku git:remote -a car-shop-fastapi
git add .
git commit -m "Deploy on Heroku"
git push origin master
git push heroku master

Source Documentation

About

A custom-built ERP system designed for managing car shop operations, including inventory tracking, customer management, and billing. It features a RESTful API developed with Python and FastAPI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published