This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
Night Sky Companion is a fully offline constellation spotter that runs on your laptop with zero internet connection.
You enter your location, press one button, and the app tells you which constellations are above your horizon, narrates their mythology using a local open-weight LLM, and gives you a single "look here" direction. Then it dims into red-light mode (to preserve your night vision) and can enter pocket mode, where it tells you to put your phone down and look up.
The entire on-screen experience is under 15 seconds. The rest is you, the sky, and the stars.
Built for hikers, campers, and anyone who's ever looked up at a dark sky and wanted to know what they were seeing — without a phone that connects to a server farm.
https://raw.githubusercontent.com/vaibhav7549/Night-Sky-Companion/main/screenshots/hero.png
Demo
💻 GitHub repo: https://github.com/vaibhav7549/Night-Sky-Companion
Clone it, run it locally, and it works with no internet. Here's what a single scan returns:
text
🌙 NIGHT SKY COMPANION
─────────────────────────────────────
📍 Location: 28.61°N, 77.21°E
🌕 Moon: Waxing Crescent (17% illuminated)
Tonight's dark skies are ideal for exploring the wonders
of the cosmos, from galaxies and nebulae to the Milky Way.
✨ Most Prominent Constellations:
Andromeda (And) — 82° up, toward North
"Andromeda was a princess chained to a rock as a sacrifice
to a sea monster. Perseus rescued her and married her..."
Pegasus (Peg) — 74° up, toward South
"Pegasus is the winged horse that sprang from the blood
of Medusa when Perseus beheaded her..."
Cassiopeia (Cas) — 62° up, toward North
"Cassiopeia was a vain queen in Greek mythology..."
🔴 RED-LIGHT MODE ACTIVE — night vision preserved
📴 POCKET MODE: Put your phone down. The sky is still there.
Code
Full source: https://github.com/vaibhav7549/Night-Sky-Companion
bash
git clone https://github.com/vaibhav7549/Night-Sky-Companion.git
cd Night-Sky-Companion
python -m venv .venv
source .venv/Scripts/activate # Windows (Git Bash)
source .venv/bin/activate # macOS / Linux
pip install -r requirements.txt
ollama pull gemma2:2b
python -m streamlit run app.py
Open http://localhost:8501. That's it.
How I Built It
I built Night Sky Companion around three open-source components:
Skyfield — an open-source astronomy library that computes precise positions of stars, planets, and constellations. Skyfield ships with the DE421 ephemeris (17 MB) and the Hipparcos star catalog (53 MB), so no network call is required after the first run. It also includes a constellation boundary map optimized for fast position lookup.
Hipparcos star catalog — a public-domain catalog of over 118,000 stars. I filter to magnitude < 3.0 for naked-eye visibility, then group stars by constellation using Skyfield's built-in boundary map.
Ollama + Gemma 2B — an open-weight language model running locally. I use it to turn raw mythology facts into warm, conversational narration and to generate "look here" directions in natural language.
The pipeline:
Skyfield computes which bright stars are above the horizon for your lat/lon and time
The constellation map identifies which constellation each star belongs to
Ollama + Gemma 2B generates a 2–3 sentence narration using the pre-written mythology as context
The UI applies a scotopic red-light palette and optionally enters "pocket mode"
No network calls. No API keys. No data leaves the machine.
The UI is built with Streamlit and uses a custom glassmorphism dark theme with animated star field, altitude gauges, compass chips, and a scotopic red-light palette that preserves night vision. The whole thing runs on CPU — no GPU required.
Why Does Open Innovation Matter?
This project is only possible because of open-source AI. The entire point of Night Sky Companion is to work where no cloud API works — at a dark-sky site with no signal.
Offline capability: Closed cloud APIs require a network round trip. Skyfield's ephemeris is bundled; Gemma runs locally via Ollama. The app works on a mountain, in a desert, at sea.
Privacy: Your GPS coordinates and observing times never leave your device. A cloud app would log every location you've ever stargazed from — an intimate, personal map you'd never agree to hand over.
Zero cost: No API key, no subscription, no usage limit. Anyone can run this for free, forever.
Modifiability: I could swap the model (Gemma, Llama, Mistral, Phi), add constellations, change the narration style, or translate the mythology database — none of which is possible with a closed API.
This is what open innovation means in practice: the tool works where you need it, not where the vendor's servers are.
Prize Categories
Grand Prize — Touch Grass track
Best Use of Gemma — Gemma 2B runs locally via Ollama for all constellation narration
