How dhruvplaz-web/surakshitpath works
SurakshitPath is a Pune-focused nocturnal mobility and civic-safety app. A commuter signs in or enters as a guest, selects origin, destination and travel profile, compares safe/balanced/fast routes, then navigates with safety guidance and can share a route or request emergency help. Separate role-based experiences support municipal hazard management and volunteer response, alongside shelters, ride monitoring, weather risk and hazard reporting. Edges are limited to relationships shown in excerpts or README; unsampled integrations are included as capability nodes only where their subsystem is documented.
Main entry points: App.tsx Application shell · graphRouter.ts Route alternatives · CivicAdminDashboard.tsx Civic admin · AuthContext.tsx Session context
Components 32
App experience
- Application shell
src/App.tsx - Location search
src/components/Sidebar/LocationSearchBox.tsx - Map cockpit
src/components/Map/MapCockpit.tsx - Geocoding
src/services/geocodingService.ts
Safe navigation
- Route alternatives
src/engine/graphRouter.ts - Road geometry
src/services/roadCurvatureService.ts - Safety scoring
src/engine/safetyScorer.ts - Navigation models
src/engine/mlNavigationEngine.ts - Pune corridor graph
src/data/puneCorridorGraph.ts - Curved route data
src/data/puneCurvedRoutesData.ts - Route comparison
src/components/Sidebar/RouteComparisonCard.tsx - Safety explanation
src/components/Sidebar/TreeShapWaterfall.tsx - Navigation guidance
src/components/Navigation/NavigationCockpitHud.tsx
Safety network
- Safe havens
src/data/safeHavens.ts - Shelter matching
src/services/corridorShelterEngine.ts - Ride shield
src/services/rideShieldService.ts - Weather risk
src/components/Commuter/NocturnalWeatherCard.tsx - SOS response
src/components/Emergency/EmergencySosModal.tsx - Transit integration
src/services/liveTransitService.ts - Live closures
src/services/liveClosureService.ts - Live shelters
src/services/liveShelterService.ts
Civic response
- Civic admin
src/components/Admin/CivicAdminDashboard.tsx - Volunteer cockpit
src/components/Volunteer/VolunteerCockpit.tsx - Hazard reporting
src/components/Community/ReportHazardModal.tsx - AI risk analysis
src/services/aiRiskService.ts - Civic records
src/data/civicAdminData.ts - Python API
api/main.py
Identity and support
- Trusted guardians
src/components/Guardian/TrustedGuardianModal.tsx - Session context
src/context/AuthContext.tsx - Authentication
src/services/firebaseAuthService.ts - Firebase
src/config/firebase.ts
Other components
- Commuter
Connections 32
- Commuter → Application shell: uses
- Application shell → Session context: reads session
src/App.tsx - Session context → Authentication: authenticates
src/context/AuthContext.tsx - Authentication → Firebase: uses auth
src/services/firebaseAuthService.ts - Application shell → Location search: renders
src/App.tsx - Location search → Geocoding: searches
src/components/Sidebar/LocationSearchBox.tsx - Application shell → Road geometry: fetches route geometry
src/App.tsx - Road geometry → Navigation models: predicts ETA
src/services/roadCurvatureService.ts - Application shell → Route alternatives: calculates alternatives
src/App.tsx - Route alternatives → Safety scoring: scores edges
src/engine/graphRouter.ts - Route alternatives → Navigation models: predicts ETA
src/engine/graphRouter.ts - Route alternatives → Pune corridor graph: reads graph
src/engine/graphRouter.ts - Route alternatives → Curved route data: reads corridors
src/engine/graphRouter.ts - Application shell → Route comparison: presents routes
src/App.tsx - Route comparison → Safety explanation: explains safety
- Application shell → Map cockpit: renders map
src/App.tsx - Map cockpit → Live shelters: loads shelters
src/components/Map/MapCockpit.tsx - Commuter → Navigation guidance: follows guidance
- Application shell → Civic admin: renders admin
src/App.tsx - Application shell → Volunteer cockpit: supports responder role
src/App.tsx - Application shell → Hazard reporting: opens reporting
src/App.tsx - Hazard reporting → AI risk analysis: analyzes risk
src/components/Community/ReportHazardModal.tsx - Civic admin → Civic records: reads records
src/components/Admin/CivicAdminDashboard.tsx - Commuter → Safe havens: finds havens
- Shelter matching → Safe havens: matches nearby
- Commuter → Ride shield: uses ride shield
- Commuter → Weather risk: checks conditions
- Commuter → SOS response: requests SOS
- Trusted guardians → Session context: configures contacts
- Civic admin → Python API: may use API
- Route alternatives → Live closures: uses closures
- Route alternatives → Transit integration: uses transit