Work / Bharat-First / LocalPulse

No. 08 · Bharat-First · Civic AI

The phone does not stop ringing.
This is the dashboard they did not have.

When a flood, a fire, a riot hits a small Indian town, the panchayat is the first responder. They have no smart-city budget. They have a phone that does not stop ringing and a WhatsApp group that becomes chaos in two hours. LocalPulse is what fits between them.

5Indian languages out of the box
~80 KBJS dependencies after gzip
<200 msp95 latency target
<2 sCloud Run cold-start
512 MiBContainer footprint

Act I · The Problem

A flood arrives. So does the noise.

Imagine a town of forty thousand people in the Himalayan foothills. Power is out across two sectors. A culvert is damaged on the highway. Three families are trapped on the wrong side of a swollen nallah. The panchayat office has one telephone and three volunteers.

Within an hour, social media has eight hundred posts about it · half of them rumours, a quarter of them duplicates, a few of them genuinely useful. The Twitter / X timeline is a fire hose. The local Reddit thread reads like every other Reddit thread. The WhatsApp group is forwarding videos from a different flood, in a different state, three years ago.

Smart-city dashboards exist. They cost crores. They take a year to deploy. They are not for a town of forty thousand. LocalPulse is.

Act II · The Promise

Two AI features. A whole town's situational awareness.

The MLP ships with mock data and zero persistence so the panchayat can try it without procurement. The production target swaps mocks for live ingest, Twilio Voice, GPT-4o, Firestore and Pub/Sub.

Feature · 01

AI social-media summary

An NLP agent reads local Twitter / X and Reddit threads. Filters noise. Classifies posts into roads, shelters, power, water, medical. Clusters duplicates. Scores trust. Returns a one-glance Status Summary the sarpanch can read in five seconds.

Ingest · X + Reddit local search · last hour
Filter · noise + spam removal
Classify · 5 categories
Cluster · de-duplicate near-identical reports
Trust score · multi-source verification
Summarise · GPT-4o · 5-second read

Feature · 02

Multilingual voice helpline

Twilio plus Whisper plus an intent classifier. Elderly residents without smartphones call in their own language · Hindi, Punjabi, Tamil, Bengali, English. They report an incident or get an update. The browser demo at /voice uses the Web Speech API.

Twilio picks up the call
Whisper transcribes in the caller's language
Intent classifier tags the request
Response generated in the same language
Pulse stream · push to responder console

Act III · The Languages

Five Indian languages. Native script, not transliteration.

The dictionary lives server-side and ships with the container. New languages are a JSON file. The voice intent classifier extends the same way.

en

English

English

hi

Hindi

हिन्दी

pa

Punjabi

ਪੰਜਾਬੀ

ta

Tamil

தமிழ்

bn

Bengali

বাংলা

Act IV · The API

Eleven routes. One Express server. One container.

Single Node 20 process, single Express app, single Dockerfile. Server-Sent Events stream the live pulse to every responder console. No queue infrastructure required for the MLP.

Method Path What it does
GET/Resident dashboard. Map, AI summary, incidents, shelters, report-an-issue form.
GET/responderEmergency-responder console with operational map, feed, and SSE pulse stream.
GET/voiceVoice helpline demo using the browser Web Speech API. Production runs on Twilio + Whisper.
GET/pitchWeb slide deck. Arrow keys, space, PgUp / PgDn, F for fullscreen, ? for help.
GET/reportFull capstone project report rendered in print-friendly HTML.
GET/api/incidentsJSON. Accepts ?lang= and ?category=.
GET/api/sheltersJSON list of shelters with capacity and live occupancy.
GET/api/summaryAI status summary. Accepts ?lang= for native-script output.
POST/api/voice/intentBody: {text, lang}. Returns {intent, response}.
GET/api/pulseServer-Sent Events stream. Live incident pulse to responder consoles.
GET/healthz · /readyz · /versionOperational health, readiness probe and build version for Cloud Run.

Act V · Proof

Live. Already asia-east1.

Live · Cloud Run · asia-east1

localpulse.dmj.one

Single container, 512 MiB / 1 vCPU, min instances zero, max two. Public unauthenticated. Custom domain mapped via gcloud beta. Scale-to-zero so a panchayat budget can run it.

Capstone · B.Tech CSE Cloud

Anshuman Mohanty (GF202217744), Yogananda School of AI, Computers and Data Sciences, Shoolini University. Mentor: Mr. Ashish. Full project report at /report.

Strict CSP · HSTS · X-Frame-Options DENY

No PII in logs. AES-256-GCM at rest and TLS 1.3 in transit on production. Structured JSON logs to stdout, picked up by Cloud Logging. Correlation ID per request.

WCAG 2.2 AAA targets

Skip link, focus rings, semantic landmarks, full keyboard nav, prefers-reduced-motion respected, screen-reader labels everywhere. Designed for slow phone, bad internet, small town.

p95 < 200 ms · cold-start < 2 s

~80 KB of JS dependencies after compression. Vanilla JS, Tailwind via CDN, Leaflet for maps. No build step. Deploy is one gcloud run deploy command.

Production-target swap

The MLP ships with mock data in data/*.js. Production swaps in Firestore + Pub/Sub + BigQuery, Twilio Voice, GPT-4o for the summariser. Same routes. Same responder console.

The Stack

One Node process. One Cloud Run service. One panchayat.

  • Node.js 20
  • Express 4
  • Vanilla JS
  • Tailwind (CDN)
  • Leaflet
  • Web Speech API
  • Server-Sent Events
  • Twilio Voice (prod)
  • Whisper (prod)
  • GPT-4o (prod)
  • Firestore (prod)
  • Pub/Sub (prod)
  • BigQuery (prod)
  • Cloud Run · asia-east1
  • Cloud Logging
  • MIT License

If a town of forty thousand can run on it, your civic platform should too.

I build civic AI that fits the actual budget, the actual phone, the actual person picking up the receiver. Capstone-grade today, production-grade tomorrow with a one-line config swap. If your town, ward or college needs the same, let's talk.