DEV Community

Bhushan Vidhate
Bhushan Vidhate

Posted on AI-assisted

Horizon: a local AI sky planner that tells you when to step outside

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

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

#hf26challenge #devchallenge #opensource #ai

Screenshot of Horizon’s daily outside recommendation

Repository: github.com/bhushanvidhate-27/horizon

Live demo: horizon-bhushanvidhate-27.onrender.com

What I Built

Horizon is a daily outdoor planner that answers one simple question:

When is the best time for me to go outside today, and what can I see in the sky?

Enter a location and Horizon combines weather forecasts with astronomy data to recommend the best one-to-three-hour window for being outdoors. It considers temperature, rain probability, wind, cloud cover, UV, sunrise and sunset, Moon phase, visible planets, constellations, and upcoming sky events.

The result is intentionally short: a useful recommendation, a few things to look for, and a reason to put the phone away.

For example (real run for Hyderabad):

Your best outside window is 04:00–07:00

Weather: Clear sky, 26Β°C (feels 27Β°C), 0% chance of rain, wind 5 km/h, 0% cloud
Sun: up 06:08 / down 17:58
Moon: New Moon (0% lit) β€” dark skies, ideal for stargazing
Look up for: Aquila, Lyra, Cygnus, Sagittarius, Pegasus
Enter fullscreen mode Exit fullscreen mode

Horizon chose that pre-dawn window because clear weather plus a New Moon creates the darkest, starriest conditions of the day. The scoring deliberately balances human comfort with what the sky actually has worth looking at.

Who It’s For

Horizon is for people who want a reason to get outside without another screen-heavy app.

  • Busy people who need one clear sentence (β€œgo out at 6 p.m.”) instead of a dashboard.
  • Casual stargazers who don’t know what’s overhead tonight but would love a reason to look.
  • Walkers, runners, and remote workers who benefit from a nudge at the nicest, clearest part of the day.

The screen is only the starting point. The real goal is to close the tab and look up.

Demo

Code

GitHub logo BhushanVidhate-27 / horizon

hactoberfest dev challenge week 1 submission

πŸŒ‡ Horizon

CI License: MIT Python 3.10+ Tests

A daily outside alert & sky event planner. Horizon tells you the best time to step outside today, what interesting things are happening in the sky, and then nudges you to put the phone away and actually go look.

It's built with the "Touch Grass" spirit: a short interaction that leads to a real-world experience. Ask once, then leave your phone in your pocket.

Submission for Hacktoberfest 2026 β€” Open-Source AI Challenge, Week 1: Touch Grass Brand-new project, built within the challenge window (Oct 5–11, 2026). Any commits after the Oct 11, 2026 11:59 PM PDT deadline will be noted here as required.

Horizon web UI


✨ What it does

  • Best weather window β€” scores every 1–3 hour block of the day using Open-Meteo data (temperature, rain chance, wind cloud cover, UV) and picks the nicest window to be outside.
  • Sky events β€” uses Skyfield to compute for your location:…

Horizon is an MIT-licensed, self-contained Python project. Its core works with zero paid APIs:

  • Open-Meteo β†’ weather + geocoding
  • Skyfield β†’ sunrise, Moon phase, planets, constellations, meteor showers, calendar events
  • Gemma (open weights) β†’ local narration via Ollama (or hosted via OpenRouter / AI Studio / HF)
  • Deterministic template narrator + local SQLite when no model or database is configured

Optional partner integrations are auto-detected and never required:

horizon/
β”œβ”€β”€ agent.py      # pipeline: location β†’ sky β†’ weather β†’ news β†’ narration β†’ voice β†’ storage
β”œβ”€β”€ sky.py        # Skyfield astronomy
β”œβ”€β”€ weather.py    # Open-Meteo window scoring
β”œβ”€β”€ llm.py        # Gemma via Ollama / OpenRouter / AI Studio
β”œβ”€β”€ narrator.py   # deterministic fallback
β”œβ”€β”€ news.py       # SerpApi headlines
β”œβ”€β”€ voice.py      # ElevenLabs TTS
β”œβ”€β”€ storage.py    # MongoDB Atlas + SQLite fallback
β”œβ”€β”€ main.py       # FastAPI + REST API
└── cli.py        # same pipeline from the terminal
Enter fullscreen mode Exit fullscreen mode

Run it yourself:

git clone https://github.com/bhushanvidhate-27/horizon && cd horizon
uv venv && uv pip install -e ".[dev]"
uv run uvicorn horizon.main:app   # β†’ http://localhost:8000
Enter fullscreen mode Exit fullscreen mode

How I Built It

A small agent pipeline, one stage per concern:

location β†’ sky β†’ weather β†’ news β†’ narration β†’ (voice) β†’ storage
Enter fullscreen mode Exit fullscreen mode
Stage What it does Technology
Location City β†’ lat/long (cached) Open-Meteo geocoding
Sky Sunrise/set, Moon, planets, constellations, meteors Skyfield
Calendar New/full moons, meteor peaks, equinoxes, oppositions Skyfield
Weather Scores every 1–3 h block for comfort + clear skies Open-Meteo
News Rare sky-event headlines SerpApi (optional)
Narration Turns facts into a warm human alert Gemma (Ollama default)
Voice Spoken version of the alert ElevenLabs (optional)
Storage Preferences + alert history MongoDB Atlas / SQLite
Tracing One transaction per alert, span per stage Sentry (optional)

Graceful degradation is intentional: missing keys never break the experience. The useful recommendation still appears using only open data and open weights.

Why Open Innovation Matters

Open data makes a real product possible for free.

Weather and astronomy are public knowledge. Open-Meteo and Skyfield let a weekend builder compute a genuinely useful recommendation without a billing account.

Open weights keep the intelligence inspectable.

Narration is the part most likely to hide bias or leak data, so it runs locally through Ollama by default. No prompt leaves the device unless you choose a hosted path. The model can be swapped with a one-line change.

Open source makes small tools durable.

Horizon is MIT-licensed and modular. If a provider changes, only one stage needs updating. The project stays understandable and improvable by anyone.

The most important output isn’t a model response β€” it’s you, outside.

Taking It Outside

[Add your honest outdoor note here. Example:

β€œI ran Horizon for Hyderabad on a clear New Moon morning. It recommended 04:00–07:00. I stepped outside just before 5 a.m. and could clearly see Lyra and Cygnus rising β€” exactly the dark-sky window it had chosen. That short interaction was the whole point.”]

This is the part I care about most: the screen interaction should be brief and the real-world experience longer.

Prize Categories

Best Use of Gemma

Horizon uses Gemma to turn structured weather + sky data into warm, natural daily alerts. It runs locally through Ollama (open weights, no key) and also supports hosted paths. A deterministic template narrator keeps the app working when no model is reachable. (horizon/llm.py, horizon/narrator.py)

Best Use of Render

The live Horizon demo is deployed on Render:

https://horizon-bhushanvidhate-27.onrender.com

Best Use of ElevenLabs

Horizon can turn each daily alert into a short spoken narration so you can listen while getting ready to go outside. Audio is cached by content hash. (horizon/voice.py)

Best Use of MongoDB Atlas

When configured with MONGODB_URI, Horizon stores location preferences and alert history in MongoDB Atlas, with SQLite available as a local fallback. (horizon/storage.py)

Best Use of SerpApi

Horizon can include recent astronomy and rare-sky-event headlines through SerpApi, adding fresh context to a daily recommendation. (horizon/news.py)

Best Use of Sentry

Horizon traces its pipeline stages in Sentry, including location lookup, sky calculations, weather scoring, narration, voice generation, and storage. (horizon/agent.py)

Best Use of DigitalOcean

The repo ships a Dockerfile and a DigitalOcean App Platform spec (.do/app.yaml) with a /api/health health check.

Open-source + open-weight core

No paid API is required for the core experience (Open-Meteo + Skyfield + Gemma).

Engineering Quality

  • 84 offline unit tests at ~95% coverage (pytest --cov) β€” every network partner is monkey-patched so the suite runs in about a second offline.
  • CI on GitHub Actions (Python 3.10–3.12): ruff + full test suite + packaging smoke test.
  • Graceful degradation everywhere: missing keys never break the pipeline.
  • Full architecture, API reference and setup notes live in the README.

What’s Next

  • Push notifications at the start of the best window
  • Telegram / WhatsApp bot (β€œsend me my Horizon”)
  • Red-light night mode for dark-adapted eyes
  • Aurora (NOAA Kp) and ISS-pass alerts
  • Atlas Vector Search over past alerts
  • Multi-day planner + iCal export of the sky calendar

Built with open data, open weights, and the sincere hope that you close this tab and go outside. 🌿


Enter fullscreen mode Exit fullscreen mode

Top comments (0)