Case study
ElectroRaid
Municipal outage & revenue-protection platform
A municipal outage and revenue-protection platform designed for the City of Tshwane, linking residents, dispatchers, field technicians and revenue-protection inspectors.
The problem
Municipalities need to coordinate residents, dispatchers and field teams during outages.
Who it serves
- Residents
- Municipal dispatchers
- Field technicians
- Revenue-protection inspectors
Key features
Report and track
Residents report a fault or anonymous tip, track the assigned technician live on the map and confirm the restore.
Outage clustering
Duplicate reports within 500 m and 2 hours cluster into one incident.
Priority scoring
Priority = affected households × 12 + critical infrastructure × 280 + elapsed minutes × 1.8.
Meter-bypass detection
Flags active prepaid meters with 0 kWh bought for 60+ days while the feeder is energised (Izinyoka).
Crew dispatch
Dispatchers see a live command map and assign a matching crew.
Audit chain
Every action is written to an append-only, hash-chained audit ledger.
What I built and how
- Role-based views for residents, dispatchers, field technicians and inspectors.
- Live command map and technician tracking with React Leaflet, plus a field PWA.
- REST and Server-Sent Events API routes.
- Next.js 16 / React 19 / TypeScript with REST and Server-Sent Events API routes.
- TypeScript engines that mirror a PostgreSQL + PostGIS schema (ST_DWithin, compute_priority_score, recommend_crew).
- Installable field PWA that queues actions in IndexedDB offline and flushes them when back online.
- Seeded with real Tshwane suburbs; account numbers are representative, not live records.
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS
- React Leaflet
Source: the KEL repository README on GitHub.