cd /news/ai-tools/janela-a-local-gemma-tells-you-when-… · home › topics › ai-tools › article
[ARTICLE · art-147201] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Janela — a local Gemma tells you when to go outside (and why)

A developer built Janela, an open-source local weather-window planner that pairs a Spring Boot API and Open-Meteo forecast data with a deterministic Java WindowScorer to rank the best hours for outdoor activities, then uses a local Gemma 3 4B model via Ollama only to phrase the explanation. The design keeps all arithmetic and time selection in tested Java code (118 JUnit tests), feeding the model pre-interpreted fields like rating, comfort and UV level, with a template fallback when Ollama is unavailable.

by read5 min views2 publishedOct 7, 2026

This is a submission for the Hacktoberfest 2026 Open-Source AI Challenge, Week 1: "Touch Grass".

In most of Brazil, "I'll go for a run later" isn't about frost or snow. It's about dodging a UV index of 11 at noon, a feels-like of 38 °C at 2 PM, and the thunderstorm that shows up at 5 PM almost every summer afternoon. The weather app has all of that data. It just doesn't tell you when to go.

Hina from Weathering With You could pray for a sunny window. The rest of us have to read the forecast.

Janela (Portuguese for window) does that for you. You give it a city, an activity (run, walk, bike, picnic, gardening, or an outdoor workout at the square's gym), how long you want to be out, and how many days ahead to look. It answers with:

It works in Portuguese and English (°F and mph in English), and searches are shareable links.

🏃 Run 🚶 Walk 🚴 Bike
10–22 °C feels-like. Form not included. Janela finds the window. Finding the park is on you. Pick the cool hour, then draft behind your friends.
🧺 Picnic 🌱 Gardening 💪 Square gym
18–28 °C feels-like. Bring enough for Goku. Domain Expansion: Vegetable Garden. The springtime of youth starts at 06:00.

Lain lived in the Wired. Janela is for the rest of us, who occasionally need to log off.

city + activity ──▶ Spring Boot API ──▶ Open-Meteo (geocoding + hourly forecast)
                         │
                         ▼
                  WindowScorer (plain Java, unit-tested)
                         │  top 3 windows, already ranked
                         ▼
               Ollama up? ── yes ──▶ Gemma writes the explanation
                         └── no ───▶ template writes it instead

This was the one rule I set before writing any code: the model never picks a time and never does math. Java is Senku here: it does the science. Gemma just presents the results.

Small models (I'm using gemma3:4b) are great at turning data into friendly sentences and bad at arithmetic. If I asked Gemma "when should I run in Recife tomorrow?" with a raw forecast, it would answer confidently, and sometimes wrongly.

A 4B model doing arithmetic: full confidence, questionable results.

So all the deciding happens in a deterministic domain:

All of that is covered by JUnit tests (118 on the backend), with an injected Clock so "drop the hours that already passed" is testable too.

The interesting part was learning what a small model needs to not make things up. My first prompts sent ISO timestamps and raw numbers, and Gemma would echo 2026-10-07T17:00, call UV 0.6 "high", and praise window #2.

gemma3:4b looking at UV 0.6, before I pre-digested the payload.

What fixed it was doing the interpreting in Java and letting the model only reword:

{
  "best": {
    "rating": "great",
    "day": "Thursday, Oct 8",
    "start": "06:00",
    "end": "07:00",
    "temperature": 83,
    "comfort": "hot",
    "uvIndex": 0,
    "uvLevel": "low",
    "rainChancePercent": 6,
    "rainLevel": "low",
    "wind": 5,
    "reasons": ["before the day's heat peaks at 13:00"]
  },
  "alternative": { "rating": "fair", "day": "Friday, Oct 9", "start": "17:00", "end": "18:00", "…": "…" }
}

rating is the same word the screen shows next to the score, plus comfort, the WHO UV category and rainLevel), so Gemma never decides what "hot", "low chance" or "ideal" means;reasons are the window's advantages The prompt then forbids the specific failures I saw in testing: inventing a beach or a park, saying "today" about a window two days out, writing JSON field names into the text, or describing a 33 °C afternoon as "pleasant".

A prompt is a request, not a guarantee, so Java also reads the reply before showing it. Any time it wasn't given, a 12-hour clock, a field name, an invented beach, "pleasant" for a hot hour, "ideal" for a fair window or a missing 🌿 line gets the reply rejected, and Gemma gets one more try with the mistake named. It usually fixes it, and on my laptop the retry costs 2–4 seconds.

If the second try still breaks a rule, or Ollama is off or slow (30 s timeout), a template writes the text and the UI labels it as such instead of pretending.

gemma3:4b via OLLAMA_MODEL=gemma3:12b and you're done. Open weights mean the app isn't tied to one vendor's pricing or deprecation schedule. Best Use of Gemma. Gemma 3 (4B) runs locally through Ollama and writes every recommendation, in Portuguese or English. The project is built around what a small open model is good at (language) and keeps it away from what it isn't (math and decisions).

Find your window to touch grass.

Janela (Portuguese for window) finds the best time windows in the next few days for an outdoor activity — running, walking, cycling, a picnic, some gardening, a workout at the square's outdoor gym — based on what actually matters in a tropical climate heat, UV index, afternoon storms and wind.

Then a local open-weight model (Gemma, via Ollama) turns those numbers into a short, human recommendation and a tiny "touch grass" challenge. No API keys, no per-query costs, and it still works if the model is offline.

Built for the Hacktoberfest 2026 Open-Source AI Challenge: Week 1 — "Touch Grass".

In much of Brazil, "go for a run" isn't about frost. It's about dodging a UV index of 11 at noon and the thunderstorm that shows up at 5 PM. Weather apps give you the data; Janela tells you…

Weather data by Open-Meteo (CC BY 4.0) · Gemma by Google · Spring AI and Ollama · Archivo typeface by Omnibus-Type · country flags from country-flag-icons, Brazilian state flags from Wikimedia Commons. Anime GIFs belong to their respective creators and studios.

── more in #ai-tools 4 stories · sorted by recency
── more on @janela 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/janela-a-local-gemma…] indexed:0 read:5min 2026-10-07 · —