Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Using: MongoDB Atlas

Installation: express, mongoose, cors, dotenv, axios

Api endpoint testing: Thunder Client (Extension in VS Code)

Phase 1 Steps:

  1. Backend Setup with schema creation (products, stores, orders)
  2. 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
  3. 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
  4. Frontend Setup
    • Basic React app using vite bundler
  5. Backend Frontend Integration

Schema:

  1. Store:

    name(String)

    city(String)

    address(String)

    pincode(String)

    latitude(Number)

    longitude(Number)

  2. Product:

    Generated by DummyJSON API:

    title(String)

    category(String)

    brand(String)

    price(Number)

    image(String)

    description(String)

    Added Custom Randomly:

    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.)
    1. Single delivery
    2. 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)

OpenRouteService or OSRM for route directions

Add new api endpoints in backend for deliveries and routes

Installation: react-router-dom, leaflet react-leaflet

Api endpoint testing: Thunder Client

Phase 2 Steps:

  1. Basic React (Vite) frontend
  2. 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
  1. Delivery Agent Live location
  2. Delivery Instruction text to speech
  3. Mark as Delivered button, UI updation and status change API Endpoint:
    • Patch /order/:id/delivered

Dynamic Routing(On Hold)

Phase 3: HeatMap (“AutoZone Restocker”)

Aim -> city‑level demand vs stock heat‑map

Using: For visualisation: react-leaflet, leaflet.heat, react-chartjs-2, chart.js

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

About

E Commerce Supply Chain Optimization Platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages