Stockway is a modular monolithic backend platform designed to modernize rural supply chains. It connects Shopkeepers, Warehouses, and Delivery Riders through a unified, geospatially aware system. The platform facilitates order management, real-time inventory tracking, intelligent rider assignment, and automated payouts, solving the logistical challenges of last-mile delivery in underserved markets.
- Role-Based Access Control: Distinct inter-operating roles for Shopkeepers, Warehouse Managers, Riders, and Super Admins.
- Geospatial Intelligence: Location-based warehousing and rider assignment using PostGIS.
- Order Lifecycle Management: End-to-end tracking from order placement to final delivery and payment settlement.
- Real-Time Inventory: Dynamic stock management across multiple warehouse locations.
- Automated Payouts: Distance-based fee calculation and rider earning management.
- Secure Authentication: OTP-based entry with strict permission enforcement.
Stockway is built for reliability and scalability using a proven tech stack:
- Backend: Python, Django, Django REST Framework (DRF)
- Frontend: React, TypeScript, Material UI
- Database: PostgreSQL with PostGIS extension (via Supabase)
- Authentication: Supabase Auth (OTP/Password) + JWT
- Async Processing: Redis and Celery for background tasks (analytics, notifications)
- Shopkeeper: The primary customer; browses local inventories, places orders, and tracks incoming deliveries.
- Warehouse Manager: The supply node; oversees stock levels, manages incoming orders, and monitors rider activity.
- Rider: The logistics agent; receives proximity-based delivery tasks and earns based on successful fulfillments.
- Super Admin: The platform overseer; manages all users, warehouses, and financial flows.
Comprehensive API documentation, including endpoint definitions and data models, is available at:
(Note: Ensure the local development server is running to access docs via the web interface at /docs if integrated, or view the static file directly.)
To run the platform locally:
-
Backend:
- Clone the repo and navigate to
backend/. - Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt. - Configure
.env(database, auth keys). - Run migrations:
python manage.py migrate. - Start server:
python manage.py runserver.
- Clone the repo and navigate to
-
Frontend:
- Navigate to
frontend/. - Install dependencies:
npm install. - Start dev server:
npm run dev.
- Navigate to
Current Status: MVP (Minimum Viable Product) Scope: The current release focuses on core API functionality, basic frontend flows for all roles, and essential logistics logic. Advanced features like predictive analytics, fleet routing optimization, and offline-first mobile capabilities are currently out of scope.
Owner: Granth Agarwal License: MIT License. See LICENSE for details.
Before deploying to a production environment, review and remove the following artifacts:
- Scripts:
test_order_api.sh,create_test_order.py,load_test.js,verify_auth_migration.sh,apply_supabase_optimization.sh - Docs:
flow.md,plans.md,GEMINI.md(Internal guides),WARP.md - Config: Ensure
.envcontains production-grade secrets, not example values. - Data: Flush any test data generated by
create_test_order.pyfrom the primary database.