How gchaitanyasai21-design/pravaah-360 works
Pravaah-360 is an emergency-response and safety platform with ambulance dispatch, traffic-junction control, live mapping, and role-specific services such as child, elder, women’s-safety, and parcel tracking. The principal emergency workflow is an SOS request that creates an emergency, looks up an available ambulance, assigns it, updates its status, and creates an alert. The graph also captures the app’s role-based interfaces and its traffic and persistence layers. Some routes and views were not sampled; their inclusion reflects the source tree, while uncertain connections are omitted.
Main entry points: AppContext.tsx Application State · LiveMap.tsx Live Map · access.ts Database Access · AuthContext.tsx Authentication State
Components 27
User Experiences
- Login
src/app/login/page.tsx - Admin Console
src/app/admin/page.tsx - Dispatch View
src/views/DispatchView.tsx - Driver View
src/views/DriverView.tsx - Patient View
src/views/PatientView.tsx - Child Safety
src/app/child/page.tsx - Parental View
src/views/ParentalView.tsx - Elder Care
src/app/eldercare/page.tsx - Women’s Safety
src/app/womensafety/page.tsx - Parcel Tracking
src/views/ParcelView.tsx - Traffic View
src/views/TrafficView.tsx
Emergency Response
- Emergency API
src/app/api/emergencies/route.ts - Ambulance API
src/app/api/ambulances/route.ts - Hospital API
src/app/api/hospitals/route.ts
Traffic Operations
- Junction API
src/app/api/junctions/route.ts - Preemption Logs
src/app/api/logs/preemptions/route.ts - Metrics API
src/app/api/metrics/route.ts
Shared Platform
- Application State
src/store/AppContext.tsx - Authentication State
src/store/AuthContext.tsx - Live Map
src/components/LiveMap.tsx - Map Renderer
src/components/LiveMapInner.tsx - Location Utilities
src/lib/realtime.ts - Geospatial Utilities
src/utils/geo.ts - Database Access
src/db/access.ts - Application Database
src/db/index.ts - Data Schema
src/db/schema.ts
Other components
- Platform User
Connections 34
- Platform User → Login: uses
- Login → Authentication State: uses
src/app/login/page.tsx - Admin Console → Application State: uses
src/app/admin/page.tsx - Admin Console → Authentication State: uses
src/app/admin/page.tsx - Admin Console → Live Map: renders
src/app/admin/page.tsx - Child Safety → Application State: uses
src/app/child/page.tsx - Child Safety → Authentication State: uses
src/app/child/page.tsx - Child Safety → Live Map: renders
src/app/child/page.tsx - Child Safety → Location Utilities: uses
src/app/child/page.tsx - Parental View → Application State: uses
src/views/ParentalView.tsx - Parental View → Authentication State: uses
src/views/ParentalView.tsx - Parental View → Live Map: renders
src/views/ParentalView.tsx - Parental View → Location Utilities: uses
- Elder Care → Application State: uses
src/app/eldercare/page.tsx - Elder Care → Authentication State: uses
src/app/eldercare/page.tsx - Women’s Safety → Live Map: renders
src/app/womensafety/page.tsx - Parcel Tracking → Application State: uses
src/views/ParcelView.tsx - Parcel Tracking → Authentication State: uses
src/views/ParcelView.tsx - Parcel Tracking → Live Map: renders
src/views/ParcelView.tsx - Dispatch View → Application State: uses
src/views/DispatchView.tsx - Dispatch View → Authentication State: uses
src/views/DispatchView.tsx - Dispatch View → Live Map: renders
src/views/DispatchView.tsx - Traffic View → Application State: uses
src/views/TrafficView.tsx - Traffic View → Live Map: renders
src/views/TrafficView.tsx - Emergency API → Database Access: calls
src/app/api/emergencies/route.ts - Ambulance API → Application Database: queries
src/app/api/ambulances/route.ts - Hospital API → Database Access: calls
src/app/api/hospitals/route.ts - Junction API → Database Access: calls
src/app/api/junctions/route.ts - Preemption Logs → Database Access: calls
src/app/api/logs/preemptions/route.ts - Metrics API → Database Access: calls
src/app/api/metrics/route.ts - Database Access → Application Database: queries
src/db/access.ts - Database Access → Data Schema: uses
src/db/access.ts - Live Map → Map Renderer: loads
src/components/LiveMap.tsx - Application State → Geospatial Utilities: calls
src/store/AppContext.tsx