How kumarjesh/on-road-emergency-support-system works
ResQRoad is a driver-facing roadside emergency app paired with a dispatcher console. Drivers choose a roadside or medical service, share incident and vehicle details, and create a request; dispatchers review and assign it, while the driver can follow progress. The client also supports sensor-triggered crash alerts, location selection and tracking, emergency contacts, and WhatsApp sharing. The README documents mapping and communication capabilities whose implementation was not sampled; those links are shown only where documented. Backend detail is limited to the sampled routes and store.
Main entry points: App.jsx App Shell · EmergencyContext.jsx Emergency State · server.js API & Realtime Server · useCrashDetection.js Crash Detection
Components 21
Driver App
- App Shell
client/src/App.jsx - Emergency State
client/src/context/EmergencyContext.jsx - Service Requests
client/src/components/ServiceGrid.jsx - Location Picker
client/src/components/LocationPickerModal.jsx - Live Tracking
client/src/components/LiveTracking.jsx
Safety & Sharing
- Emergency Contacts
client/src/components/EmergencyContactsModal.jsx - WhatsApp SOS
client/src/components/WhatsAppWizardModal.jsx - Crash Detection
client/src/hooks/useCrashDetection.js - Crash Alert
client/src/components/CrashAlertModal.jsx - Crash Sensor UI
client/src/components/CrashSensorWidget.jsx - Safety Checklist
client/src/components/SafetyChecklistModal.jsx - Night Beacon
client/src/components/NightStrobeModal.jsx - Vehicle Profile
client/src/components/VehicleProfileModal.jsx
Dispatch Operations
- Dispatcher Console
client/src/components/DispatcherDashboard.jsx
Emergency Backend
- API & Realtime Server
server/server.js - Emergency Store
server/db.js - Emergency Records
server/data/emergencies.json
Other components
- Driver
- IP Geolocation
- Mapping Services
- WhatsApp & SMS
Connections 26
- Driver → App Shell: uses
README.md - App Shell → Emergency State: provides state
client/src/App.jsx - App Shell → Service Requests: renders
client/src/App.jsx - Service Requests → Emergency State: requests service
client/src/components/ServiceGrid.jsx - App Shell → Location Picker: opens
client/src/App.jsx - Location Picker → Emergency State: sets location
client/src/components/LocationPickerModal.jsx - Emergency State → IP Geolocation: requests fallback
client/src/context/EmergencyContext.jsx - Emergency State → Mapping Services: uses geocoding
README.md - App Shell → Live Tracking: renders
client/src/App.jsx - Emergency State → API & Realtime Server: sends requests
client/src/context/EmergencyContext.jsx - API & Realtime Server → Emergency Store: reads and updates
server/server.js - Emergency Store → Emergency Records: persists records
server/db.js - API & Realtime Server → Dispatcher Console: serves ticket data
server/server.js - Dispatcher Console → API & Realtime Server: manages tickets
README.md - Emergency State → Dispatcher Console: receives live updates
README.md - App Shell → Crash Sensor UI: renders
client/src/App.jsx - Crash Sensor UI → Crash Detection: uses telemetry
README.md - Crash Detection → Crash Alert: raises alert
README.md - Crash Detection → Emergency State: dispatches incident
README.md - App Shell → Emergency Contacts: opens
client/src/App.jsx - Emergency Contacts → Emergency State: manages contacts
client/src/components/EmergencyContactsModal.jsx - App Shell → WhatsApp SOS: opens
client/src/App.jsx - WhatsApp SOS → WhatsApp & SMS: prepares dispatch
README.md - App Shell → Safety Checklist: renders
client/src/App.jsx - App Shell → Night Beacon: renders
client/src/App.jsx - App Shell → Vehicle Profile: renders
client/src/App.jsx