How rishitsura/optideliver-ai-powered-delivery-optimization-system works
Project Type and Purpose
• This is a full-stack, multi-component delivery management system with three distinct front-end applications (Sender Interface, Postman App, Route Optimization Dashboard), a back-end service to handle orders and user data, and auxiliary data-science assets (Dataset.csv, prediction.ipynb).
Top-Level Components (from file tree & README)
A. Sender Interface
• A React + Vite + TypeScript web app (src/, public/, tailwind.config.js, etc.)
• Includes an embedded Node.js server under src/server (Order/User models, Twilio service, server.ts)
B. Postman App
• A standalone React + Leaflet front-end for delivery personnel (project/src/…, .env, .bolt, etc.)
• No dedicated back-end in this folder—presumably uses the same order API
C. Route Optimization Dashboard
• React + Vite app with custom route-optimization utilities (src/utils/route.ts, prediction.ipynb for ML experiments)
D. Data Assets & Pipelines
• Dataset.csv (historical data)
• prediction.ipynb (Jupyter notebook for route-optimization experiments)
E. Shared Resources
• Central Database (e.g., PostgreSQL or MongoDB)
• External services: Twilio (SMS), Map tile & geocoding APIs
Relationships and Data Flows
• Sender UI → HTTP REST API → Back-end server → Database (orders, users)
• Back-end server → Twilio API (to send status updates)
• Delivery Agent UI (Postman App) → HTTP REST API → Back-end server → Database (read/write order status)
• Route Dashboard → either
• pulls data via HTTP REST API → Back-end server → Database
• or loads precomputed routes from a micro-service powered by the data-science pipeline
• Data-Science Notebook & scripts read Dataset.csv → train/validate optimization algorithm → export utilities (e.g., src/utils/route.ts) or populate a route-service
Architectural Patterns & Design Principles
• Separation of Concerns: Three distinct front-ends, one common back-end API
• Component-based UI (React components / hooks for map, forms, lists)
• MVC / Layered pattern on the server:
• Models: src/server/models
• Services: Twilio, route-calc
• Controllers / server.ts routes
• Utility libraries for shared logic (distance, metrics, route computations)
• Sender Interface
• Postman App
• Route Optimization Dashboard
• Twilio SMS Service
• Tile / Geocoding API
6. Connect:
• Server → Database (“READ/WRITE orders & users”)
• Server → Twilio (“SMS notifications via Twilio SDK”)
• Data-Science → Server or file store (“Push route-optimization utilities/models”)
• Route Dashboard → Server or Route Service (“GET optimized routes”)