Inspiration

It started with a simple but uncomfortable question: what happens when a citizen has a real problem — a broken water pipe, a collapsed road, an unsafe street — but has absolutely no idea how to make their voice heard?

In many underserved communities, the gap between having a problem and getting it fixed isn't a technology gap — it's a language and access gap. Filing an official complaint requires knowing which government office is responsible, writing in a formal administrative tone, and having the time and literacy to navigate bureaucracy. For millions of people, that barrier is enough to make them give up before they even start.

We kept coming back to one idea: what if AI could become the translator between an ordinary citizen's everyday words and the formal language of institutions? Not replacing the citizen's voice — amplifying it, and giving it the structure it needs to be taken seriously.

That question became CivicAI"Your voice, written in the language of the law."

This idea aligned perfectly with the AI × Social Good theme of STEMINATE HACKS 2026, sitting directly at the intersection of Equity & Justice (access to civic participation and legal-style communication) and Community & Access (a tool designed for people who are normally excluded from digital civic infrastructure).

What it does

CivicAI is a multilingual, multimodal civic action platform that transforms a citizen's plain-language description of a local problem into a formal, structured, government-ready complaint — instantly, and at zero cost.

Here is the full pipeline, end to end:

  1. Reporting an issue — A citizen describes a local problem (broken infrastructure, water outages, unsafe streets, corruption, etc.) using text, voice input, or by attaching context such as location.
  2. Automatic classification — The system analyzes the description and classifies it by issue category (e.g., water access, road infrastructure, electricity, safety) and assigns an urgency level, using multilingual keyword and context analysis.
  3. Location enrichment — Using the browser's Geolocation API combined with OpenStreetMap's Nominatim reverse-geocoding service, each report is automatically tagged with a precise location and timestamp — no manual address entry required.
  4. Authority routing — Based on the issue category, CivicAI identifies which type of government authority is responsible and generates the complaint addressed accordingly.
  5. Formal letter generation — The platform automatically drafts a complete, professionally-worded complaint letter, structured the way an administrative authority expects to receive it — something that would normally require legal knowledge or paid assistance.
  6. Community clustering & pressure scoring — When multiple citizens report the same or similar issue in the same area, CivicAI clusters these reports into a single community case and calculates a Community Pressure Score. A single complaint can be ignored; fifty identical, clustered, geotagged complaints become statistically very difficult to dismiss.
  7. Transparent tracking & escalation — Every case moves through a visible status pipeline — Submitted → Acknowledged → Under Review → Resolved — and stalled cases are flagged for automatic escalation letters.
  8. Public dashboard — A heatmap-style dashboard visualizes all active community issues, giving citizens, NGOs, and journalists a real-time picture of where systemic problems are concentrated.

The entire interface is multilingual by design, supporting English, French, Arabic, Spanish, Portuguese, and Swahili, including full right-to-left layout support for Arabic — because a tool for underserved communities cannot assume everyone speaks the language of the institutions they're complaining to.


How we built it

CivicAI was built as a fully self-contained, frontend-first web application, deliberately engineered to deploy instantly with zero infrastructure overhead — a deliberate choice to maximize feasibility within the hackathon timeframe while keeping a clear path to a production-grade backend.

Core stack:

  • React 18 + Vite for a fast, modern, component-based frontend architecture
  • lucide-react for a clean, accessible icon system across the UI
  • Browser Geolocation API + OpenStreetMap Nominatim for free, key-less reverse geocoding — converting raw GPS coordinates into human-readable addresses
  • Web Speech API for voice-to-text input, enabling citizens to speak their complaint rather than type it, which matters enormously for accessibility and literacy barriers
  • localStorage-based persistence layer, including a seeded demo dataset, designed so the app works fully offline and statelessly for the prototype — with a clearly designed migration path to a real database

Architecture highlights:

The project is organized around a clean separation of concerns:

  • App.jsx — the main application UI and orchestration logic
  • i18n.js — a complete translation layer for all six supported languages
  • categories.js — the issue taxonomy, including icons, colors, and associated authority types
  • lib/classify.js — a multilingual classification engine that analyzes report text and assigns category + urgency
  • lib/letters.js — the template engine that generates formal complaint and escalation letters
  • lib/storage.js — persistence, demo seed data, and the community clustering algorithm
  • lib/geo.js — geolocation and reverse-geocoding utilities

This modular structure was intentional: it means the most "AI-critical" pieces of the system — classification (classify.js) and letter generation (letters.js) — are isolated, swappable modules. In the current MVP, these are implemented using carefully engineered multilingual heuristic logic so the application runs with zero API keys and zero backend, making it instantly deployable and demoable. However, the architecture is explicitly designed so that these modules can be swapped for live LLM-powered calls (e.g., the Anthropic Claude API) behind a serverless function, without touching the rest of the application — turning rule-based classification into true generative, context-aware reasoning.

We deployed the application on Vercel, with a vercel.json configuration ensuring zero-config builds straight from the Vite output.


Challenges we ran into

1. Designing for people who don't think in "categories." Real citizens don't describe problems the way databases expect. Someone might write "there's no water again" instead of "water infrastructure outage." A major challenge was building a classification layer that could map natural, informal, multilingual phrasing onto a structured taxonomy of issue types and urgency levels — without requiring a paid LLM API for the base prototype to function.

2. Multilingual support that goes beyond translation. Supporting six languages — including Arabic with full right-to-left layout — meant every UI component had to be tested for directionality, text expansion/contraction, and cultural tone in the generated letters. A "formal" tone in French administrative writing is structurally different from formal English, and our letter templates had to respect that.

3. Making "community pressure" meaningful, not just cosmetic. The hardest conceptual challenge was the clustering logic: how do you decide that two reports — possibly written in different languages, with slightly different wording, from nearby but not identical coordinates — represent the same underlying issue? We built a clustering approach in storage.js that groups reports by category, geographic proximity, and time window to produce a single aggregated community case with a calculated pressure score.

