This project is an Inventory Management System built using Django REST framework and MongoEngine. It allows you to manage suppliers, products, stock movements, and sale orders.
- Manage Suppliers
- Manage Products
- Track Stock Movements (In/Out)
- Create and Manage Sale Orders
- Check Current Stock for Each Product
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install the required packages (make sure virtual venv is activated):
pip install -r requirements.txt
-
Set up MongoDB:
Ensure MongoDB is installed and running on your machine. Update the MongoDB connection settings in your Django settings file if necessary.
host='your-mongoDB-host' -
Run the development server:
python manage.py runserver
GET api/suppliers/- List all suppliersPOST api/suppliers/- Create a new supplierGET api/suppliers/{id}/- Retrieve a supplierPATCH api/suppliers/{id}/- Update a supplierDELETE api/suppliers/{id}/- Delete a supplier
GET api/products/- List all productsPOST api/products/- Create a new productGET api/products/{id}/- Retrieve a productPATCH api/products/{id}/- Update a productDELETE api/products/{id}/- Delete a product
GET api/stockmovements/- List all stock movementsPOST api/stockmovements/- Create a new stock movementGET api/stockmovements/{id}/- Retrieve a stock movementPATCH api/stockmovements/{id}/- Update a stock movementDELETE api/stockmovements/{id}/- Delete a stock movement
GET api/saleorders/- List all sale ordersPOST api/saleorders/- Create a new sale orderGET api/saleorders/{id}/- Retrieve a sale orderPATCH api/saleorders/{id}/- Update a sale orderDELETE api/saleorders/{id}/- Delete a sale order
GET /product-stock/- Get current stock for each product
name- Name of the supplieremail- Email of the supplierphone- Phone number of the supplieraddress- Address of the supplier
name- Name of the productdescription- Description of the productcategory- Category of the productprice- Price of the productstock_quantity- Stock quantity of the productsupplier- Reference to the supplier
product- Reference to the productquantity- Quantity of the stock movementmovement_type- Type of the movement (In/Out)movement_date- Date of the movementnotes- Additional notes
product- Reference to the productquantity- Quantity of the sale ordertotal_price- Total price of the sale ordersale_date- Date of the salestatus- Status of the sale order (Pending/Completed/Cancelled)