Inspiration
Every winter, families in North Indian cities check an AQI number and still don't know what to do: Should the kids play outside? Is a mask needed? When is the best time to step out? We wanted an app that turns the number into a plan a family can actually follow, and explains the impact of each choice.
What it does
AirSaathi takes a city (or the user's location), the household (children, older adults, asthma, adults only), the usual commute and the home setup (AC, purifier, neither). It fetches live PM2.5 and a 24-hour forecast from Open-Meteo, estimates an AQI, and suggests the best time to go out today. A rule engine then gives mask guidance, outdoor timing, commute advice, indoor air tips and a lower-emission swap, each with a clearly labelled illustrative impact estimate. It works in English and Hindi, and Gemini can optionally rephrase the plan in friendlier words.
How we built it
Static HTML, CSS and vanilla JavaScript, no backend. Decisions come from a deterministic rule engine so advice stays predictable and safe. Gemini only rewrites the output and never adds advice. Only the air data is cached for 30 minutes; the plan is recomputed on every submit. We built it with GitHub Copilot (Agent mode) in VS Code, planned and reviewed it with Claude, and covered it with 36 Node unit tests, ESLint and Prettier. Security includes a strict CSP, input validation, request timeouts and text-only rendering.
Challenges we ran into
A stale-cache bug made results stay the same after changing inputs. We fixed it by caching only the API response, keyed by city, and always recomputing the plan. Open-Meteo gives PM2.5, not the official multi-pollutant CPCB AQI, so we labelled the number an estimate everywhere. We also learned that refactoring for code quality does not always change an AI evaluator's score.
Accomplishments that we're proud of
An AI evaluation score of about 96/100 with top marks in efficiency and problem alignment, accessibility features such as a skip link, live regions, keyboard focus and reduced-motion support, honest limitations in the README, and a working app with sample-data fallback when the API is down.
What we learned
Put decisions in rules and use AI only for wording. Test in a real browser, since unit tests miss UI wiring. Be honest about what an estimate can and cannot say. And never change code without clear feedback on what to fix.
What's next for airsaathi-urban-air-quality
Add PM10, NO2 and other pollutants for an official-style AQI, hyperlocal readings, more Indian languages, an installable offline version, saved household profiles, daily alerts, and impact factors based on India-specific data.
Built With
- accessibility
- css3
- github
- github-copilot
- google-gemini
- html5
- javascript
- node.js
- open-meteo
