Inspiration
In our community, problems like a broken water point, garbage that hasn't been collected for weeks, or a pothole that cars swerve around get reported through phone calls, group chats and word of mouth. [Add one real example you've seen, e.g. "the water point near our school was broken for two weeks and families walked far to fetch water."] Officials receive vague, duplicated complaints with no exact location, so the most dangerous problems don't always get fixed first, and residents stop reporting because they never hear back. We wanted reporting to be as easy as dropping a pin, and we wanted the worst problems to rise to the top automatically.
What it does
FixFirst lets a resident pin a problem on the map and describe it in their own words. As they type, a live work order fills itself in:
- Problem type: one of 7 categories (water & sewage, waste, roads, power & streetlights, drainage & flooding, public safety, parks), with a confidence score
- Urgency from 0 to 10, with the reasons shown, such as "no clean water", "children affected" or "exposed live wires"
- The office that should fix it
- A duplicate check: if a neighbor already reported the same pothole 17 m away, the resident taps "count me too" instead of filing a new report
Every open problem then appears on a map, colored by urgency, and on a priority board ranked by a transparent FixFirst score, with critical hazards pinned to the top. Officials can update the status, correct the AI (it retrains instantly), and generate a ready-to-send letter to the office with the evidence and an exact map link. A Community Pulse page shows hotspots and the problem that has waited longest.
How we built it
FixFirst is plain HTML, CSS and JavaScript, with no frameworks and no external AI API. It runs entirely in the browser, so it's free to host on GitHub Pages and works on low-cost phones. The maps use Leaflet with OpenStreetMap data.
The AI is written from scratch:
- A multinomial Naive Bayes classifier, trained on 238 labelled example reports, predicts the problem type:
$$\hat{c} = \arg\max_{c}\Big[\log P(c) + \sum_{w \in \text{report}} \log \frac{n_{c,w} + 1}{N_c + |V|}\Big]$$
- An urgency scorer adds up weighted risk signals, capped at 10, so every point can be explained.
- Duplicate detection combines TF-IDF cosine similarity (what the problem is) with the haversine distance between map pins (where it is).
- The ranking is:
$$\text{FixFirst score} = 7u + \min\big(20,\ 6\log_2(1+r)\big) + \min(10,\ 0.5d)$$
where u is urgency (0 to 10), r is the number of residents affected, and d is the number of days waiting.
A Node.js test script measures accuracy and checks the key behaviors. We used Claude, an AI assistant, to help write and test the code.
Challenges we ran into
- Too little training data. The first classifier scored only about 71% because each category had just 22 examples. Adding more varied, realistic examples raised leave-one-out accuracy to 86.6%.
- False duplicates. Place names inside the text made unrelated reports look alike, such as a pothole and a burst pipe on the same road. The fix was to compare what (the text without place words) and where (map distance) separately.
- Fair ranking. A brand-new critical hazard scored below an older, popular complaint, so critical hazards now always go to the top.
- Explainability. People need to see why the AI decided something, not just a label, so every score shows its reasons.
Accomplishments that we're proud of
- An AI built from scratch that is 86.6% accurate and fully explainable, with no servers or API keys
- Duplicate detection that recognizes the same pothole reported 17 m away
- A one-click letter that turns residents' reports into evidence officials can act on
What we learned
- How Naive Bayes, TF-IDF and cosine similarity work, and how to test a model honestly with leave-one-out evaluation
- For a small model, better data mattered more than a fancier algorithm
- People trust AI decisions more when they can see the reasons behind them
What's next for FixFirst
- A shared database and sign-in for officials, so reports sync across devices
- SMS and WhatsApp reporting for residents without smartphones
- Training data in local languages and from real complaint records
- Photo classification and hotspot clustering on the map
- Piloting it with [a local office, school or community group]
Log in or sign up for Devpost to join the conversation.