🧠Inspiration Cities are growing fast, but civic infrastructure isn’t keeping up. Potholes, broken ramps, blocked footpaths, and faulty elevators go unreported for weeks. Citizens often don’t know where to report, and authorities lack real‑time data to prioritize repairs. We wanted to turn every smartphone into a sensor and empower citizens to make their streets safer—instantly.
⚙️ What it does Path Aware is a real‑time hazard reporting and mapping platform.
Users snap a photo of any mobility hazard (pothole, blocked ramp, broken elevator, construction zone).
GPS coordinates are automatically attached.
Google Gemini AI analyzes the image, classifies the hazard type, and generates a short safety tip.
The hazard appears as a pin on a live city map.
Nearby users receive instant alerts (within 200m).
Authorities can view a dashboard with heat maps and statistics.
✅ Valid reports are saved. ❌ Irrelevant images (selfies, random objects) are rejected with a clear explanation.
🛠️ How we built it Frontend: React with Vite, Tailwind CSS for styling, Leaflet for interactive maps, react-webcam for camera access.
Backend: Node.js + Express, SQLite for lightweight storage, Multer for file uploads.
AI/ML: Google Gemini 2.0 Flash API for image classification and text generation.
Geolocation: Browser Geolocation API + Haversine formula for distance‑based alerts.
State management: React Context API (reports, theme).
Routing: React Router DOM.
Notifications: react-hot-toast.
The backend and frontend communicate via a REST API, with Vite proxying /api requests to the Node server.
🚧 Challenges we ran into Gemini API rate limits – The free tier allows only ~15–20 requests per day. We had to implement retry logic and fallback models.
Model availability – Older model names (e.g., gemini-1.5-flash) returned 404 errors. We debugged by listing available models and settled on gemini-2.0-flash-lite.
Leaflet marker icons – Default icons broke in production; we fixed by overriding icon URLs with CDN links.
Invalid image handling – The AI would sometimes classify random photos as a pothole. We extended the prompt to return an "invalid" type and prevented those from being saved.
SQLite concurrency – During high‑frequency testing, database locking occurred; we added proper error handling and serialized writes.
🏆 Accomplishments we’re proud of End‑to‑end working prototype within 36 hours, from idea to deployed demo.
Seamless Gemini integration – structured JSON output directly into our database.
Real‑time proximity alerts – users get notified only when they are within 200m of a reported hazard.
Dark mode & responsive UI – the map looks great on both desktop and mobile.
Rejection of invalid images with user‑friendly explanations, keeping the map clean.
📚 What we learned How to work with the new Google GenAI SDK and fallback to direct REST calls when needed.
The importance of prompt engineering – a well‑designed prompt can reduce false positives significantly.
Leaflet + React integration requires careful handling of marker icons and map events.
Rate limits are real – we learned to design for them (caching, retries, user feedback).
Geolocation watchPosition – continuously tracking a user’s location while showing live alerts is more complex than a one‑time fetch.
🔮 What's next for Path Aware WhatsApp bot – Citizens can report hazards by sending a photo to a WhatsApp number (no app download required).
ML‑based recurrence prediction – Use historical reports to predict where hazards are likely to reappear.
Municipality dashboard – Heat maps, ticket assignment, and resolution tracking.
Open API – Allow third‑party apps (navigation, smart city systems) to consume hazard data.
Multilingual support – Gemini already works in Assamese, Hindi, and English; we'll surface UI in local languages.
IoT sensor fusion – Integrate with smart streetlights and drainage sensors for automatic reporting.
Log in or sign up for Devpost to join the conversation.