Theme: Supply Chain Management
Phase 1: Smart Substitution Engine + Product Catalog
Primary aim: functional backend + basic UI for:
- Product Inventory management per store
- Allow Placing Order
- Suggests alternatives if out of stock
- Prepares data for delivery optimization (Phase 2)
- Sets foundation for demand tracking (Phase 3): High availability zones
Phase 1 Steps:
- Backend Setup with schema creation (products, stores, orders)
- Data Seeding: DummyJSON API tp fetch 30 products
- Assign random: quantity, storeID, tags, demandScore(useful for phase 3)
- Generated 5 fake Walmart stores in India
- Insert in MongoDB
- Backend APIs:
- GET /products - List all products
- GET /products/:id - product details
- GET /suggest/:id - substitution engine
- POST /order/place - place order if in stock
- Frontend Setup
- Basic React app using vite bundler
- Backend Frontend Integration
-
Store:
name(String)
city(String)
address(String)
pincode(String)
latitude(Number)
longitude(Number)
-
Product:
title(String)
category(String)
brand(String)
price(Number)
image(String)
description(String)
storeID
quantity
tags
demandScore
sold
Phase 2: Delivery Routing
Primary aim: functional backend + basic delivery app for agents:
- Map view: Show: start(store location), end(Costumer location), Path, duration and distance
- Shortest Path
- Future: dynamic routing(due to traffic etc.)
- Single delivery
- Multiple deliveries on go and new order placed (if possible)
Using: OpenStreetMap + Leaflet.js (Free & Open Source), Browser Geolocation API (for live location tracking), Web Speech API (speechSynthesis)
Phase 2 Steps:
- Basic React (Vite) frontend
- Routing using OpenRouteService
- Link Real Order Data to Route
- Calculate and Display ETA(Expected Time of Arrival)
- Display Turn-by-Turn Instructions
API Endpoint:
- GET /order/:orderId
- To get all deliveries: GET /
- POST /place
- Delivery Agent Live location
- Delivery Instruction text to speech
- Mark as Delivered button, UI updation and status change
API Endpoint:
- Patch /order/:id/delivered
Dynamic Routing(On Hold)
New Route: routes/analytics.js
- aggregate products by store's city and sum their demandScore
- Proper dashboard with heatmap, top products sold bar chart and a pie of major locations order placed