Logo Lanfrica

lawmaluki/deckwatch

Domain:

peace and securitydigital infrastructure

Record type:

software
Creator:
law
Host:
Deckwatch is a real-time public incident intelligence platform that organizes reports of crime, accidents, disasters, protests, and emergencies into a searchable, verifiable map of Kenya. # Deckwatch Kenya AI-powered public safety and incident intelligence platform for Kenya — a map-first and modern live-event visualizations. Deckwatch aggregates incidents (crime, road accidents, floods, fires, protests, missing persons, terror alerts, disease outbreaks, infrastructure failures, wildlife conflicts, election violence) onto a live interactive map of Kenya, with per-incident verification scoring, AI-style summaries, county risk dashboards, a timeline playback mode, and an Intel Feed drawer. **Current status:** this is a working frontend prototype running on deterministic seeded mock data - real news ingestion, or deployed AI pipeline yet. See the `/why` and `/api-docs` pagesin the app for more on where this is headed. ## Tech stack - **Frontend:** Next.js 16 (App Router), TypeScript, Tailwind CSS v4, Framer Motion - **Map:** Leaflet + react-leaflet, CARTO dark basemap tiles, real Kenya county boundaries (GeoJSON), Supercluster for marker clustering, leaflet.heat for heatmaps - **State:** Zustand - **Charts:** Recharts ## Getting started ```bash npm install npm run dev ``` Open localhost to view the live map. ## Data source The client reads incident data one of two ways, selected by the `NEXT_PUBLIC_DATA_SOURCE` environment variable: - **unset / `mock`** (default) — a synchronous read of the seeded, deterministic dataset anchored to a fixed reference time. Fully static, ideal for local dev. - **`api`** — the client fetches from this app's own `/api/incidents` route on load and re-polls every 60s. The dataset is re-anchored to real time on each request (`asOf` in the response), so relative times and 24h counts stay live. See `.env.example`. The `/api/*` route handlers serve seeded data directly, **unless** `API_BASE_URL` is set — then they proxy (server-side) to the FastAPI + PostgreSQL/PostGIS backend in `backend/`. So there are three layers: | Env | Data path | |-----|-----------| | nothing set | static seeded snapshot (mock) …