The Rice Supply Chain Management System (RSCMS) is a comprehensive full-stack enterprise platform built to streamline, trace, and manage transactions throughout the agricultural life cycle of rice. By digitizing workflows from farm to consumer, the platform eliminates structural inefficiencies, ensures fair market pricing, and establishes transparent communication channels between agricultural stakeholders.
The platform relies on a multi-role user architecture where each role acts as a functional node within the supply chain loop:
- Farmers: List paddy yields, check real-time localized crop pricing, and sell raw crops directly to mills or registered dealers without predatory intermediaries.
- Mill Managers: Monitor raw paddy acquisition, manage processing/milling inventories, log production metrics, and track distribution-ready rice batches.
- Dealers & Distributors: Source processed rice from mills, handle wholesale procurement logistics, and manage regional supply allocations.
- Administrators: Oversee platform security, verify user credentials, moderate market transaction listings, and view aggregate supply chain analytics.
- Backend Engine: Django (Python) — Handles core business logic, ORM mapping, and database migrations.
- API Layer: Django REST Framework (DRF) — Exposes a modular, stateless RESTful API for decoupling front-end clients or potential mobile extensions.
- Database: SQLite (Development) / PostgreSQL-compatible structure — Utilizes relational models optimized with structured foreign keys to map sequential supply chain actions.
- Authentication: Token-based security mapping custom permission groups to distinct user roles.
- Multi-Tenant User Management: Separate data views and granular action permissions depending on whether the authenticated account is a Farmer, Mill Manager, or Dealer.
- Inventory Tracking: Real-time logging of grain quantities, changing states (unprocessed paddy to refined rice varieties), and weight tracking.
- Transaction Logging: End-to-end transparent ledger records linking crop sales, purchase orders, and transport fulfillment steps.
- Agricultural Market Insights: Dynamic listing portals where current market rates for different rice varieties can be updated and queried.
├── rscms/ # Root project configuration directory
│ ├── __init__.py
│ ├── settings.py # Main app configurations and permission setups
│ ├── urls.py # Global URL routing definitions
│ └── wsgi.py
├── apps/ # Decoupled feature modules (Typical DRF setup)
│ ├── authentication/ # Custom User models, registration, and user roles
│ ├── supply_chain/ # Models/Views for Paddy, Rice Batches, and Orders
│ └── inventory/ # Stock levels for Mills and Dealers
├── manage.py # Django administrative utility script
├── requirements.txt # Project dependencies
└── README.md # Platform documentation
Ensure you have Python 3.10+ and pip installed locally.
git clone https://github.com/AbdullahRFA/Rice_Supply_Chain_Management_System.git
cd Rice_Supply_Chain_Management_System
# Create environment
python -m venv venv
# Activate on Windows:
venv\Scripts\activate
# Activate on macOS/Linux:
source venv/bin/activate
pip install -r requirements.txt
Apply the migrations to build your local schema and construct the core tables for user roles, profiles, and supply chain tracking.
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
The application API and admin dashboards will be accessible locally at [http://127.0.0.1:8000/](http://127.0.0.1:8000/).
All primary requests interact with the endpoints using explicit payload verification. Here is a baseline summary of the underlying API routes:
| Method | Endpoint | Access Level | Description |
|---|---|---|---|
| POST | /api/auth/register/ |
Public | Registers a new user with an explicitly specified role |
| POST | /api/auth/login/ |
Public | Generates access token signatures upon validation |
| GET/POST | /api/paddy-listings/ |
Farmers / Mills | Handles raw crop supply postings and acquisitions |
| GET/POST | /api/inventory/mill/ |
Mill Managers | Tracks raw processing inputs and converted rice metrics |
| POST | /api/orders/create/ |
Dealers | Places a wholesale processed cargo acquisition request |
This project is licensed under the MIT License. Check out the LICENSE file in the root for details.