Every morning in Indian cities, millions of people check the air quality and see a number like “AQI 168”. Then they are left guessing. Is it safe to open the window? Can my child go for a walk? Should my father with asthma stay in?
I’m Nikhil, a third-year B.Tech student, and for the Air track I built AirWindow: a free web app that turns the air-quality forecast into an hour-by-hour plan for one person.
What it does
You enter a city and pick who the plan is for: a healthy adult, a child, an older adult, someone pregnant, someone with asthma, or an outdoor worker. AirWindow then shows:
When to open your windows and when to keep them shut. If the whole day is bad, it finds the least-bad hour for a 10-minute air change.
The best slot for a walk, run or commute. You breathe about 2.5x more air walking and 5x more running than at rest, so running has stricter limits.
Whether to wear an N95 mask, and whether the air is getting better or worse.
Tips in your language. English, Hindi and Telugu are pre-written, and Amazon Bedrock writes a short briefing in 11 Indian languages.
Email alerts when the next few hours turn unhealthy.
The same AQI affects people differently, so the bars in the chart are scaled for the person you pick.
Fixing the forecast with TinyFish
Air-quality forecasts are model estimates, and real monitoring stations are closer to the truth. But stations publish on web pages, not on a free API.
So a scheduled job uses the TinyFish Web Agent. I give it a station page URL and a plain-English goal: “return the current AQI and main pollutant as JSON”. The result is cached, and the planner nudges the forecast toward it, fading the correction over 6 hours. It never lowers the risk by more than half the gap, because under-warning is worse than over-warning.
How I used AWS
The whole backend is serverless and defined in one AWS SAM template:
API Gateway (HTTP API) is the public entry point, with throttling.
Lambda has two functions: one serves the page and the plan API, and one runs on a schedule for TinyFish checks and alerts.
EventBridge triggers the scheduled function every 3 hours.
DynamoDB caches forecasts and station readings with TTL, so page loads never wait on slow web-agent work.
SNS sends alert emails. Filter policies mean each person only gets alerts for their city and risk group.
Bedrock writes the multilingual briefing from facts the planner has already calculated. If it is unavailable, the app falls back to pre-written tips.
Systems Manager Parameter Store keeps the TinyFish API key encrypted.
CloudWatch collects logs, and IAM gives each function only the permissions it needs.
I also used boto3 and the AWS CLI for the code and setup.
What I learned
Separating the fast path (reading cached data) from the slow path (web-agent calls on a schedule) kept the app responsive and the cost low. I also kept the planning logic as pure Python with no network or AWS calls, so I could write 24 automated tests for it.
There are honest limits. The forecast is a regional model, a station can be kilometres from your street, and the station pages use the US AQI scale rather than India’s CPCB scale. This is general guidance, not medical advice.
Top comments (0)