🚀 CitizenLink: AI-Powered Civic Issue Resolution Platform The Problem When citizens report civic issues (potholes, broken streetlights, water leaks), the process is usually a black box. Citizens file a complaint and never hear back, while government agencies are overwhelmed by duplicate tickets, vague descriptions, and manual triage.

The Solution CitizenLink is a dual-sided, real-time platform that bridges the gap between citizens and civic agents. It uses advanced AI (Google Gemini 2.5 Flash orchestrated via LangGraph) not as a gimmick, but as a core utility to automate triage, assist human workers, and keep citizens informed instantly.

📱 For the Citizen: Radical Transparency Frictionless Reporting: Citizens can snap a picture, drop a pin on a real-time map, and submit an issue in under a minute. AI-Powered Instant Support: Instead of waiting days for an update, every ticket gets a dedicated AI Chat Assistant. The AI reads the exact ticket metadata and agent updates, allowing citizens to ask "Has any work started on this?" and get an accurate, context-aware answer instantly. Accountability Loop: Once an issue is fixed, citizens receive a prompt to rate the resolution. If the rating is poor, the citizen can instantly reopen the ticket with feedback, kicking it immediately back to an escalated human agent queue. Live Dashboard: Citizens get a personal dashboard showing their active complaints, resolution times, and the real-time status of their issues.

🛡️ For the Agent: Supercharged Efficiency Automated AI Triage: The moment a ticket is filed, our LangGraph Ticket Creation Subgraph goes to work. It reads the raw complaint, extracts the exact issue type, automatically routes it to the correct department (e.g., Roads, Electricity), and assigns a numeric priority score (1-100) based on severity. Agents no longer have to manually assign tickets. The Agent Queue & Live Heatmap: Agents log into a clean dashboard where tickets are automatically sorted by priority. A Live Heatmap visualizes active complaints, with an AI insights sidebar that groups issues (e.g., "5 reports of potholes from Andheri"), allowing dispatchers to spot crises before they escalate. AI Copilot (The Secret Weapon): When an agent opens a complex ticket, they can click "Run AI Copilot". The AI analyzes the situation and generates a Visual Action Plan—a step-by-step graph of exactly what to do, an estimated effort time, and a risk assessment. It even pre-drafts an empathetic response to the citizen. Automated Escalation Engine: A background service constantly spans active tickets. If a ticket breaches its SLA (Service Level Agreement), it is automatically flagged with a red "Escalated" badge, and an AI-generated briefing summarizes why the ticket is failing so supervisors can intervene.

⚙️ The Technical Architecture (Under the Hood) What makes CitizenLink special is how the AI is implemented. This isn't just a wrapper around ChatGPT; it's a carefully orchestrated, production-ready backend.

Frontend: Next.js + Tailwind + Framer Motion for beautiful, responsive UI. Backend: Python FastAPI for high-performance API routes. Database: Firebase Authentication for secure login and Firestore for real-time document syncing. AI Orchestration (LangGraph): We use LangGraph to build modular AI workflows. Instead of one massive, fragile prompt, the backend has 4 distinct "State Graphs": Triage Graph (categorizes and scores). Copilot Graph (generates agent action plans). Citizen Assistant Graph (answers user FAQs). Resolution Validator Graph (checks agent repair photos against the original complaint). Stateless by Design: Unlike naive implementations that use bloated SQL checkpointers to remember conversation history, CitizenLink is completely stateless. The source of truth is the Firestore database.

When a LangGraph workflow runs, it pulls the exact state from Firestore, does its reasoning, and saves it right back. This makes the backend incredibly fast, scalable, and resistant to crashes.

The Ask / Conclusion CitizenLink isn't just a prototype; it's a template for how modern governments and massive customer support teams should operate. It proves that by using AI to handle the tedious work (triage, drafting replies, answering FAQs), humans can focus on what actually matters: getting the road fixed.

Built With

  • fastapi
  • langgraph
  • nextjs
Share this project:

Updates