How smklabs/sih-pathfinding works
Sahayata is a mobile-first Delhi NCR emergency coordination app. Residents can request help, register households, find shelter and evacuation guidance, and access recovery workflows; coordinators manage incidents and dispatches, while administrators monitor alerts, shelters, and operational analytics. The React app selects role-based views, with shared incident presentation and domain constants as an internal layer. The README also documents installable/offline PWA support. Source excerpts are partial, so backend query relationships are not shown where the actual calls are unsampled.
Main entry points: App.tsx Role and theme shell · CivilianView.tsx Resident workflows · CoordinatorView.tsx Incident coordination · AdminView.tsx Administration
Components 19
Application shell
- React entry
src/main.tsx - Role and theme shell
src/App.tsx
Resident response
- Resident workflows
src/components/CivilianView.tsx - Emergency SOS
src/components/FloatingSOS.tsx - Shelter and guidance
src/components/CivilianView.tsx - Household and recovery
src/components/CivilianView.tsx
Coordination operations
- Incident coordination
src/components/CoordinatorView.tsx - Relief dispatch tracking
src/components/CoordinatorView.tsx - Regional safety alerts
src/components/CoordinatorView.tsx - Administration
src/components/AdminView.tsx - Shelter capacity
src/components/AdminView.tsx - Operational analytics
src/components/AdminView.tsx
Shared platform
- Shared incident UI
src/components/shared.tsx - Emergency domain data
src/constants.ts - Supabase client
src/lib/supabase.ts - Platform database
supabase/migrations/20260908070953_create_full_platform_schema.sql - Offline service worker
public/sw.js - Install metadata
public/manifest.json
Other components
- Resident / responder
Connections 19
- Resident / responder → React entry: opens app
- React entry → Role and theme shell: renders
- Role and theme shell → Resident workflows: selects role
- Role and theme shell → Incident coordination: selects role
- Role and theme shell → Administration: selects role
- Role and theme shell → Emergency SOS: renders
- Resident workflows → Emergency SOS: offers SOS
- Resident workflows → Shelter and guidance: renders tab
- Resident workflows → Household and recovery: renders tabs
- Incident coordination → Relief dispatch tracking: renders tab
- Incident coordination → Regional safety alerts: shows alerts
- Administration → Shelter capacity: renders tab
- Administration → Operational analytics: renders tab
- Resident workflows → Shared incident UI: renders
- Incident coordination → Shared incident UI: renders
- Administration → Shared incident UI: renders
- Shared incident UI → Emergency domain data: formats with
- Offline service worker → Install metadata: caches shell
- Resident / responder → Install metadata: installs app