How ankitkumar810/shaastra works
SHAASTRA is a disaster-management platform prototype centered on shelter discovery, safety registration and family reconnection, with district coordination. The README describes the current UI as a low-bandwidth demo with local interactions and explicitly says several integrations are not yet part of the product; sampled API code nevertheless shows corresponding staged server capabilities. The graph keeps the demo journeys distinct from those API branches. UI-to-API wiring is not established by the sampled excerpts, so those links are omitted.
Main entry points: prisma.ts Operational data · server.ts Supabase auth · auth.ts Profile and roles · route.ts Shelter API
Components 24
User experience
- Citizen dashboard
app/dashboard/citizen/page.tsx - Shelter discovery
app/dashboard/citizen/shelters/page.tsx - Safety check-in
app/dashboard/citizen/safety-checkin/page.tsx - Family registry
app/dashboard/citizen/missing-persons/page.tsx - Hazard reporting
app/dashboard/citizen/report-hazard/page.tsx - District dashboard
app/dashboard/authority/page.tsx
Disaster response
- Shelter API
app/api/v1/shelters/route.ts - Shelter operations
app/api/v1/shelters/[id]/route.ts - Incident reports
app/api/v1/reports/route.ts - Missing persons
app/api/v1/missing-persons/route.ts - Location consent
app/api/v1/location/consent/route.ts - Resource predictions
app/api/v1/predictions/route.ts - Operational data
lib/prisma.ts
Identity and access
- Login callback
app/auth/callback/route.ts - Profile and roles
lib/services/auth.ts - Supabase auth
lib/supabase/server.ts
Staged integrations
- AI assistant API
app/api/v1/assistant/route.ts - Grounded responses
lib/services/ai.ts - Translation API
app/api/bhashini/translate/route.ts - Bhashini service
lib/services/bhashini.ts - SMS commands
app/api/v1/sms/webhook/route.ts - Offline sync
app/api/v1/sync/route.ts
Other components
- Citizen
- Authority
Connections 31
- Citizen → Citizen dashboard: opens
- Citizen → Shelter discovery: finds shelters
- Citizen → Safety check-in: checks in
- Citizen → Family registry: seeks family
- Citizen → Hazard reporting: reports hazard
- Authority → District dashboard: coordinates
- Shelter API → Operational data: queries and writes
- Shelter operations → Operational data: reads and updates
- Shelter operations → Profile and roles: checks profile
- Shelter API → Profile and roles: checks profile
- Shelter API → Supabase auth: authenticates
- Shelter operations → Supabase auth: authenticates
- Incident reports → Operational data: reads and creates
- Incident reports → Profile and roles: checks profile
- Incident reports → Supabase auth: authenticates
- Missing persons → Operational data: reads and creates
- Missing persons → Profile and roles: checks profile
- Missing persons → Supabase auth: authenticates
- Location consent → Operational data: stores consent
- Location consent → Profile and roles: ensures profile
- Location consent → Supabase auth: authenticates
- Resource predictions → Profile and roles: checks profile
- Resource predictions → Supabase auth: authenticates
- Resource predictions → Operational data: evaluates shelters
- Login callback → Supabase auth: exchanges session
- Login callback → Profile and roles: syncs profile
- AI assistant API → Grounded responses: generates response
- Translation API → Bhashini service: translates text
- SMS commands → Operational data: reads shelter status
- Offline sync → Operational data: syncs records
- Offline sync → Supabase auth: authenticates