This is a FastAPI-based Retail Management System designed to handle operations for retail shops, including managing Products, Inventory, Customers, and Orders. The application integrates a MySQL database and features a Bootstrap-styled frontend for ease of use.
- Products Management: Add, update, delete, and view products.
- Inventory Tracking: Monitor stock levels and track availability.
- Customer Records: Maintain customer details, including their locations.
- Order Management: Record and manage customer orders with real-time calculations.
- Database Integration: Uses MySQL for robust and scalable data storage.
- Frontend Design: Styled with Bootstrap for a clean and responsive UI.
- Python 3.9+ must be installed.
- MySQL Server must be installed and running.
- A virtual environment is recommended.
-
Clone the Repository:
git clone https://github.com/kjoann/RMS_fastapi.git cd RMS_fastapi -
Set Up a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up the MySQL Database:
- Create a new database in MySQL:
CREATE DATABASE retail_management;
- Update the
.venvfile with your database credentials:DATABASE_URL=mysql+pymysql://username:password@localhost/retail_management
- Create a new database in MySQL:
-
Run the Application:
uvicorn app.main:app --reload
-
Access the App: Open your browser and go to: http://127.0.0.1:8000
RMS_fastapi/
│
├── main.py # Entry point for FastAPI app
├── apps/ # Contains individual apps (Products, Inventory, etc.)
│ ├── products/
│ ├── inventory/
│ ├── customers/
│ └── orders/
├── templates/ # HTML templates for frontend
├── static/ # Static files (CSS, JS, images)
├── .venv # Environment variables file
├── requirements.txt # Dependencies
└── README.md # Project documentation
- Authentication: Add user roles (e.g., admin, staff) with login/logout functionality.
- Stock Alerts: Notify users when inventory is low.
- Reports: Generate detailed sales and inventory reports.
- Payment Integration: Link orders with payment gateways.
This project is licensed under the MIT License. Feel free to use and modify as needed.
Created by Joanna