-
-
UC Standings dashboard: Lahore's overall clean-city trust index, verified disputes, and official claims feed at a glance.
-
Live Supabase backend: the Lahore Index updates in real time as new disputes and claims come in.
-
Johar Town auto-flagged as a "Repeat Offender" after multiple disputed claims, trust score drops to 0%.
-
Disputed claims rate climbs to 69% as citizen reports outpace official cleanup claims.
-
Interactive Leaflet map of Lahore's Union Councils, color-coded by trust score with live claim/dispute counts.
-
Gov Portal: municipal workers log a waste collection claim with geo-pinned coordinates and photo proof.
-
Citizens file a last-mile dispute by selecting the official claim and pinning their own submission location.
-
Public Verification Logs feed showing every dispute's AI arbitrator reasoning, fully transparent and auditable.
-
Dispute photo evidence uploaded and auto-compressed, ready for AI verification against the official claim.
-
The Shehr AI Arbitration Engine runs EXIF extraction, duplicate checks, GPS matching, and Gemini vision comparison live.
-
Final Arbitration Report: AI verdict, reasoning, and full verification trail, flagged for human review.
Inspiration Despite the massive Rs. 150 billion investment in the Suthra Punjab Programme, a critical gap remains at the last mile: The Accountability Gap. Private waste contractors and on-ground staff often mark areas as "Cleaned" on official portals, but citizens still see garbage on the streets. We realized that simply building another "complaint app" wouldn't solve the problem of "ghost cleanups." The government needed a Zero-Trust Accountability Layer—an independent, unbiased mechanism to arbitrate conflicting claims between municipal workers and residents. We were inspired to build a system where civic truth is verified by math and AI, not just human claims.
What it does Shehr AI is an Automated Digital Jury and Auditing Engine for city waste management. Instead of a simple map with red pins, our platform arbitrates disputes:
The Claim: A mock government portal allows contractors to log a location as "Cleaned" with photographic proof.
The Dispute: A citizen can dispute this by uploading a real-time photo of uncollected waste at the same location.
The AI Arbitrator: Our system acts as a Digital Jury. It cross-examines both photos side-by-side using Vision AI, analyzes the EXIF/GPS metadata, and issues a strict [VALID_DISPUTE] or [REJECTED_DISPUTE] verdict with a logical explanation.
The Output: It automatically deducts points from a Union Council's live "Trust Score" and flags "Chronic Hotspots" (Repeat Offenders) so municipal auditors know exactly which contractors are consistently failing.
How we built it We built Shehr AI with a modern, zero-budget, highly scalable stack:
Frontend: React.js (Vite) and Tailwind CSS, designed with a strict, authoritative Blue & White civic-tech design system.
Backend & Database: Supabase (PostgreSQL) handles our relational data (Union Councils, Claims, Disputes) and secure image storage.
The Digital Jury: We integrated the Google Gemini 3.5 Flash Vision API. We engineered strict prompts forcing the AI to evaluate visual discrepancies between two images and return structured JSON verdicts.
Geospatial Logic: We implemented custom JavaScript utilizing the Haversine distance formula to calculate coordinate radiuses, preventing duplicate spam by ensuring reports are properly geofenced.
Mapping: React-Leaflet with free OpenStreetMap tiles for zero-dependency GIS visualization.
Challenges we ran into Live AI Demo Reliability: Relying on live LLM APIs during a hackathon pitch is notoriously risky. We engineered a robust try/catch fallback architecture with a strict 5-second timeout. If the API lags due to network issues, the system falls back to a cached, pre-tested verdict, ensuring our live demo remains flawless.
Enforcing AI Constraints: Initially, the Vision AI would give overly conversational responses. We had to iterate heavily on our prompt engineering to force Gemini to act as a strict auditor and output parseable JSON format containing only a verdict and a 2-sentence explanation.
Spam Prevention: We realized citizens might spam the same pile of garbage. Building the Haversine distance algorithm to reject duplicate reports within a 50-meter radius was a challenging but necessary geospatial math hurdle.
Accomplishments that we're proud of Moving Beyond "Just an App": We are proud that we didn't just build a citizen reporting tool; we built an Enterprise Auditing Tool that the government can actually use to monitor contractor SLAs.
The Side-by-Side Arbitrator UI: Visually presenting the Government's claim against the Citizen's dispute, with the AI's verdict sitting right below them, creates an incredible "Wow" moment that perfectly captures our unique value proposition.
Execution Speed: Going from a raw concept to a fully functioning AI-integrated web app with live geospatial databases in just a few days.
What we learned Prompt Engineering is Code: We learned that crafting the right context, constraints, and JSON-structure demands for an LLM is just as critical as writing the React frontend.
Civic Tech Needs Trust: We learned that in government-facing technology, the tone of the UI matters immensely. Shifting our design to a professional, authoritative blue-and-white layout completely changed how the data feels.
Zero-Trust Architecture: We realized that assuming all user data (both from government workers and citizens) is potentially flawed or fake is the only way to build a truly robust auditing system.
What's next for Shehr AI The Anti-Fraud Hash Agent: We plan to implement Perceptual Image Hashing to prevent government contractors from uploading recycled or downloaded photos from their camera rolls to claim fake cleanups.
Financial SLA Penalty Calculator: Automatically converting a Union Council's low Trust Score into a recommended PKR financial penalty/deduction for the private waste contractor.
Scalability: Importing the official Punjab Bureau of Statistics GIS boundaries to instantly scale our map from 4 demo areas to all 274+ Union Councils in Lahore.
Built With
- css3
- geolocation-api
- github
- google-gemini
- html5
- javascript
- leaflet.js
- openstreetmap
- postgresql
- react
- supabase
- tailwind-css
- vercel
- vite
Log in or sign up for Devpost to join the conversation.