This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
Have you ever reached class and realised you don't remember a single thing you walked past?
Sidewalk Safari turns an ordinary 5–15 minute walk into a small nature expedition. You choose how long you have, where you are (campus, park, neighborhood, anywhere outside) and how tricky you want it. A language model running on your own computer then writes three short observation missions:
- Find one leaf that shows three different shades of green.
- Look for a sign that an insect has visited a plant.
- Pick a tree and watch how light and shadow change its leaves.
Then you put your phone away. Pocket Mode turns the screen into a dark timer that says "Phone in your pocket. Go find your missions." You tick missions off as you find them, each one reveals a short field note about what you just noticed, and when you're done you write a few lines in a field journal that lives in your browser.
It's for students between classes, anyone who wants a reason to look up, and anyone who'd like their phone to be the start of a walk rather than the whole of it. There are no accounts, no streaks, no notifications and no leaderboards. The screen should be the shortest part of the experience.
Demo
🎥 Video of a real outdoor safari: https://drive.google.com/file/d/10rD9phaRyp_E-Me2jLPzj3cYT5CRoqpZ/view?usp=sharing
Sidewalk Safari runs on your own machine, so the demo is a video of an actual walk rather than a hosted page.
Taking it outside: I took Sidewalk Safari for a short walk around my college campus, spending about 10 minutes exploring the little details I usually walk past without noticing. I completed three observation missions, and one of the most interesting discoveries was noticing how leaves on the same plant could have different shades of green and patterns. The brief loading wait felt a little noticeable at first, but once the missions were generated, I could put my phone away and focus on the world around me. It reminded me that sometimes, we don't need to travel somewhere special to discover something new we just need a reason to look closer.
Code
🌿 Sidewalk Safari
Turn an ordinary 5–15 minute walk into a small nature expedition. The AI runs on your own computer.
Sidewalk Safari uses a local open-weight language model (Gemma 3 4B via Ollama) to write three short observation missions for your walk. You put your phone away, find them in the real world, then come back and record what you noticed in a field journal saved in your browser.
Built for the Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass.
Features
- Start an adventure: choose 5, 10, or 15 minutes; campus, park/garden, neighborhood, or anywhere; easy, curious, or explorer difficulty.
- AI mission generator: three short, safe missions (title, task, hint, estimated time, "what you might learn"), validated before they reach the screen.
- Mission cards: reveal-hint, mark-complete, a progress meter, a timer, and a field note after each find.
- Pocket Mode: a dark, minimal screen with only the timer…
The README has one-minute setup instructions, the API, and the architecture.
How I Built It
The open model: Gemma 3 4B (gemma3:4b), served locally through Ollama. It's an open-weight model released under Google's Gemma Terms of Use (open weights, not an OSI open-source license). It's a 3.3 GB download, and I ran everything on an AMD Ryzen laptop with about 16 GB of RAM and no GPU.
Architecture: React + Vite + Bootstrap 5 → FastAPI → Ollama, all on localhost. The journal is saved in the browser's localStorage. The model name is an environment variable (TEXT_MODEL), and a single small function talks to Ollama, so the model underneath is a configuration choice.
On a CPU, generation runs at about 10 tokens per second, so a set of missions takes around 45 seconds. I treated the wait as part of the design: a "scouting your safari" screen with rotating walking tips, a seconds counter, and a nudge to put the phone in your pocket the moment the missions arrive.
What the backend does with every request:
- Picks three focus themes in code, from groups, so you never get two leaf missions in one set.
- Builds a short prompt and asks Gemma for JSON.
- Validates the result with Pydantic: exactly three missions, length limits on every field.
- Runs a safety filter that rejects any mission telling you to touch, smell, pick, or close your eyes.
- Retries once, telling the model why it was rejected.
- Scales the estimated minutes so they never add up to more than your walk.
- If the model is unavailable or fails twice, serves a built-in mission pack and labels it clearly as not AI-generated.
Three things I learned building with a small local model:
-
Constrained decoding changed the writing. With Ollama's JSON-schema
format, roughly one in three missions came out with words fused together ("youcan", "beennearby"). Asking for JSON in the prompt and validating with Pydantic instead produced none in an 18-mission test. I haven't pinned down exactly why, but it was easy to find because I could change how the model is called. - A prompt is not a safety system. Gemma kept saying "close your eyes" on listening missions even when told not to. A code-level validator now enforces it.
- Variety comes from code, not from asking nicely. A 4B model collapses into the same three ideas unless you hand it different themes.
The frontend uses an earthy, game-like look (chunky buttons, "FOUND!" stamps, leaf slots that fill as you go). Fonts and styles are bundled with the app, so nothing needs the internet at runtime.
Why Does Open Innovation Matter?
- It runs on a laptop with no GPU, no API key and no per-request cost. Mission generation happens on your computer, so there's no hosted service to be rate-limited, billed, or shut down.
- Your data stays with you. The browser, the FastAPI server and Ollama all run on localhost. The only thing the server ever receives is three choices: walk length, surroundings, and difficulty. Your journal never leaves your browser.
- I could change how the AI behaves, not just call it. I rewrote the prompt, added my own validation and safety rules, read the model's real token speed from Ollama, and fixed the fused-word problem by changing how the model is called. With a closed API I'd have been guessing at all of that.
- Model freedom. The model is one environment variable, so the app isn't married to one provider's model, price, or terms.
A hosted API would answer faster. For an app whose whole point is that you walk away from the screen, I'll take a 45-second wait in exchange for privacy, zero cost, and full control.
Prize Categories
Best Use of Gemma: Gemma 3 4B runs locally through Ollama and writes every mission. I measured its speed on CPU-only hardware, worked around its quirks with constrained-decoding testing and code-level safety validation, and built the app so it stays usable if the model fails.



Top comments (0)