AWS Builder Center

BreatheBell: A Serverless AWS App That Tells Schools When Children Can Play Outside

An AWS-built app that turns live air quality into a clear Allowed, Limited, or Indoor only decision for each school age group, with alerts, a district view, and a printable parent notice.

On a smoggy morning, a school principal faces a hard question. Is it safe for the children to go out for PE? Is it safe for Class 2? What about the children with asthma? Most of the time the answer is a guess. Some schools keep everyone inside all day. Others ignore the air completely.
I built BreatheBell to give a clear answer. It is a web app that turns live air quality into a simple decision for each school. I built it solo for the AWS Environmental Hacks hackathon, in Track 01: Air.

What BreatheBell does

For every school, BreatheBell shows one of three results for each age group: Allowed, Limited, or Indoor only. The groups are Primary, Middle, Senior and Sensitive students. Younger and sensitive children get a stricter limit. The result for the whole school follows the strictest regular group.
It also gives:
  • A bell schedule strip, so teachers can see which periods are safe.
  • A 48-hour air quality chart, with the best two-hour window for outdoor play.
  • A district view, so an education officer can see all schools in one place, with an estimate of student-hours spent in unsafe air.
  • A one-page circular that a principal can print and send to parents.
  • Email alerts when a school turns to Indoor only, and a daily 7 AM digest.

How I built it on AWS

The work is small and scheduled, so I chose a fully serverless design. I used AWS SAM, so one template deploys the whole system.
  • AWS Lambda has three functions. One is the API that answers the website. One runs every hour and checks every school. One prepares the morning report.
  • Amazon API Gateway is the front door. The website sends requests here, and they go to the API function.
  • Amazon DynamoDB stores schools and air history. Old history deletes itself after seven days using TTL.
  • Amazon EventBridge is the clock. One rule wakes the checker every hour. Another starts the digest at 7 AM India time.
  • Amazon SNS sends the email alerts and the daily digest.
  • AWS Amplify Hosting serves the website.
The air data comes from the Open-Meteo Air Quality API. The API function reads PM2.5 values and the forecast, compares them with a limit for each age group, and returns the decision. These limits are simple rules I chose for this prototype. They are not official medical guidance.

What went wrong, and what I learned

Place names were my biggest problem. When I searched for the town "Mesra", the geocoder returned a place in Algeria. I fixed it by searching India first and by letting a school add its exact latitude and longitude. I also learned that the geocoder can still pick the wrong town when only a city name is given, so exact coordinates are safer.
As a first-time AWS user, the SAM guided deploy prompts confused me, and I set the region wrongly once. After that, SAM made things easy. When I renamed the project, I could rebuild the whole stack in minutes.

What is next

I want to add SMS or WhatsApp alerts for parents, school logins so each school manages only its own data, and official CPCB station data.

Try it

The schools in the demo are sample data, and the impact number is an estimate.
Built by Bhavini Awasthi, BTech CSE, BIT Mesra.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article