cat case-studies/sajilo-sahayata.md
Sajilo Sahayata
- React
- Vite
- Tailwind v4
- Zustand
- TanStack Query
- Leaflet
- Node.js
- Express
- MongoDB
- Twilio
- Gemini
## the problem
When a flood or landslide hits rural Nepal, reports reach local government through phone calls and hearsay. Responders lose the first critical hours confirming where the incident actually is, how severe it is, and who has already responded.
Citizens on cheap Android phones with intermittent connectivity; ward-level officials with little technical training; nine local languages in one district. The platform had to work for both sides - a panicked citizen and an overloaded admin - at the same time.
## screens
## constraints & tradeoffs
- Reports must survive zero connectivity - offline queue with auto-sync when the network returns.
- No-data fallback: emergencies can be submitted over plain SMS via Twilio, and admins can reply two-way.
- Multilingual by default - nine languages including Nepali, Hindi and Maithili, with AI-assisted translation via Google Gemini.
- Location must be captured automatically; asking a distressed user to type an address is a failure mode.
## architecture
citizen PWA (React + Vite) ├─ GPS + photo capture ──► report queue (offline-first) ├─ queue ──sync──► Express API ──► MongoDB (geospatial index) └─ SMS path ──► Twilio webhook ──► same report pipeline admin dashboard ├─ Leaflet cluster map ◄── live reports ├─ verification workflow ──► broadcast alerts (Web Push) └─ analytics + safe-zone CRUD
## key decisions
Offline-first, not offline-tolerant
The report form writes to a local queue first and treats the network as an enhancement. Zustand holds the queue, and a sync worker drains it when connectivity returns - so the UX is identical online and offline.
SMS as a first-class transport
A separate Twilio ingestion path normalizes SMS submissions into the same report pipeline as the PWA, so admins triage one queue regardless of how the report arrived.
Geospatial queries in the database
MongoDB 2dsphere indexes power 'incidents near me' and cluster rendering, keeping the map fast instead of filtering thousands of reports in the browser.
## results & lessons
- Full citizen-to-admin loop working end to end: report, verify, dispatch, broadcast.
- Nine-language support with AI-assisted translation and image analysis.
- Push notifications with deep links take responders straight to the incident on the map.
- Lesson: designing for the worst network first made the happy path trivial, not the other way around.
next
Sajilo Digital →