This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
TrailCard is an offline trail-day planner. You enter a trail (or upload a GPX file) and it produces one printable A4 card: when to start, the latest time to turn back, when the sun sets, how much water to carry, and plain-language advice on packing, getting lost and Leave No Trace.
The point is that the screen is the shortest part of the experience. You spend two minutes planning, print the card (or save it to your phone), put the phone on airplane mode and go outside. Nothing needs a signal on the trail.
It is for casual hikers, trek groups and anyone who walks somewhere with patchy coverage. The mistakes that actually cause trouble are simple ones: starting too late and not knowing when to turn around. TrailCard turns those into numbers on a page.
Code
Aakif-Kohari
/
trailcard
Offline trail-day planner: Python computes sunset, turnaround and water; a local open-weight Gemma model (Ollama) writes a printable one-page trail card. Built for Hacktoberfest 2026 Touch Grass.
🥾 TrailCard
Plan the trail day on a screen, then put the screen away.
TrailCard is an offline trail-day planner. You describe a hike (distance, climb, start time, location, or upload a GPX file) and it produces a one-page printable trail card: when to start, when to turn back, when the sun sets, how much water to carry, and plain-language advice written by an open-weight Gemma model running locally through Ollama.
Print the card or save it to your phone, switch to airplane mode, and go outside. The screen is the shortest part of the experience.
Built for the Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass.
Why it works with no signal
| Part | How it works | Needs internet? |
|---|---|---|
| Walking time, turnaround, water | Plain Python (planner.py) using Naismith's rule |
No |
| Sunrise and sunset |
astral, computed from latitude, longitude and date |
No |
| GPX distance and |
How I Built It
The core idea is a clear split: numbers come from code, words come from the model.
-
planner.pyis plain Python. It uses Naismith's rule (5 km/h plus 1 minute per 10 m of climb), adds breaks, and usesastralfor sunrise and sunset. It works out the latest safe start, the planned finish and a hard turnaround time, which is the last moment you can be at the halfway point and still finish an hour before sunset. It also works out water per person. - The open-weight model is Gemma, run locally through Ollama (the app defaults to
gemma3and lists whatever models you have installed). It receives those numbers as JSON and only writes the advice in six sections: Summary, Timeline, Pack list, Turnaround rule, If you get lost, and Leave No Trace. - Small language models make things up, so the output is checked before it is trusted. If the model mentions a clock time that is not in the plan, the card falls back to a deterministic template. If it skips sections, they are filled from the template. If Ollama is not running, you still get a card. The numbers table at the top of the card is always generated by code.
- GPX files are parsed locally with
gpxpy. GPS altitude is noisy and inflates the climb, so a small filter ignores wiggles under 3 m. - The UI is Streamlit, and the card is a Jinja2 template with print CSS.
The project has 42 pytest tests, and a GitHub Actions workflow runs them. The Ollama calls are mocked in the tests, so they run without a model installed.
I used AI help while building this: a Qwen draft of the first version, then Claude to review, fix and test it. One real bug it caught was a timezone guess from longitude that put India 30 minutes off, so the form now asks for the UTC offset.
Why Does Open Innovation Matter?
A trail planner has to work in exactly the place where a cloud API doesn't: a ridge or forest with no signal. A closed hosted model would have failed at the one moment the product matters. A local open-weight model works with the laptop offline, and after the one-time model download the card needs no network at all.
It also keeps your location on your own machine. There is no API key, no per-use cost and no account. Swapping models is a dropdown, so someone with an older laptop can use a smaller Gemma and someone with more RAM can use a larger one. Because the model only writes words, I could keep it small and replaceable instead of trusting it with safety-relevant numbers.
Prize Categories
- Best Use of Gemma
Top comments (0)