-
-
Live Swagger UI, all 8 endpoints
-
Severity 5/5 card — waist-deep 85 cm, all three modes blocked, subway flooded / vehicles stranded
-
Route check — "Minor water on this route", pins 1/2/3/5, Bike/Car/Walk, "Ankle-deep · 0.2 km ahead"
-
AWS serverless architecture slide
-
Ward dashboard — 11 active spots, 4 dangerous, 51 confirmations, ranked [Demo] list, severity heatmap
Inspiration
Every monsoon, the same thing happens in Chennai, Mumbai, Bengaluru and Delhi. Commuters drive into knee-deep water with no warning. Two-wheelers stall mid-street. People step into open drains they cannot see. Ambulances lose time on roads that were passable an hour ago.
The information exists, but it arrives as unverified WhatsApp forwards that are out of date by the time you read them and cannot be searched by location. Official flood maps are too coarse to tell you whether your street is under water right now.
We wanted to turn the phones already in everyone's pocket into flood sensors, and to put the result somewhere a commuter and a ward officer can both use.
What it does
- Report. A citizen photographs a waterlogged street. The photo goes to a vision model that returns structured JSON: water depth (ankle, knee, waist), severity 1–5, who can still pass (walking, two-wheeler, car), and hazards such as open drains or live wires — plus a one-line summary in Tamil, Hindi or English.
- Reject spam. Photos that are not of flooding are rejected outright, and Amazon Rekognition screens unsafe images before anything becomes public.
- Merge and map. Reports within 75 m of each other collapse into a single spot, so ten people photographing the same underpass do not create ten pins.
- Self-heal. Neighbours tap Still flooded or Cleared. Three "cleared" votes close a spot, and reports expire on their own through DynamoDB TTL — the map degrades gracefully instead of filling with ghosts.
- Route check. Long-press a destination and the app draws a real road route through Amazon Location Service, then tests it against every live report. The verdict depends on how you travel: knee-deep water is "Avoid" on a scooter and "Caution" in a car.
- Ward dashboard. A live web page ranks hotspots by severity so municipal officers know where to send pumps first.
- Safety. One-tap calls to 112 and the Greater Chennai Corporation flood helpline (1913), plus monsoon safety guidance.
The whole app UI ships in Tamil, Hindi and English, with first-launch onboarding.
How we built it
Everything runs on AWS in ap-south-1 (Mumbai), deployed from a single AWS SAM template:
| Service | Role |
|---|---|
| AWS Lambda (Python 3.12) | Runs the FastAPI backend through Mangum, scaling to zero |
| Amazon API Gateway (HTTP API) | HTTPS entry point with throttling and CORS |
| Amazon Bedrock (Nova Lite, Converse API) | Multimodal photo assessment |
| Amazon Rekognition | Content moderation before publication |
| Amazon DynamoDB | Reports, with a geohash GSI for nearby and route queries, and TTL auto-expiry |
| Amazon S3 | Private, encrypted photo storage with presigned URLs and a 7-day lifecycle rule |
| Amazon Location Service | Real road routes for scooter, car and walking |
| CloudWatch + X-Ray | Structured JSON logs, an error alarm, and end-to-end tracing |
The client is a Flutter Android app (flutter_map, geolocator, image_picker, http, shared_preferences, url_launcher). The backend is FastAPI + Pydantic with 15 pytest tests that mock AWS with moto — including the moderation path, the merge rule, the vote-to-close rule, and both AI provider paths.
Challenges we ran into
Bedrock was blocked at the account level. Our AWS account was still finishing verification, and Bedrock returns Operation not allowed until that clears. Rather than fake the AI step or drop it, the backend calls Bedrock first and, only if Bedrock refuses, sends the identical prompt to Google Gemini. Every stored report records which provider assessed it in an ai_provider field, so the data never lies about its own provenance. When verification completes, Bedrock takes over with no redeploy.
Making the map trustworthy. A crowd-sourced flood map fails in two directions: stale pins that send people on detours around water that drained hours ago, and duplicate pins that make one underpass look like a city-wide flood. DynamoDB TTL handles the first, the 75 m merge radius handles the second, and neighbour voting handles the middle case where a spot is genuinely borderline.
Cost control. A serverless stack that is idle most of the year should not cost money. Lambda scales to zero, S3 objects delete themselves after seven days, DynamoDB TTL removes expired rows, and the dashboard is a single Lambda-rendered page with no separate frontend hosting bill.
Accomplishments we are proud of
- A genuinely deployed stack — the API, the Swagger docs and the ward dashboard are live right now, not screenshots.
- Route verdicts that change with your vehicle, which is the difference between useful and annoying.
- 15 backend tests against mocked AWS services, so the deploy is not the only test.
- Six languages in the assessment prompt, three in the app UI.
- A working APK that installs on any Android phone from min SDK 21.
What we learned
That a hackathon AI feature is only as good as its failure path. The Bedrock block forced us to build the fallback and the provenance field, and the project ended up more honest and more robust because of it. We also learned that geohash-prefix queries plus a GSI do most of the work of a "real" geospatial database at a fraction of the cost.
What's next
- SMS and WhatsApp alerts for subscribed streets (Amazon SNS / Pinpoint), so people who are not looking at a map still get warned.
- Fusing IMD rainfall forecasts with historical reports to predict which streets flood before the rain arrives.
- A data feed for the Greater Chennai Corporation's command centre, so the crowd data turns into drainage repair priorities.
Built With
- amazon-api-gateway
- amazon-bedrock
- amazon-cloudwatch
- amazon-dynamodb
- amazon-location-service
- amazon-nova
- amazon-rekognition
- amazon-web-services
- aws-cloudformation
- aws-lambda
- aws-sam
- aws-x-ray
- dart
- fastapi
- flutter
- google-gemini
- leaflet.js
- mangum
- moto
- openstreetmap
- pydantic
- pytest
- python
Log in or sign up for Devpost to join the conversation.