-
-
"Fix Lahore — a bilingual civic intelligence platform for Smart City Hackathon Lahore 2026"
-
"Full Urdu localization with true right-to-left layout, not just translated strings"
-
"Simple onboarding gets citizens to their dashboard in seconds"
-
"Home: a live feed of nearby civic activity"
-
"Step 1 of citizen reporting — category, photo, and description"
-
Every report is auto-classified by AI - category, priority, and the right municipal department, with a Gemini→Groq→rule-based fallback chain
-
"Haversine-based duplicate detection — the same pothole reported ten times still counts once"
-
"A public, verifiable map of every geo-tagged, timestamped report"
-
"Issue trends and top problem areas, updated in real time"
-
"PS1 — One live dashboard combining OpenAQ, Open-Meteo, and OpenStreetMap data for any district"
-
"PS2 — A 48-hour pollution forecast that flags WHO/EPA threshold breaches before they happen"
-
"PS5 — Bilingual SMS alerts via Twilio reach residents without smartphones"
-
"PS4 — A simplified digital twin: buildings, green cover, and a heat-risk score for one block"
-
"City staff get a full triage dashboard with SLA tracking"
-
"Fully responsive PWA — install-to-home-screen and works offline in low-connectivity areas"
Inspiration
Lahore already has many of the building blocks of a smart city — Suthra Punjab tracks its waste-collection fleet, Punjab EPA operates air-quality monitoring stations, and PITB's One Map Punjab is bringing land and geospatial data together. But these systems largely operate in silos, leaving residents and city stakeholders without a single, live, citizen-facing view of what is happening across the city.
We saw an opportunity to connect those pieces.
Fix Lahore brings environmental data, civic issues, geospatial information, and neighbourhood-level insights together in one platform. Inspired by how cities such as Rio de Janeiro have used connected data to improve urban decision-making, we focused on building the missing layer between existing data sources and the people who need to act on them.
We also set one rule from day one: build only on data that is genuinely accessible today. No fabricated government APIs and no simulated "live" feeds. Every core data-driven feature in our prototype is built around publicly accessible sources, while the architecture remains ready to integrate official city systems when access becomes available.
What it does
Fix Lahore is a bilingual civic intelligence platform that connects Lahore's scattered public data into one actionable city view.
Rather than building five disconnected features, we connected all five City Intelligence problem statements into a single platform:
Real-Time City Intelligence (PS1) — Live air quality from OpenAQ, weather from Open-Meteo, and nearby hospitals, schools, and clinics from OpenStreetMap/Overpass are combined into one map-based view, giving users a unified picture of their district.
Air-Quality Forecasts & Alerts (PS2) — A 48-hour PM2.5 forecast from Open-Meteo's air-quality model identifies when WHO/EPA health thresholds are expected to be crossed. The system translates those forecasts into clear, plain-language advisories so residents can take action before conditions become hazardous.
Verified Citizen Reporting (PS3) — Residents can report civic issues with location and timestamps. Haversine-distance and category matching automatically identify likely duplicate reports, preventing the same pothole or issue from being counted multiple times.
Neighbourhood Digital Twin (PS4) — A simplified digital twin of a Gulberg block combines building footprints, green coverage, and population density into a neighbourhood-level heat-risk score, turning raw geospatial data into an actionable urban insight.
Bilingual SMS Alerts (PS5) — The same air-quality forecast can trigger bilingual Twilio SMS alerts, extending critical information to residents who may not have smartphones or reliable mobile data.
One platform. Five city-intelligence capabilities. Built around the people who live in Lahore.
How we built it
We designed Fix Lahore as a production-minded system rather than a collection of isolated hackathon demos.
Frontend: React 18 + TypeScript + Vite, Tailwind CSS v4, Leaflet for mapping, and Recharts for analytics. The platform supports full English/Urdu localization with genuine RTL layout switching and offline-first PWA behaviour using IndexedDB and a service worker.
Backend: Node.js + Express + TypeScript, with PostgreSQL through Prisma, JWT authentication, Zod request validation, and rate-limiter-flexible for abuse protection.
AI Complaint Classification: A fallback pipeline using Gemini 1.5 Flash first, Groq's Llama 3.2 Vision second, and a deterministic keyword classifier as the final fallback. This allows the reporting workflow to remain functional even when an AI provider is unavailable.
Open-Data Integration: OpenAQ v3, Open-Meteo, and Overpass/OpenStreetMap power the city's live data layer. Responses are cached with TTLs to reduce unnecessary requests to public APIs and improve reliability.
Alerts: Twilio powers the SMS pipeline, with an automatic dry-run/console mode when credentials are unavailable. This keeps the complete alert workflow testable without requiring live SMS spending.
We deliberately placed every external data source behind a swappable service interface. This means an official source such as EPA monitoring, Suthra Punjab fleet data, or One Map Punjab can replace or augment a public data source without requiring a frontend rebuild.
Challenges we ran into
The biggest challenge was working with Lahore's fragmented data ecosystem. Many official systems are not currently accessible to outside developers, so we needed Fix Lahore to be functional today without being locked into today's data sources.
That constraint directly influenced our architecture. Our city-data and forecast services communicate through generic data-source interfaces, allowing an official EPA feed or Suthra Punjab endpoint to replace or augment a public source later without changing the frontend contract.
We also made a deliberate decision to be precise about where AI is — and isn't — being used.
Our air-quality system uses real forecast data combined with transparent WHO/EPA threshold rules. We could have marketed this as "AI-powered prediction," but we chose explainability over buzzwords. For civic infrastructure, especially systems that communicate health and safety information, we believe users should be able to understand how an alert was generated.
Accomplishments we're proud of
- All five City Intelligence problem statements are addressed within one connected platform rather than five isolated demos.
- Live external data: dashboard values are powered by OpenAQ, Open-Meteo, and Overpass rather than seeded or randomized datasets.
- End-to-end SMS: the Twilio alert pipeline is functional from forecast detection through message delivery.
- True Urdu RTL support: the interface supports genuine English/Urdu localization and right-to-left layout switching.
- Offline-first experience: the PWA can retain core functionality and locally stored data when connectivity is unreliable.
- Future-ready architecture: the data layer is designed so official government feeds can be integrated later without fundamentally rebuilding the application.
What we learned
Building with multiple public APIs taught us that reliability has to be designed, not assumed. Rate limits, missing stations, timeouts, and inconsistent data are normal when working with external data sources, so every integration needed graceful fallbacks rather than relying only on the happy path.
We also learned that AI is not automatically the best solution for every problem. In civic infrastructure, a transparent and auditable rule-based system can sometimes be more trustworthy than a black-box model. The goal isn't to put "AI" everywhere — it is to use the right technology where it creates meaningful value.
What's next for Fix Lahore
Fix Lahore is designed to become more powerful as more real city data becomes available.
Integrate official city data — Work toward integrating Punjab EPA monitoring, Suthra Punjab fleet data, and PITB's One Map Punjab.
Expand the digital twin — Extend neighbourhood-level modelling beyond the initial Gulberg block to additional high-density and heat-vulnerable areas.
Reach more residents — Introduce persistent, self-service SMS subscriptions and explore USSD/IVR support for feature-phone users without internet access.
Build a dedicated forecasting model — Once sufficient historical air-quality data is collected from real-world deployment, train and validate a dedicated forecasting model rather than relying solely on external forecasts and threshold rules.
Our long-term goal is simple: make city intelligence accessible not only to people who can use a dashboard, but to every resident who needs it.
Built With
- express.js
- firebase
- framer-motion
- gemini
- groq
- indexeddb
- jwt
- leaflet.js
- node.js
- open-meteo
- openaq
- openstreetmap
- overpass-api
- postgresql
- prisma
- pwa
- react
- recharts
- tailwindcss
- twilio
- typescript
- vite
- zod
Log in or sign up for Devpost to join the conversation.