# SafeAir Walk: Find Your Clean-Air Window to Step Outside Today

> Source: <https://dev.to/abhinavnayak21/safeair-walk-find-your-clean-air-window-to-step-outside-today-4o94>
> Published: 2026-10-10 17:38:17+00:00

*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass](https://dev.to/challenges/hacktoberfest-week1-2026-10-05)*

**SafeAir Walk** tells you the single best 1-hour window to step outside today — based on real air quality forecasts and heat — tailored to your health profile. Then a local open-source AI explains *why* in plain language, in your language of choice.

Air pollution and heat are invisible threats that people routinely ignore because the data is buried in dense charts. SafeAir Walk turns hourly AQI + apparent temperature forecasts into one clear, colour-coded verdict:

It is built for **four health profiles**: General, Child 👶, Elder 👴, and Asthma / Respiratory 💨 — each with tighter safety thresholds where it matters. The app uses your GPS or lets you search any city, then streams a warm, practical 2-sentence AI explanation — not a wall of warnings, just what to do and why.

The whole idea is to get people *off the screen* and safely *into the world*. When conditions are good, SafeAir Walk simply says "Go for it" and gives you a time. When they're bad, it suggests an indoor alternative and shows when tomorrow looks better.

No sign-ups. No API keys. No ads. Just open data and a fast, private Ollama LLM.

🌐 **Live app:** [https://safeair-walk.onrender.com/](https://safeair-walk.onrender.com/)

Search your city (or tap "Use my location") and you'll see:

Find your clean-air window to go outside. Checks AQI and heat for your area and picks the best 30–60 min window today.

**Stack:** React + Vite + Open-Meteo (no API key) + Ollama (local AI, optional)

```
pnpm install
pnpm dev
# Windows PowerShell
$env:OLLAMA_ORIGINS="*"; ollama serve
```

The app auto-detects Ollama and uses it. Falls back to templates if offline.

Two services:

`safeair-ollama`
`hf-space/` folder:
`Dockerfile`` hf_start.sh``README.md`

```
https://YOUR-HF-USERNAME-safeair-ollama.hf.space
```

`curl https://YOUR-HF-USERNAME-safeair-ollama.hf.space/api/tags`
The AI layer runs entirely on **Ollama with open-weight models** — no external proprietary APIs, no OpenAI, no Anthropic.

`qwen2.5:1.5b`` qwen2.5:7b` — ultra-fast open-weight models capable of running seamlessly on consumer hardware.`ollama serve`, exposing a streaming `/api/generate` and `/api/tags` endpoint with CORS enabled (`OLLAMA_ORIGINS=*`).` ReadableStream` and `TextDecoder` to render tokens with a real-time typing effect.
To guarantee safety and scientific consistency, SafeAir Walk does **not** rely on LLM guesswork for health boundaries. All safety decisions are evaluated deterministically in `src/safeair-core.js` → `PROFILES` before any prompt is generated:

| Profile | GO | SHORT | SKIP | 
|---|---|---|---|
| **General** | AQI ≤ 100, Feels like ≤ 32°C | AQI ≤ 150, Feels like ≤ 36°C | Above thresholds | 
| **Child** | AQI ≤ 75, Feels like ≤ 30°C | AQI ≤ 100, Feels like ≤ 34°C | Above thresholds | 
| **Elder** | AQI ≤ 75, Feels like ≤ 30°C | AQI ≤ 100, Feels like ≤ 34°C | Above thresholds | 
| **Asthma** | AQI ≤ 50, Feels like ≤ 32°C | AQI ≤ 100, Feels like ≤ 36°C | Above thresholds | 

`pnpm install && pnpm build`).
| Layer | Technology | Cost | 
|---|---|---|
| AI Engine | Ollama ( `qwen2.5` ) | Free & Open Source | 
| Web App Hosting | Render Static Site | Free | 
| Weather & AQI | Open-Meteo API | Free, no key required | 
| Geocoding | Open-Meteo Geocoding API | Free, no key required | 

With a closed API, I would have had to pay per token, accept rate limits, and transmit every user's health profile and location data to an external provider's servers.

Open innovation with Ollama made three critical things possible:

`temperature`, `num_predict`), token streaming, and response structure. There are no unexpected model deprecations, forced safety overrides, or arbitrary rate limit throttling.
Open innovation turned what would normally be an expensive, privacy-invasive cloud service into a fast, private, community-owned tool that gets people safely outdoors.

`qwen2.5`) with streaming API served entirely via Ollama
