Inspiration

Lahore generates thousands of civic complaints every month — potholes, overflowing garbage, broken streetlights, sewerage leaks — but most go unreported simply because filing a complaint feels bureaucratic and slow, and there's no way for citizens to verify whether their report was even taken seriously. For Problem Statement 3, "Turning Citizens into Verified Sensors," we asked: what if every smartphone in the city could act as a trusted sensor, and AI could instantly verify that a report is genuine before it ever reaches a government desk?

What it does

CivicLens AI lets any citizen report a civic issue in under a minute:

  1. Sign up and report — citizens create an account, then submit a photo, a short description, an issue category, and pin the exact location on an interactive map.
  2. Instant AI verification — Google Gemini analyzes the photo in real time and decides whether it genuinely shows a civic issue, whether the citizen picked the right category, how urgent it looks, and gives a one-line explanation of its reasoning.
  3. Smart routing — genuine reports are instantly marked "verified" and published to a live public map; irrelevant or fake photos are rejected before they ever waste anyone's time; if a citizen picks the wrong category (e.g. selects "streetlight" for a photo of garbage), the system catches it immediately and asks them to correct it — nothing bad gets saved.
  4. Live public map — anyone can browse verified reports color-coded by status and priority, filter by area or category, and see exactly what's happening in their neighborhood.
  5. Government dashboard — authorized officials log in separately to see every report in a structured table, complete with citizen contact details, AI priority ranking, and category, so departments can triage and respond efficiently.

How we built it

  • Frontend: React (Vite) with Leaflet/OpenStreetMap for the interactive map and location picker.
  • Backend: Flask (Python) exposing REST endpoints for citizen auth, admin auth, and report submission, with session-based authentication and hashed passwords/CNIC.
  • Database: PostgreSQL hosted on Neon, with a pooled connection layer for reliability.
  • AI verification: Google Gemini (gemini-flash-latest, with automatic fallback to a secondary model) analyzes each uploaded photo against the citizen's description and selected category, returning a structured verdict (genuine/fake, correct category, confidence, priority, and reasoning) that directly drives what happens to the report.
  • Deployment: Backend on Render, frontend on Vercel, connected over authenticated, credentialed API calls.

Challenges we ran into

  • Getting the AI's decision logic right. Early on, every report ended up "pending" instead of being decisively verified or rejected — we traced this to the AI call silently failing under load and falling back to a generic "pending" state. We fixed this with automatic retries, exponential backoff, and a secondary model fallback, so a decisive verdict is now the default outcome, not the exception.
  • Protecting sensitive data. Since we ask citizens for CNIC to prevent duplicate accounts, we made sure it is never stored in plain text — only a one-way hash is kept, the same way a password would be handled.
  • Designing for trust, not friction. We deliberately kept citizen reporting login-lightweight (no bureaucracy beyond a one-time signup) while reserving a separate, protected login for government staff — because a civic reporting tool only works if people actually use it.

Accomplishments that we're proud of

A fully working, end-to-end pipeline — from a citizen's phone camera to a government dashboard — that makes a real decision about every single report using AI, instead of just collecting data and hoping someone looks at it later.

What we learned

That "AI verification" is only as trustworthy as its failure handling — a system that silently degrades to "pending" on every error isn't actually verifying anything. Building in retries, fallbacks, and clear reasoning turned out to matter more than the initial prompt design.

What's next for CivicLens AI

  • Duplicate-report detection, so multiple citizens reporting the same pothole get merged into one tracked issue.
  • Status updates back to citizens when their reported issue is resolved.
  • A public resolution-rate leaderboard by area, to add accountability for government departments.

Built With

Share this project:

Updates

Submission history