No. 14of 22StationSoftware
Civic complaint platform
CitiZen AI
Residents report local problems such as potholes, garbage and water leaks with photos and map pins, and municipal staff work the queue with deadlines, escalation and analytics. The full stack runs; the urgency model that is meant to rank the queue is effectively untrained.
- When
- May – Sep 2025
- Status
- Built
- Team
- Personal project.
- Role
- Sole builder.
Progress
Progress65%
The full stack runs. The urgency model is effectively untrained, and 66 of 164 recorded tests were failing at the last run.
What comes next
- Build a realistic labeled complaint set of a few thousand rows, retrain, and report the real accuracy.
- Fix the failing tests.
15
API routers in the FastAPI backend, over 18 services
Project source as described in the write-up (backend routers and services)Verified. Backed by a file or public page that has been checked.Project source as described in the write-up (backend routers and services) — Read in the project audit of 13 November 2026.0.14–0.17
accuracy of the urgency model on its own saved test
About 30 synthetic samples: 0.143 on 31, and 0.167 on 30 for the backend copy. The model is effectively untrained. This is a to-do, not a result.
The models' own metadata files (models/metadata.json and backend/models/metadata.json)Verified. Backed by a file or public page that has been checked.The models' own metadata files (models/metadata.json and backend/models/metadata.json) — Read in the project audit of 13 November 2026.66 of 164
recorded tests failing at the last run
Test cache of the last run (backend/.pytest_cache, lastfailed)Verified. Backed by a file or public page that has been checked.Test cache of the last run (backend/.pytest_cache, lastfailed) — Read in the project audit of 13 November 2026.Exhibit 01 · Walk-through
One complaint, from report to map, in the first prototype
Step 01
A resident files it
The resident picks a category, says how urgent it feels, gives a location and a description, and can add a photo. These screens are the May 2025 Streamlit prototype with sample data; no picture of the rebuilt version is on file.

The complaint form in the first prototype. Step 02
It joins the staff queue
Staff see every complaint in one queue with its status and a priority score. In this sample three of the four complaints are marked high, each with the same priority score of 100. The model behind the score was never trained on real data.

The staff queue in the first prototype. The four complaints and their addresses are sample data. Step 03
It is pinned on the map
The same complaints appear as colored pins, with counts by priority and a table underneath.

The complaint map in the first prototype. Map data © OpenStreetMap contributors.
01
What it is
CitiZen AI is a complaint platform for a city. A resident reports a pothole, an overflowing bin or a water leak with a photo and a pin on the map. Municipal staff see the reports as a queue ordered by urgency, with deadlines, escalation and analytics. It is a personal project, built in two versions between May and September 2025.
02
What was built
The first version, in May 2025, was a Streamlit app on SQLite with a small text classifier for urgency and a Folium map. The screens on this page come from that prototype. The second, in September 2025, is a full rebuild: a FastAPI backend with 15 routers and 18 services covering sign-in, complaints, escalation, service deadlines, points for residents, push notifications, live updates, an audit log, search and analytics, and a front end in React 19 and TypeScript with a Leaflet map. Most of the roughly 48,000 lines of Python are tests.
03
What was found
The part with AI in the name is the part that does not work yet. The urgency model is a random forest with rule overrides, and its training data is synthetic. Its own saved metadata records an accuracy of 0.143 on 31 samples, and 0.167 on 30 for the copy inside the backend: right about one time in seven. An accuracy figure quoted in the project's early report turned out to be an estimate hard-coded in the source, so it is not repeated here. At the last recorded test run, 66 of 164 tests were failing. The platform around the model, meaning accounts, the queue, the map and escalation, starts and runs.
04
What I'd change
Collect or build a realistic labeled set of a few thousand complaints, retrain, and report the real accuracy, whatever it is. Fix the failing tests. Until then the honest description is a complaint-management platform with an urgency ranking that is wired in but not yet trained.
Figure

One question
The answer is on this page. Get it right and it goes in your passport on the map.
Challenge· stamped
CitiZen AI's urgency model sorts complaints into low, medium and high. On its own saved test of about 30 sample complaints, how often was it right?
About one in seven: accuracy 0.143 on 31 samples, and 0.167 on 30 for the backend copy, per the models' own metadata files. The training data is synthetic, and the model is effectively untrained.
Show the answer
About 1 time in 7. About one in seven: accuracy 0.143 on 31 samples, and 0.167 on 30 for the backend copy, per the models' own metadata files. The training data is synthetic, and the model is effectively untrained.
- Stack
- Python
- FastAPI
- SQLAlchemy and Alembic
- scikit-learn
- SQLite
- JWT sign-in
- Web Push
- React 19
- TypeScript
- Vite
- Tailwind 4
- React Query
- Leaflet
- Streamlit and Folium (first version)