Inspiration
The tools we use to navigate cities are fundamentally static. Google Maps knows every permanent street but has no idea a power line came down an hour ago or that the main walkway is an ice rink this morning. That gap between what a map shows and what a city actually feels like is where accidents happen. I kept thinking, what if the community itself was the sensor network? That question became CityPulse
What it does
CityPulse is a real-time crowdsourced urban intelligence platform that turns citizens into city sensors and uses Gemini AI to help communities respond faster to local hazards. Users report three alert types, red safety hazards, blue mobility issues, and green community resources, which appear on a shared live map instantly. Gemini auto-classifies every report from plain text with no manual selection required. Critical red alerts trigger instant email broadcasts to every registered user, and a smart routing engine scores walking paths against the live hazard map to recommend the safest route.
How we built it
I built CityPulse entirely solo over 28 hours using Python and Flask for the backend, Supabase for the database and Google OAuth authentication, and Leaflet.js for the interactive map. Gemini 2.5 Flash powers the AI classification, city intelligence briefing, and trend detection. OpenRouteService handles pedestrian routing for the safe route scoring engine and Resend handles emergency email broadcasts. The architecture is modular with each feature in its own Flask Blueprint and Supabase real-time subscriptions powering live map updates across simultaneous users.
Challenges we ran into
Getting Supabase real-time subscriptions to reliably update the map across multiple simultaneous browser sessions required careful initialization ordering and several hours debugging race conditions. Gemini occasionally wraps JSON responses in markdown code blocks which breaks parsing silently, so I added a cleaning step that strips formatting before parsing with a safe fallback on every call. The safe routing math required implementing the Haversine formula from scratch to calculate real distances between GPS coordinates and buffer each route to detect nearby hazards.
Accomplishments that we're proud of
Building a fully functional real-time crowdsourced map with live updates, Google OAuth, and a production database entirely solo in 28 hours is something we are genuinely proud of. Integrating Gemini to auto-classify community reports from plain text with no manual input felt like the kind of seamless human-AI interaction that actually changes behavior. The smart safe routing engine doing real spatial math against a live hazard database to grade walking paths surprised us most with how well it worked under time pressure. Seeing two users on separate devices drop pins and watch each other's maps update instantly was the moment CityPulse stopped feeling like a hackathon project and started feeling like a real product.
What's next for CityPulse
Integration with municipal 311 systems would let verified community reports automatically generate official city work orders. A native mobile app would lower the reporting barrier further and anonymized aggregate data could be licensed to city planning departments as a real-time urban intelligence feed.
Built With
- css
- flask
- gemini
- html
- javascript
- openrouteservice
- python
- supabase
- tailwind
Log in or sign up for Devpost to join the conversation.