DEV Community

Ishlok Dwivedi
Ishlok Dwivedi

Posted on

AQI

What I Built

AeroGemma is a small web app that answers one question: "Can I go outside right now?"

It pulls live air quality readings (PM2.5, PM10, ozone, NO₂, SO₂, CO) for your location or any city, and shows a colour-coded verdict from green to red. Then Google's open-weight Gemma model reads those numbers and writes plain advice for what you'd actually do outside: running, gardening, walking the dog, or taking kids to the playground.

For the "Ghost in the Machine" theme, I started from the fact that air pollution is the original ghost. You can't see PM2.5 or ozone, but they're there, and they decide whether a run is good for you or bad for you. A page of numbers doesn't help most people much. AeroGemma uses Gemma as the voice that turns those invisible readings into something a normal person can act on.

Demo

You can also run it locally in under a minute (see the Code section).

Code

🌿 AeroGemma — Touch Grass with AI-Powered Air Quality

Submission for Hacktoberfest Open-Source AI Challenge: Week 1 ("Touch Grass")
Prize Category Track: 🏆 Best Use of Gemma (Google's Open-Weight Model)
Live GitHub Repo: IshlokDwivedi-coder/AQI_System
Author: Ishlok Dwivedi (@ishlokdwivedicoder)


📖 Overview

The theme of this week's Hacktoberfest challenge is Touch Grass: build something with open-source AI at its core that gets people away from screens and out into the real world.

While spending time in nature (hiking, running, gardening, birding) is vital for physical and mental health, poor air quality (elevated PM2.5, ground-level ozone, and chemical smog) can turn a refreshing outdoor workout into a health hazard—especially for children, older adults, and those with respiratory conditions.

AeroGemma solves this dilemma. It is a sleek, intuitive, and responsive web application that fetches real-time atmospheric readings from global monitoring stations and pairs them with Google's open-weight Gemma model (gemma-4-26b-a4b-it…

How I Built It

  • Open-source AI: Google's Gemma (gemma-4-26b-a4b-it) writes the activity advice. In the settings you can switch to gemma-4-31b-it or use your own Google AI Studio key.
  • Data: Open-Meteo's air quality and weather API. It's free, open, covers the whole world and needs no API key.
  • Frontend: vanilla HTML, CSS and JavaScript. The whole theme changes colour with the AQI level using CSS custom properties.
  • Server: a tiny Node.js server with no dependencies (node server.js), or you can just open index.html.
  • Fallback: if Gemma can't be reached, an offline rule engine still gives a verdict and basic advice from the pollutant levels, so the app never shows a blank screen.

Right now Gemma is called through Google AI Studio, so the offline mode uses the rule engine, not a local Gemma. Running Gemma fully on-device is the next step I want to take.

Why Does Open Innovation Matter?

AeroGemma costs nothing to run: free data, a free-tier model, and no backend to pay for.

Open weights also matter for what this app is for. People use it to decide things about their health and where they go, and with an open model that information doesn't have to be sent to a company's servers if someone self-hosts it. A closed API could never promise that, and it would also disappear if the pricing or rate limits changed. Open weights mean a tool like this can be forked, run on a laptop near a trailhead, and kept alive by anyone.

Top comments (0)