๐ LogiPulse // Autonomous Supply Chain Crisis Orchestrator
Self-healing logistics networks powered by LangGraph, Google Gemini, OpenRouteService, and OpenWeatherMap.
Built for Tech Zephyr 4.0 at IIT Bhubaneswar by Team Arkz.
๐ Table of Contents
- ๐ธ Interactive System Tour & Screenshots
- ๐ Executive Summary
- ๐บ๏ธ Default Route & Regional Freight Corridors
- ๐ Dynamic Standby Paradigm & On-Demand Route Generation
- ๐ Dynamic Orthogonal Bypass Mathematics
- ๐๏ธ End-to-End System Architecture
- ๐งช Comprehensive Unit & Integration Test Suite (55 Tests)
- ๐ Quick Start Guide
- ๐ CI/CD Pipeline (GitHub Actions)
- ๐ Vercel Deployment Guide
- ๐ก API Reference
- ๐ฏ Hackathon Presentation Pitch Script
- ๐ Detailed Documentation Links
๐ธ Interactive System Tour & Screenshots
| Standby: Point A & Point B Initial Standby | Phase 1: High-Tech Telemetry & GPS Navigation |
|---|---|
![]() |
![]() |
| Only Point A (Origin) & Point B (Destination) pinned; path generated on click. | Primary arterial mapped with real OpenRouteService waypoints & live carrier TRK-8821. |
| Phase 2: Natural Voice Hazard Transmission | Phase 2: Live Roadblock & Autonomous Braking |
|---|---|
![]() |
![]() |
| Drivers report accidents, wood blockages, or floods via conversational speech. | Carrier halts automatically; Gemini dynamically classifies incident category & severity. |
Phase 3: Autonomous Green Bypass Reroute & Stakeholder Notification Email
LangGraph Strategist calculates the optimal green bypass and delivers urgent dispatch advisories with verified ETAs to client & warehouse inboxes.
๐ Executive Summary
Global supply chains lose billions of dollars annually due to static routing engines that fail when unpredicted real-world disruptions strike. When a multi-vehicle highway accident occurs, storm debris drops fallen logs across an arterial corridor, or a sudden flood halts transport, legacy ERP systems wait hours for human dispatchers to intervene.
LogiPulse replaces static dispatching with an autonomous agentic command center:
- Initial Standby & On-Demand Path Generation: When loaded or when new points/presets are picked, the map shows only Point A and Point B. The route is computed dynamically only when the operator triggers Phase 1: Calculate Route.
- Dynamic Speech-to-NLP Incident Extraction: Field drivers speak naturally into their browser or mobile microphone (e.g. โTerrible accident near Maduravoyal on Chennai Port Corridor, container overturned across both lanes!โ). Google Gemini classifies the exact category (
ACCIDENT,FALLEN_TREE_WOOD,WATERLOGGING_FLOOD,PROTEST_STRIKE,ROAD_BLOCKAGE) and extracts location and severity with zero human delay. - 100% Dynamic Orthogonal Detour Geometry: Rather than hardcoded pre-baked bypasses, LogiPulse derives orthogonal normal vectors $(-V_{\text{lon}}, V_{\text{lat}}) \times \text{ratio}$ around the dynamic incident point, querying OpenRouteService dynamically worldwide.
- LangGraph Strategist Reasoning: Evaluates crowdsourced hazard reports, real-time meteorological conditions (OpenWeatherMap), and actual highway topography (OpenRouteService).
- Cross-Sensor Telemetry Verification: Intelligently diagnoses localized infrastructure failures when flood reports conflict with 0.0mm radar precipitation.
- Automated Stakeholder Dispatch: The agent autonomously drafts and transmits formal emergency notifications to the warehouse manager and client with verified ETAs.
๐บ๏ธ Default Route & Regional Freight Corridors
The system defaults to high-volume coastal container freight and supports quick regional presets or full interactive coordinate placement anywhere on earth:
1. Default Freight Corridor (Tamil Nadu):
- Origin (Point A): Chennai Port Container Terminal (
[13.0838, 80.2980]) - Destination (Point B): Oragadam Industrial Corridor (
[12.8350, 79.9500]) - Primary Arterial: Chennai Port Express Arterial (via Poonamallee & Maduravoyal)
- Autonomous Bypass: Chennai Outer Ring Road (ORR Green Express Bypass) (+8 mins)
2. Odisha Regional Corridors (IIT Bhubaneswar):
- Bhubaneswar โ IIT BBS: Rasulgarh Central Depot โ Khandagiri โ IIT BBS South Gate (via Daya West Canal Bypass, +7 mins).
- Paradip Port โ IIT BBS: Paradip Deepwater Port โ Cuttack-Puri Radial โ IIT BBS Argul Campus.
3. Interactive Map Pin Placement:
- Click โOrigin (A)โ and click anywhere on the world map.
- Click โDestination (B)โ and click another location on the map.
- Click โPhase 1: Calculate Routeโ to generate an on-demand freight route anywhere worldwide!
๐ Dynamic Standby Paradigm & On-Demand Route Generation
To give logistics managers complete operational control:
- No Upfront Routes: Upon loading the application or selecting presets, no route paths or trucks appear.
- Clear Point A & Point B Markers: Only the green Point A pin (Origin) and blue Point B pin (Destination) render on the map.
- Standby Metrics: The telemetry card displays
--for distance and ETA, with an active badge indicatingAWAITING PHASE 1. - Phase 1 Execution: Clicking โPhase 1: Calculate Routeโ computes real highway topography via OpenRouteService, draws the blue corridor, dispatches carrier unit
TRK-8821, and activates telemetry.
๐ Dynamic Orthogonal Bypass Mathematics
When an incident strikes at coordinate $H$ along route vector $\vec{V} = (\Delta \text{lat}, \Delta \text{lon})$, LogiPulse derives the perpendicular normal vector: \(\vec{N} = \left( -\Delta \text{lon}, \; \Delta \text{lat} \right)\)
The bypass waypoint is placed dynamically at: \(P_{\text{bypass}} = H + \vec{N} \times \delta\)
This intermediate waypoint is queried via OpenRouteService for real highway road geometry, with geodesic Haversine Bezier fallback if external networks are offline.
๐๏ธ End-to-End System Architecture
flowchart TD
subgraph Field ["๐ Field & Telemetry Layer"]
Driver["๐ฑ Truck Driver Mobile / Voice Webhook"]
WeatherAPI["๐ฆ๏ธ OpenWeatherMap API (Live Temp/Rain)"]
ORS_API["๐บ๏ธ OpenRouteService API (400+ GPS Waypoints)"]
end
subgraph Backend ["โก FastAPI Backend (Port 8010)"]
Webhook["POST /api/report_hazard_voice"]
HazardDB[("๐ง In-Memory Hazard Registry")]
Orchestrator["POST /api/orchestrate"]
subgraph AgenticEngine ["๐ค LangGraph Agentic Brain"]
StrategistNode["Strategist Node (Gemini 2.5 Flash)"]
Tools["Tool Executor Node"]
T1["get_crowdsourced_traffic()"]
T2["get_weather_disruptions()"]
T3["get_map_routes()"]
T4["notify_stakeholders()"]
end
end
subgraph Frontend ["๐ฅ๏ธ Command Center UI (Port 5180)"]
ThreeCanvas["๐ React Three Fiber 3D Particle Constellation"]
LeafletMap["๐บ๏ธ Leaflet Map (60fps Truck Tracking)"]
TerminalFeed["๐ป Agent Activity Terminal & Email Inspector"]
AudioSFX["๐ Pitch-Optimized Web Audio API Synthesizer"]
end
Driver -->|Voice Speech / Text| Webhook
Webhook --> HazardDB
HazardDB --> T1
WeatherAPI --> T2
ORS_API --> T3
Orchestrator --> StrategistNode
StrategistNode <--> Tools
Tools --> T1 & T2 & T3 & T4
T4 -->|Auto-Email| Stakeholders["๐ง Warehouse & Client Inboxes"]
Orchestrator -->|Live Telemetry| Frontend
Frontend --> LeafletMap & TerminalFeed & ThreeCanvas & AudioSFX
๐งช Comprehensive Unit & Integration Test Suite
LogiPulse features 55 automated unit and integration tests passing with 100% success across the backend, LangGraph agent machine, and React frontend:
| Test Layer | Framework | Test Count | Pass Rate | Scope Covered |
|---|---|---|---|---|
| Backend REST APIs | pytest + httpx |
10 | 100% | Healthcheck, Weather API, Route Directions, Hazard Ingestion, Speech-to-NLP parsing |
| LangGraph Agent Engine | pytest + langgraph |
9 | 100% | State persistence, Multi-tier corridor escalation (Tier 1 โ 2 โ 3 โ 4), Cross-sensor flood conflict diagnosis |
| Logistics Tools | pytest |
7 | 100% | Live weather radar fallback, ORS waypoint queries, stakeholder email dispatching |
| Frontend UI Components | vitest + @testing-library/react |
8 | 100% | RouteStatsCard metrics, DisruptionBanner states, ControlPanel user interactions |
| Frontend API Client | vitest + axios |
8 | 100% | Resilient fallback simulators, weather fetchers, voice webhook error handling |
| Geometry & Data Utilities | vitest |
8 | 100% | Orthogonal bypass calculations, polyline coordinate interpolation, preset hubs |
| Audio Synthesizer | vitest |
5 | 100% | Web Audio API oscillator lifecycles, volume ramping, toggle controls |
| TOTAL | ย | 55 Tests | 100% Passed | Zero failures, full regression safety |
Running Backend Tests
# In project root:
.\venv\Scripts\pytest tests/ -v
Running Frontend Tests
# In frontend directory:
cd frontend
npm test
๐ Quick Start Guide
Prerequisites
- Python 3.10+ (Tested on Python 3.13)
- Node.js 18+ & npm
1. Clone & Configure .env
git clone https://github.com/Arkz-Deepak/agentic-supply-chain.git
cd agentic-supply-chain
Create a .env file in the project root:
GEMINI_API_KEY=your_google_gemini_api_key
MAP_API_KEY=your_openrouteservice_api_key
WEATHER_API_KEY=your_openweathermap_api_key
2. Launch the FastAPI Backend (Port 8010)
# In root directory:
.\venv\Scripts\python.exe -m uvicorn server:app --app-dir src --host 0.0.0.0 --port 8010 --reload
Backend runs at: http://localhost:8010
Interactive Swagger API documentation: http://localhost:8010/docs
3. Launch the Vite Frontend (Port 5180)
# In frontend directory:
cd frontend
npm install
npm run dev
Command Center runs at: http://localhost:5180
๐ CI/CD Pipeline (GitHub Actions)
Every pull request and push to main or phase-1 is automatically validated through our GitHub Actions workflow (.github/workflows/ci.yml):
flowchart LR
Push["Git Push / PR"] --> CI["GitHub Actions CI/CD"]
CI --> Job1["๐ Backend CI (Python 3.12)
โข pip install -r requirements.txt
โข pytest tests/ -v (26 tests)"]
CI --> Job2["โ๏ธ Frontend CI (Node 20)
โข npm install --legacy-peer-deps
โข npm test (29 tests)
โข npm run build"]
Job1 --> Merge["โ
Green Build Pass"]
Job2 --> Merge
๐ Vercel Deployment Guide
LogiPulse is 100% optimized for Vercel deployment:
Monorepo Deployment on Vercel
The repository includes root vercel.json and an ASGI serverless handler in api/index.py.
- Import your GitHub repository into Vercel Dashboard.
- Set the Framework Preset to
Vite. - In Environment Variables, configure:
GEMINI_API_KEY: Your Google Gemini API KeyWEATHER_API_KEY: Your OpenWeatherMap KeyMAP_API_KEY: Your OpenRouteService Key
- Deploy! Vercel compiles static assets to
frontend/distand routes/api/*to the serverless ASGI function.
๐ก API Reference
For detailed request/response schemas and curl examples, see docs/API.md.
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET |
Healthcheck and active system capabilities |
/api/weather |
GET |
Live meteorological telemetry from OpenWeatherMap |
/api/routes/directions |
POST |
Highway driving waypoints from OpenRouteService |
/api/report_hazard |
POST |
Structured IoT or manual incident reporting |
/api/report_hazard_voice |
POST |
Natural language driver speech-to-NLP (Gemini Flash) |
/api/orchestrate |
POST |
Full LangGraph agent multi-sensor workflow |
/api/hazards |
DELETE |
Clears in-memory active hazard reports |
๐ฏ Hackathon Presentation Pitch Script
For the comprehensive demonstration script and anticipated judge defenses, see docs/PITCH_DEMO_GUIDE.md.
| Stage | Action on Screen | Audio / Visual Result | What to Say to the Judges |
|---|---|---|---|
| 1. Standby Intro | Open http://localhost:5180 |
Map frames Point A & Point B with floating standby callout. Zero premature paths. | โNotice the clean standby state: only Origin Point A and Destination Point B are pinned. The system avoids drawing assumptions until the operator initiates the mission.โ |
| 2. Phase 1 Dispatch | Click โPhase 1: Calculate Routeโ | Mechanical click sounds. Real OpenRouteService polyline illuminates. Carrier TRK-8821 begins driving. Telemetry metrics activate. | โIn Phase 1, LogiPulse establishes the optimal commercial freight corridor between Chennai Port Container Terminal and Oragadam Industrial Corridor.โ |
| 3. Phase 2 Crisis | Click โPhase 2: Speak Driver Report ๐๏ธโ | Dispatch alert tone sounds. Gemini dynamically classifies crisis. Red pulsing hazard appears. The truck physically brakes and halts. | โDisaster strikes! The driver reports an incident in conversational speech. Gemini dynamically identifies the category (accident, wood blockage, or flood). The truck halts instantly.โ |
| 4. Agent Action | Click โAUTONOMOUS AGENT REROUTEโ | Terminal stream logs Gemini evaluating crowdsourced telemetry, calculating orthogonal bypass, and dispatching stakeholder notices. | โInstead of stalling for hours, our LangGraph agent evaluates live radar, computes the orthogonal green bypass, and drafts emergency stakeholder emails.โ |
| 5. Resolution | Automatic transition | Harmonic chime plays. Emerald bypass corridor illuminates. The truck pivots onto the green bypass and drives safely to destination. | โThe delivery is saved with only an +8 minute delta. The Email tab proves the formal dispatch notice was autonomously delivered to the warehouse manager.โ |
๐ Detailed Documentation Links
- ๐๏ธ Technical Architecture & Algorithms: Deep dive into LangGraph state machine, dynamic orthogonal bypass math, multi-corridor hierarchy, and cross-sensor flood verification.
- ๐ก REST API Reference & Schemas: Complete request/response schemas, JSON payloads, and cURL examples.
- ๐ฏ Hackathon Pitch & Demo Guide: Step-by-step presentation script, judge Q&A, and technical defenses.
๐ก๏ธ License
This project is open-source under the MIT License. Built with pride by Team Arkz for Tech Zephyr 4.0 at IIT Bhubaneswar.


