Inspiration
Every day, communities generate massive amounts of unstructured feedback—complaints, social media posts, and emails—about infrastructure and public safety. Yet, there is a massive disconnect between a citizen spotting a hazard and the actual municipal response. The bottleneck isn't a lack of reporting; it's the inability to turn natural language into structured, prioritized data. I wanted to create a zero-friction tool that bridges this gap, allowing citizens to speak naturally while giving city officials the exact data payloads they need to dispatch workers immediately.
What it does
CivicMind AI is a real-time Decision Intelligence platform. It allows citizens to simply type what they see naturally. Instantly, the application uses AI to:
Categorize the issue (e.g., Infrastructure, Public Safety).
Score Severity to automatically flag Critical/High priority alerts, cutting through the noise.
Extract Entities to pinpoint exact locations.
Generate Action Plans, providing a concise, 2-sentence recommendation for immediate resolution by city workers.
How I built it
To keep the application ultra-low latency and highly accessible, I built a completely serverless, client-side architecture using HTML5, Tailwind CSS, and Vanilla JavaScript.
The core engine is powered by the Google Gemini 2.5 Flash API. By implementing strict Structured JSON Prompting, the app forces the LLM to return clean, predictable data payloads containing the category, severity score, and action plan, entirely bypassing the need for a traditional backend processing pipeline.
Challenges I ran into
The biggest technical hurdle was ensuring the LLM consistently returned perfectly formatted JSON without hallucinating extra conversational text or breaking the application state. It took several iterations of prompt engineering to lock down the structured output.
Additionally, building a purely client-side serverless application introduces security constraints. Protecting the API key from public GitHub scraping while maintaining a seamless experience for evaluation meant I had to carefully manage the repository, ultimately removing the hardcoded key from the deployed index.html and relying on a comprehensive demo video to showcase the live functionality.
Accomplishments that i'm proud of
I am incredibly proud of achieving "Zero-Friction Input." Taking chaotic, unstructured human complaints and instantly converting them into a clean, actionable municipal dashboard proves that lightweight applications can solve massive civic problems. Leveraging Gemini 2.5 Flash directly from the client side to achieve this with ultra-low latency feels like a huge win.
What I learned
This project completely leveled up my understanding of prompt engineering and Decision Intelligence. I learned how to constrain a powerful LLM to act strictly as a data-parsing engine. It also reinforced how effective a minimalist technology stack can be when paired with the right AI integration.
What's next for CivicMind AI
The next step is evolving the platform from a web-based dashboard into a truly portable ecosystem. I plan to rebuild the core architecture into a cross-platform AI agent using a single-file Go binary paired with a portable SQLite database. This will allow the application to run natively on Android and iOS smartphones, bringing intelligent, low-latency civic reporting directly to the pockets of citizens and city workers alike.
Built With
- api
- css3
- gemini
- html5
- javascript
- serverless