
Three days, one question: what should I do about the air today?
How Team Qubits built Saans Compass for the WeMakeDevs x AWS Environmental Hacks: a serverless app that reads the air where you are, hour by hour, and turns it into a personal plan for your day. What we built, how it runs on AWS, and what broke along the way.
Picture a parent in Delhi on a November afternoon. Their son has asthma, the AQI outside is 340, and school has cricket practice at four. Should he go?
Open any air app and you get a number. Or a colour. Or a map full of dots. What you don't get is an answer.
That gap is where we started. When the WeMakeDevs x AWS Environmental Hacks opened its Air track, our team, Qubits, knew what we wanted to build. Not another AQI dashboard. Something that could answer that question.
We called it Saans Compass. Saans is Hindi for breath.
Day one: what does "personal" actually mean?
We started with people, not code. We wrote down real days: a food delivery rider in Noida working 11 am to 10 pm, a Class 4 student who walks to school, a retired teacher who walks in the park at dawn, a software engineer who drives to Gurugram. For each one we asked: what would they actually need to know this morning?
The answers were never "the AQI is 312." They were things like:
- Take your break between 3 and 5, the air is cleanest then.
- Skip the evening walk today, go at 2 pm instead.
- Your car is fine today, but BS-III petrol cars are off the road from Stage III.
- Keep the windows shut after 7 pm and run the purifier in the bedroom.
So that became the product. You describe your day in your own words, and Saans Compass works out what kind of day it is (we ended up with 19 of them), reads the air near where you start and where you're going, hour by hour, and gives you back a plan. Age and health conditions change your limits, so someone with asthma gets a stricter plan than a healthy twenty-year-old.
Day two: building it on AWS
We wanted the whole thing serverless and cheap enough that it would never surprise anyone with a bill. One AWS SAM template, deployed to Mumbai (ap-south-1). Here's how a request flows:
- You open the site. Amazon API Gateway hands the request to an AWS Lambda function running a small Flask app.
- The Lambda checks Amazon DynamoDB for fresh air data. Station readings and forecasts are cached there with a TTL, so we don't hammer the data sources and old rows clean themselves up.
- If you're signed in with Amazon Cognito, your saved profile and your weekly diary come from the same DynamoDB table.
- For trips, Amazon Location Service calculates alternative routes, and we score each one by the air along it multiplied by the minutes you spend there. If your usual route is bad and another one is clearly cleaner, the plan tells you to take it.
- Delhi's GRAP rules (the graded restrictions that kick in as pollution worsens) are written as Cedar policies. Every "Not allowed" or "Advised against" comes from a rule and names its clause. If no verified rule covers something, the app says "Check the official order" instead of guessing.
- The personal advice and the Ask Saans chat are written by an AI model from the plan's facts. Amazon Polly reads them aloud, and Amazon Translate turns the whole page into Hindi.
Behind that, Amazon EventBridge Scheduler wakes a second Lambda at 6 am and 7 pm to email area alerts through Amazon SNS. API keys live in AWS Systems Manager Parameter Store, and Amazon CloudWatch, AWS X-Ray and an AWS Budgets alarm keep an eye on everything.
Day three: everything that broke
Hackathons are mostly about what goes wrong. Ours was no different.
The government data feed went quiet. India's live station data comes through data.gov.in, and for long stretches it simply refused connections from the cloud. So we added a second station network as a backup, and a forecast model behind that. The page always says which one you're looking at, because a guess dressed up as a measurement is worse than no data at all.
Our AI provider wasn't available. We built Amazon Bedrock in as a first-class option, but model access was blocked on our account during the hackathon. The live site runs on Google Gemini instead, and switching to Bedrock is one deploy parameter.
The AI got a number wrong. While preparing our demo, we caught the summary calling an AQI of 218 "moderate". On India's scale, 218 is Poor. The cause was subtle: the model saw several AQI numbers but only one band word, and paired them up wrongly. Now every number reaches the AI with its band attached, and a small check fixes any band word that doesn't match its number before you see it. It taught us the rule we followed everywhere else: let the AI explain, never let it decide. The rules come from Cedar, the numbers come from the data, and the AI only puts them into words.
People don't all commute. Our first version assumed everyone travels. Then we thought about the student at school all day and the grandmother at home. So we added one-place days, with an hourly window planner that tells you when to air the rooms and when to keep them shut.
What it feels like now
Open Saans Compass on a bad morning and it doesn't just say the air is Poor. It tells you the cleanest hours to step out and which of your plans to move. It shows the one GRAP rule that changes your day and how much less PM2.5 you'll breathe if you follow the plan. Ask it "I'm taking my students to Noida by bus, when should we leave?" and it looks up the air in Noida and answers with times.
And for that parent? The plan would say: practice at four falls in the worst stretch of the day. If it can move to two, he can play. If not, this is a day to sit out.
That's the kind of answer we wished existed.
What's next
- Switch the AI to Amazon Bedrock once model access comes through.
- Run the Cedar rules in Amazon Verified Permissions, so the GRAP policies can be updated without a redeploy.
- Learn from past forecasts and readings to correct the forecast model for each neighbourhood.
- Grow beyond Delhi-NCR's rules to other cities' action plans.
Try it
- Live site: Saans Compass
We can't clean the air with an app. But we can help one person breathe a little less of it today. That felt like a weekend well spent.
Team Qubits, WeMakeDevs x AWS Environmental Hacks, Bharat Builds Tour 2026.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article