CODEEXP · Civic emergency coordination · 2026

One map.
Three roles.
Shared truth.

Kampung Kaki is a live, role-aware map of Singapore for citizens, responders, and operations teams. A citizen can send an SOS, ops can verify and dispatch, and responders can coordinate around the same incident without the usual screenshots, phone chains, or stale dashboards.

React 19TypeScriptViteMapLibre OneMap SGMQTT 5RedisFastAPIVercel
Citizen view showing live Singapore conditions and emergency actions
Citizen · live conditions, SOS, reporting
Responder view showing duty state and the shared map
Responder · availability, missions, case rooms
Operations view showing triage, declaration, and broadcast controls
Ops · triage, dispatch, declaration, broadcast
3Role-scoped views in one React app
1Canonical state tree shared by every role
6State clusters with explicit ownership
5Stateless edge and live-data routes
QoS 1Retained MQTT delivery and reconnects
0Fabricated values when a provider fails

Emergency information is usually fragmented.

Residents see one thing, responders receive another, and operators spend valuable time reconciling both. Kampung Kaki treats coordination as a shared-state problem: every role gets the tools it needs, but all of them read and write the same incident lifecycle.

01

Signals arrive messy.

Citizen reports, distress messages, weather feeds, traffic incidents, and advisories arrive with different trust and freshness.

02

Roles need different controls.

A citizen needs a clear SOS path. A responder needs a mission and aid card. Ops needs verification, dispatch, zones, and broadcasts.

03

Networks are not guaranteed.

Emergency software cannot pretend a dropped connection means the action never happened. Retained state and offline queues are core behavior.

The same incident, seen from the right angle.

The three clients are not separate products. They are role-scoped surfaces in the same React bundle, which keeps the data model, map behavior, and event semantics consistent.

Citizen workspace
Citizen

Ask for help without learning the system.

Live conditions, nearby care resources, report composition, SOS, alerts, and grounded AI guidance sit on one familiar map.

Responder workspace
Responder

Turn availability into coordinated action.

Duty state, joinable missions, case rooms, aid cards, capability groups, and queued status updates support work in the field.

Operations workspace
Operations

Verify first, then mobilize.

Ops can inspect intake, promote verified events, dispatch responders, draw emergency zones, and publish role-aware broadcasts.

From a thumb tap to a shared response.

The product keeps low-trust intake separate from verified incidents, then creates operational work only after the evidence is good enough. That distinction is what stops a crowded map from becoming a noisy one.

01

Signal

A resident files a report or starts an SOS session. Live feeds can also emit threshold events.

02

Verify

Ops reviews evidence, provenance, location, source health, and possible duplicates.

03

Mobilize

A verified event creates case work, responder assignments, zones, and broadcasts.

04

Close the loop

Status, chat, acknowledgements, and the audit log remain attached to one canonical incident.

The centre of gravity is the CSOT.

The Canonical State Of Truth sits between clients, edge functions, workers, and external providers. Mosquitto MQTT 5 handles retained real-time delivery; Redis keeps the durable mirror and gives background workers a fast read and write path.

Kampung Kaki system architecture diagram
Same React SPA · role-scoped chrome Stateless edge · no PII at rest Read-only external providers · attributed responses

Six clusters keep ownership explicit.

The CSOT is organized by lifecycle rather than by screen. Each cluster has a primary responsibility, which makes role permissions and cross-role transitions easier to reason about.

01 / intake

Intake

Reports and SOS sessions remain low trust until ops verifies them.

02 / incidents

Incidents

Verified events and declared zones become the publishable source of truth.

03 / operations

Operations

Cases, members, responder state, chat, captains, and live response work.

04 / network

Network

Identity, responders, groups, rosters, and organization affiliation.

05 / intel

Intel

Source health, action logs, notifications, and situational context.

06 / presentation

Presentation

Ephemeral role, drawer, selection, and shell state shared across tabs.

Failure is shown, queued, or retried. Never invented.

External providers are allowed to be unavailable. The interface reports stale or missing data explicitly, while state-bearing actions use retained delivery and local queues to survive reconnects.

MQTT

Retained, role-scoped topics

QoS-1 delivery, retained state, access control, and last-will presence let late or reconnecting clients recover the current picture.

EDGE

Small and stateless

AI routing, tool calls, map layers, reverse geocoding, and source snapshots translate requests without becoming another state store.

AI

Grounded or quiet

Provider outputs carry source attribution and freshness. If a tool cannot answer, the host refuses instead of filling the gap with a guess.

Singapore data becomes operational context.

Public feeds are not decorative layers. They help locate care, understand access constraints, and explain the environment around an incident. Every feed remains read-only and attributed.

OneMap basemap AED locations Hospitals NEA PSI NEA rainfall 2-hour forecast Air temperature Humidity Wind LTA traffic incidents Traffic cameras Taxi availability Dengue clusters gov.sg advisories

Watch one incident move through the whole system.

The recording follows the citizen, responder, and ops clients through a live emergency scenario: grounded assistance, SOS propagation, dispatch, offline behavior, case coordination, and final resolution.

Recorded 11 June 2026 · 6:12 end-to-end run Citizen → responder → ops → resolution

Welcome.

Holo