This is a Django-based Inventory Management System built with Django Rest Framework (DRF). The project allows users to manage inventory items, track changes in inventory levels, and manage categories. Additionally, it provides JWT authentication and API views for accessing and interacting with inventory data.
- User Registration & Authentication
- Custom user model with profile picture.
- JWT-based authentication for secured endpoints.
- Inventory Management
- View and manage inventory items, categories, and associated details.
- Add/edit inventory items, including price and quantity.
- Upload images for inventory items.
- Change Logs
- Track changes in inventory, such as price and quantity updates.
- Automatically log changes with reasons and user details.
- Low Stock Alerts
- Set thresholds for items and get a view of items below a certain quantity.
- API Documentation
- Swagger and ReDoc for interactive API documentation.
- Python 3.9
- Django 5.x
- Virtual Environment (recommended)
- PostgreSQL (optional) or SQLite (default)
-
Clone the Repository:
git clone https://github.com/your-username/inventory-manager.git cd inventory-manager
-
Create and Activate a Virtual Environment:
python -m venv env source env/bin/activate # For Linux/Mac .\env\Scripts\activate # For Windows
-
Install Dependencies:
pip install -r requirements.txt
-
Apply Migrations:
python manage.py makemigrations python manage.py migrate
-
Create Superuser:
python manage.py createsuperuser
-
Run Development Server:
python manage.py runserver
- Admin Panel: Visit Admin Panel
- Swagger UI: Visit Swagger UI
- ReDoc: Visit ReDoc
Method | Endpoint | Description |
---|---|---|
POST | /api/token/ |
Obtain JWT Token |
POST | /api/token/refresh/ |
Refresh JWT Token |
POST | /register/ |
Register new user |
Method | Endpoint | Description |
---|---|---|
GET | /api/inventory/ |
Get all inventory items |
POST | /api/inventory/ |
Create a new inventory item |
GET | /api/inventory/<id>/ |
Retrieve a single inventory item |
PATCH | /api/inventory/<id>/ |
Update an inventory item |
DELETE | /api/inventory/<id>/ |
Delete an inventory item |
Method | Endpoint | Description |
---|---|---|
GET | /api/inventory-change-logs/ |
Get all inventory change logs |
GET | /api/inventory-change-logs/<id>/ |
Get change log by ID |
Method | Endpoint | Description |
---|---|---|
GET | /api/inventory/low-stock/ |
Get all items below their low stock threshold |
- Admin users can create categories and assign inventory items.
- Each item has a name, price, quantity, and associated category.
- Automatic change logs are maintained for every edit to inventory quantity or price.
- Admins can also add reasons for any change.
- Set low stock thresholds for items.
- View all items that have stock levels below the threshold.
- Custom user model with additional fields like profile picture.
- Categories to organize inventory items.
- Represents each inventory item, with fields for quantity, price, and image.
- Logs changes to inventory such as price or quantity adjustments.
- Backend: Django, Django Rest Framework
- Authentication: JWT Authentication (Simple JWT)
- API Documentation: Swagger UI, ReDoc
- Image Handling: Pillow, ImageKit
- Database: SQLite (default) / PostgreSQL (optional)
This project is licensed under the MIT License