How jagadesh7575/road-risk-ai works
RoadRisk AI combines citizen risk-aware navigation with emergency-response operations and a supporting live-data backend. Users enter through portal-based interfaces: the application presents maps and navigation or dispatch controls, while server routes and ingestion services expose operational data. Other product areas include authority and fleet portals, analytics, simulation, source health, alerts, and offline regional maps and routing. The supplied excerpts show selected wiring; unsampled client integrations and backend routes are not inferred.
Main entry points: App.tsx Portal application · ingestion/index.cjs Provider ingestion · server/index.cjs HTTP API server · repositories/index.cjs Persistence repositories
Components 29
Application and portals
- Portal application
src/App.tsx - Shared app state
src/context/AppContext.tsx - Global header
src/components/layout/Header.tsx
Navigation and safety
- Map experience
src/components/map/MapContainer.tsx - Citizen navigation
src/components/navigation/CitizenNavigationControl.tsx - Travel modes
src/services/modeService.ts - Offline map manager
src/components/navigation/OfflineMapManagerModal.tsx - Regional map service
src/services/offlineMapService.ts - Offline route engine
src/services/offlineRoutingEngine.ts - Offline data store
src/services/offlineStorageService.ts - Traffic service
src/services/trafficService.ts - Alert pipeline
src/services/alertEngine.ts - Voice alerts
src/services/voiceAlertService.ts - Client event bus
src/services/eventBus.ts
Operations and insights
- Emergency routing
src/components/operator/EmergencyRouteControl.tsx - Authority portal
src/components/authority/AuthorityPortal.tsx - Fleet portal
src/components/fleet/FleetPortal.tsx - Risk analytics
src/components/analytics/AnalyticsView.tsx - Event simulator
src/components/simulation/EventSimulatorView.tsx - Data source health
src/components/settings/DataSourcesView.tsx
Data backend
- HTTP API server
server/index.cjs - Provider ingestion
server/ingestion/index.cjs - Data normalization
server/normalization/index.cjs - Persistence repositories
server/repositories/index.cjs - SQLite database
server/database.cjs - Ingestion workers
server/workers/index.cjs - Server event bus
server/eventBus/index.cjs
Other components
- RoadRisk user
- External data providers
Connections 27
- RoadRisk user → Portal application: uses
src/App.tsx - Portal application → Shared app state: provides state
src/App.tsx - Portal application → Global header: renders
src/App.tsx - Portal application → Map experience: renders
src/App.tsx - Portal application → Citizen navigation: renders
src/App.tsx - Portal application → Emergency routing: renders
src/App.tsx - Portal application → Authority portal: routes to
src/App.tsx - Portal application → Fleet portal: routes to
src/App.tsx - Portal application → Risk analytics: routes to
src/App.tsx - Portal application → Event simulator: routes to
src/App.tsx - Portal application → Data source health: routes to
src/App.tsx - Offline map manager → Regional map service: manages
src/components/navigation/OfflineMapManagerModal.tsx - Offline map manager → Offline data store: reads status
src/components/navigation/OfflineMapManagerModal.tsx - Offline route engine → Offline data store: loads graph
src/services/offlineRoutingEngine.ts - Offline route engine → External data providers: uses geometry
src/services/offlineRoutingEngine.ts - Alert pipeline → Voice alerts: dispatches
src/services/alertEngine.ts - Alert pipeline → Client event bus: publishes events
src/services/alertEngine.ts - HTTP API server → SQLite database: queries
server/index.cjs - HTTP API server → Provider ingestion: uses
server/index.cjs - HTTP API server → Persistence repositories: uses
server/index.cjs - HTTP API server → Server event bus: uses
server/index.cjs - Provider ingestion → Data normalization: normalizes with
server/ingestion/index.cjs - Provider ingestion → Persistence repositories: persists through
server/ingestion/index.cjs - Provider ingestion → Server event bus: publishes to
server/ingestion/index.cjs - Provider ingestion → External data providers: fetches from
server/ingestion/index.cjs - Persistence repositories → SQLite database: queries
server/repositories/index.cjs - Ingestion workers → Provider ingestion: runs
server/workers/index.cjs