4. Balancing ambition with feasibility under time pressure. The original vision included a live backend, real LLM-based reasoning, and a shared database across users. With a tight hackathon window, we made a deliberate architectural decision: build a fully functional, demo-ready, zero-dependency frontend MVP first, with every "AI module" cleanly isolated so it can be upgraded to a true LLM-powered backend without a rewrite. This let us ship a working, polished, deployable product rather than an incomplete full-stack system.

5. Geolocation without compromising accessibility. Many citizens in target communities may not grant location permissions, or may be on devices/browsers with limited support. We had to design the geolocation + reverse-geocoding flow (via OpenStreetMap Nominatim) to degrade gracefully — enriching reports when location is available, without blocking submission when it isn't.

What we learned

  • Accessibility is an architectural decision, not a UI afterthought. Supporting six languages and right-to-left layouts from day one forced us to structure the entire codebase — from i18n.js to component layout — around accessibility rather than retrofitting it later.
  • The most powerful AI systems for social good aren't always the most computationally expensive ones. A well-designed classification heuristic, combined with a clear upgrade path to LLM-based reasoning, can deliver a genuinely useful, instantly deployable tool — proving that meaningful AI-driven impact starts with thoughtful system design, not just raw model size.
  • Aggregation is where individual voices become collective power. Building the community clustering and pressure-scoring logic taught us that the real social innovation in CivicAI isn't the letter-writing — it's the transformation of isolated, ignorable complaints into statistically significant, structured civic signals.
  • Zero-infrastructure design is a legitimate engineering strategy. Choosing localStorage and a fully static deployment wasn't a limitation — it was a way to guarantee the project works flawlessly for judges, on any device, with zero setup, while keeping a clean, documented path toward a production backend with Postgres/PostGIS and a real LLM integration.

Accomplishments that we're proud of

A complete, working, end-to-end civic pipeline — not just a concept. Perhaps our proudest achievement is that CivicAI isn't a mockup or a slide deck describing what could be built — it's a fully functional, deployed application where a citizen can describe a real problem and walk away, in seconds, with a structured, classified, addressed, formal complaint letter. The entire pipeline — from raw text input to category classification, urgency scoring, location enrichment, authority routing, and final letter generation — works today, live, at civicai-flame.vercel.app.

True multilingual accessibility, including full right-to-left support. We're especially proud that CivicAI launches with six languages built in from day one: English, French, Arabic, Spanish, Portuguese, and Swahili — including a complete right-to-left layout for Arabic. This wasn't an afterthought bolted on at the end; it shaped our component architecture, our i18n.js translation layer, and even how our letter templates handle formal tone differently across languages. For a tool meant to serve underserved communities, we believe this is exactly where accessibility should start — at the foundation, not the finish line.

A genuinely novel feature: turning isolated complaints into collective civic power. We're proud that CivicAI doesn't stop at "individual citizen writes letter." The community clustering and Community Pressure Score system — which groups similar reports by category, location, and time window into a single aggregated case — is, to our knowledge, a feature no existing civic-tech tool offers in this form. It directly embodies our core belief: one complaint can be ignored, but fifty clustered, geotagged, identical complaints become a structured signal that institutions are far less able to dismiss.

Zero-friction, zero-cost, instantly demoable architecture. We deliberately engineered CivicAI to run with no backend, no API keys, and no setup — using localStorage, the browser's Geolocation API, OpenStreetMap's free Nominatim service, and the Web Speech API. We're proud of this not because it's "simple," but because it's a deliberate engineering decision: it means anyone — a judge, a citizen, an NGO worker with a low-end device — can open the link and use the full product immediately, with nothing to install and nothing to configure.

A modular codebase built for real-world evolution, not just a hackathon demo. We structured the project so that the most "intelligent" parts of the system — classify.js for issue classification and letters.js for letter generation — are cleanly isolated modules with a documented upgrade path to live LLM-powered reasoning, a shared Postgres/PostGIS backend, and real government authority directories. We're proud that what we shipped isn't a dead end — it's a foundation that a real team could extend into a production civic platform without a rewrite.

Designing the location-enrichment flow to degrade gracefully. Getting geolocation and reverse-geocoding to enrich reports automatically — while ensuring the app remains fully usable for citizens who deny location permissions or use limited devices — was a small but important detail we're proud of. It reflects our broader design philosophy: accessibility for the least privileged user always comes first.

**Shipping a clear, honest, and complete README and roadmap

What's next for Civic AI

The README itself documents a clear roadmap for evolving this MVP into a production system:

  • Replacing the heuristic classifier and letter templates with live Anthropic Claude API calls via serverless functions, enabling true generative, context-aware classification and letter drafting
  • Migrating from localStorage to a shared Postgres + PostGIS (or Supabase/Firebase) backend, so community reports and pressure scores are visible across all users and devices in real time
  • Integrating a hosted speech-to-text service (such as Whisper) for full multilingual, offline-capable voice input
  • Building a real authority directory per country/region, with actual government department names, emails, and addresses
  • Implementing automatic escalation via scheduled jobs that detect stalled cases and generate follow-up letters without human intervention

Our long-term vision is simple: every citizen, regardless of language, literacy, or technical skill, should be able to turn "something is wrong here" into a formal, trackable, collectively-amplified civic action — in seconds, for free.

CivicAI — your voice, written in the language of the law.

Built With

  • browser-geolocation-api
  • css-in-js
  • github
  • javascript
  • localstorage
  • lucide-react-icons
  • openstreetmap-nominatim-(reverse-geocoding)
  • react-18
  • vite
  • web-speech-api
Share this project:

Updates