How erick5940/sih2026 works
This is a regional logistics-intelligence command center for monitoring disruptions, vehicles, accessibility, and essential supplies, with separate field-reporting and driver/model views. The main workflow is the command dashboard: it combines live vehicle data and incident reports with GIS, impact, route-risk, alternate-routing, and logistics-priority views; priority actions can request rerouting. Field officers can submit GPS-tagged reports offline and synchronize them later. Edges follow visible imports, calls, or documented API/storage behavior; unsampled route and prediction integrations are shown without inferred callers.
Main entry points: app/page.tsx Command center · route.ts Incident API · field/page.tsx Field reporting · GISMap.tsx GIS map
Components 33
Command dashboard
- Command center
src/app/page.tsx - GIS map
src/components/GISMap.tsx - Impact analysis
src/components/ImpactPanel.tsx - Alert system
src/components/AlertSystem.tsx - Command navigation
src/components/CommandNav.tsx - Language switching
src/components/LanguageSwitcher.tsx - Translations
src/lib/i18n.ts
Routing and logistics
- Disruption predictor
src/components/RouteDisruptionPredictor.tsx - Alternate routes
src/components/SmartAlternateRouteEngine.tsx - Logistics priority
src/components/LogisticsPriorityEngine.tsx - Supply gaps
src/components/SupplyGapPanel.tsx - Supply hubs
src/lib/hubs.ts - Spatial analysis
src/lib/spatial.ts
Incident response
- Incident reporting
src/components/IncidentReporting.tsx - Emergency mode
src/components/EmergencyMode.tsx
Field and vehicle operations
- Field reporting
src/app/field/page.tsx - Field mini-map
src/components/FieldMiniMap.tsx - Offline report queue
src/lib/offlineDB.ts - Live GPS tracker
src/components/LiveGPSTracker.tsx - Vehicle tracking
src/components/VehicleTracking.tsx - Driver view
src/app/driver/page.tsx - Model view
src/app/model/page.tsx
API and persistence
- Live vehicle polling
src/lib/useLiveVehicles.ts - GPS ingest API
src/app/api/gps/ingest/route.ts - Incident API
src/app/api/incidents/route.ts - Reroute API
src/app/api/reroute/route.ts - Valhalla route API
src/app/api/route-valhalla/route.ts - OSRM route API
src/app/api/route-osrm/route.ts - Prediction API
src/app/api/predict/route.ts - Live weather API
src/app/api/weather/live/route.ts - Supabase client
src/lib/supabase.ts - Incident records
Other components
- Operations user
Connections 27
- Operations user → Command center: uses
- Command center → GIS map: renders
src/app/page.tsx - Command center → Disruption predictor: renders
src/app/page.tsx - Command center → Alternate routes: renders
src/app/page.tsx - Command center → Logistics priority: renders
src/app/page.tsx - Command center → Incident reporting: renders
src/app/page.tsx - Command center → Vehicle tracking: renders
src/app/page.tsx - Command center → Alert system: renders
src/app/page.tsx - Command center → Emergency mode: renders
src/app/page.tsx - Command center → Command navigation: renders
src/app/page.tsx - Command center → Language switching: renders
src/app/page.tsx - Command center → Impact analysis: renders
src/app/page.tsx - Command center → Supply gaps: renders
src/app/page.tsx - Command center → Live vehicle polling: polls via
src/app/page.tsx - Language switching → Translations: uses
src/components/LanguageSwitcher.tsx - GIS map → Supply hubs: reads
src/components/GISMap.tsx - Impact analysis → Spatial analysis: uses
src/components/ImpactPanel.tsx - Spatial analysis → Supply hubs: reads
src/lib/spatial.ts - Field reporting → Field mini-map: renders
src/app/field/page.tsx - Field reporting → Offline report queue: queues reports
src/app/field/page.tsx - Field reporting → Incident API: submits reports
- Offline report queue → Incident API: synchronizes
src/lib/offlineDB.ts - Live vehicle polling → GPS ingest API: polls
src/lib/useLiveVehicles.ts - Logistics priority → Reroute API: requests reroute
src/components/LogisticsPriorityEngine.tsx - Alternate routes → Valhalla route API: requests routes
src/components/SmartAlternateRouteEngine.tsx - Incident API → Supabase client: uses
src/app/api/incidents/route.ts - Incident API → Incident records: reads and writes
src/app/api/incidents/route.ts