DEV Community

Tanishk
Tanishk

Posted on

TrailBuddy

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

What I Built
Like many developers, I spend way too much time glued to screens. Between debugging, reading docs, and scrolling feeds, my days were blending together indoors. When I saw the "Touch Grass" theme for Week 1, I wanted to build something that doesn't just talk about going outside, but actually forces you to put your phone down and be present.

I built TrailBuddy — Your AI Nature Companion.

Here is what it does:

18 "Touch Grass" Missions: Fun, bite-sized outdoor challenges across Botany, Wildlife, Sensory, Mindfulness, and Earth. Things like sitting still and listening to an outdoor soundscape for 3 minutes, tracking down three completely different leaf shapes, or finding 5 natural colors that aren't green or brown.
Screen-Free "Pocket Mode": My favorite feature. When you start an activity, you tap "Pocket Mode", and the screen dims into a slow, breathing dark green circle that literally says "Screen idle. Look around you! Put your phone in your pocket." You get a gentle audio chime when the time is up, so you're never tempted to check your notifications while doing a mission.
Private Field Journal: A simple place to write down what you noticed—the smell of rain on dry dirt, bird calls, or tree bark textures. It stores everything locally in SQLite and intentionally never asks for GPS permissions, so your private reflections stay yours.
AI Nature Guide: An on-device assistant you can ask about plant shapes, bird behaviors, animal tracks, and trail safety.
It's for anyone who feels screen fatigue and wants a gentle nudge to get out into the park or backyard and notice the little things.

Demo
You can try the live web app here: 👉 https://trailbuddy-3iri.onrender.com



(Tip: Try starting today's mission on your phone and putting it in your pocket!)

Code
The full source code is on GitHub:

GitHub logo tani2112 / TrailBuddy

Your AI companion for the outdoors

🌿 TrailBuddy — Your AI Nature Companion

"The real world outside has no battery limit, zero latency, and infinite resolution."

TrailBuddy is a modern, nature-inspired web application designed to encourage people to spend less time on screens and more time in nature. It helps users discover outdoor wonders, complete mindful "Touch Grass" challenges, consult a local open-weight AI guide, and record personal field observations in a private SQLite journal.


🧭 Tech Stack & Philosophy

  • Frontend: React 18, TypeScript, Vite, Tailwind CSS, Lucide icons, Canvas Confetti.
  • Backend: Python 3.10+ with FastAPI, aiosqlite for async SQLite, httpx for Ollama communication.
  • AI Core: Ollama running locally on your device with open-weight models (e.g. llama3.2, mistral, phi3). No paid cloud AI APIs. 100% private and on-device.
  • Database: SQLite (trailbuddy.db) with zero external cloud dependencies.
  • Design Aesthetic: Forest green, sage green, warm cream parchment, tactile…

Frontend: React, TypeScript, Vite, Tailwind CSS, Lucide icons, Canvas Confetti.
Backend: Python FastAPI with aiosqlite for local database storage.
AI: Ollama running locally with open-weight models like llama3.2.
How I Built It
I wanted TrailBuddy to be self-reliant, fast, and completely free of paid cloud APIs:

Local AI with Ollama: I wired the chat interface to a local Ollama instance running llama3.2. Because the model runs right on the machine, you don't need any OpenAI API keys, credits, or subscriptions.
Thoughtful Prompts & Safety First: I tuned the system prompt to guide people with field observation cues (like looking at whether leaf stems are alternate or opposite) rather than pretending the AI is an infallible camera classifier. Most importantly, it includes an absolute safety rule: never tell someone a wild mushroom or plant is safe to eat without a real-life expert verifying it.
Offline & Graceful Fallbacks: If someone is on a trail with spotty cellular connection or doesn't have Ollama running, the rest of TrailBuddy (all 18 challenges, the timer, Pocket Mode, and the journal) still works 100% offline. The AI tab clearly explains how to start Ollama with terminal commands whenever you're back at your desk.
Why Does Open Innovation Matter?
To me, open innovation here was about two things: privacy and freedom.

First, when people write personal reflections or thoughts during a quiet walk in the woods, that data shouldn't be uploaded to third-party ad servers or used to train corporate models. Storing everything locally in SQLite and using open-weight models means your journal stays entirely on your own machine.

Second, nature doesn't have Wi-Fi. Closed APIs cost money per token and instantly break the second you lose cell reception on a hiking trail. Open-weight models like Llama give developers the freedom to build offline-first tools that anyone can run for free, anywhere in the world.

Top comments (0)