<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: nikhilpasupula</title>
    <description>The latest articles on DEV Community by nikhilpasupula (@nikhilpasupula).</description>
    <link>https://dev.to/nikhilpasupula</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4177237%2F1aee2149-360d-4e17-8682-46fc233ae8af.png</url>
      <title>DEV Community: nikhilpasupula</title>
      <link>https://dev.to/nikhilpasupula</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikhilpasupula"/>
    <language>en</language>
    <item>
      <title>AirWindow: Turning an AQI Number into a Decision, Built on AWS</title>
      <dc:creator>nikhilpasupula</dc:creator>
      <pubDate>Sun, 11 Oct 2026 14:55:27 +0000</pubDate>
      <link>https://dev.to/nikhilpasupula/airwindow-turning-an-aqi-number-into-a-decision-built-on-aws-1b59</link>
      <guid>https://dev.to/nikhilpasupula/airwindow-turning-an-aqi-number-into-a-decision-built-on-aws-1b59</guid>
      <description>&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;What it does&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;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.&lt;br&gt;
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.&lt;br&gt;
Whether to wear an N95 mask, and whether the air is getting better or worse.&lt;br&gt;
Tips in your language. English, Hindi and Telugu are pre-written, and Amazon Bedrock writes a short briefing in 11 Indian languages.&lt;br&gt;
Email alerts when the next few hours turn unhealthy.&lt;/p&gt;

&lt;p&gt;The same AQI affects people differently, so the bars in the chart are scaled for the person you pick.&lt;/p&gt;

&lt;p&gt;Fixing the forecast with TinyFish&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;How I used AWS&lt;/p&gt;

&lt;p&gt;The whole backend is serverless and defined in one AWS SAM template:&lt;/p&gt;

&lt;p&gt;API Gateway (HTTP API) is the public entry point, with throttling.&lt;br&gt;
Lambda has two functions: one serves the page and the plan API, and one runs on a schedule for TinyFish checks and alerts.&lt;br&gt;
EventBridge triggers the scheduled function every 3 hours.&lt;br&gt;
DynamoDB caches forecasts and station readings with TTL, so page loads never wait on slow web-agent work.&lt;br&gt;
SNS sends alert emails. Filter policies mean each person only gets alerts for their city and risk group.&lt;br&gt;
Bedrock writes the multilingual briefing from facts the planner has already calculated. If it is unavailable, the app falls back to pre-written tips.&lt;br&gt;
Systems Manager Parameter Store keeps the TinyFish API key encrypted.&lt;br&gt;
CloudWatch collects logs, and IAM gives each function only the permissions it needs.&lt;/p&gt;

&lt;p&gt;I also used boto3 and the AWS CLI for the code and setup.&lt;/p&gt;

&lt;p&gt;What I learned&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>python</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
