DEV Community

Vinit Shinde
Vinit Shinde

Posted on

TouchGrass Buddy: a local AI that gives me one small reason to go 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

🎬 The Story Behind It

What I Built

Most people spend their days staring at a screen, and β€œgo outside more” rarely sticks. TouchGrass Buddy gives people a reason to step out. They share their time and mood, and the app checks the weather and finds a green spot nearby. Then it gives them one small mission to finish and asks for a photo to show they did it.

TouchGrass Buddy is a web app that gives you one short outdoor mission. You pick a spot on a map, set your time, energy, mood, group and terrain needs, and choose interests such as birdwatching, photography, walking or sketching (or write your own). The app checks the weather, finds green spaces near your pin, and turns that into a few concrete steps, a small scavenger hunt and a photo challenge. Afterwards you upload a photo, and completed missions go into a journal with XP, a streak and badges.

TouchGrass Buddy home page with a short introduction, a Plan a Mission button and a three-step guide

AI-generated illustration of a hand holding a phone with a nature app on a sunny park path

Code

🌿 TouchGrass Buddy 3.0

The Local-First Outdoor Companion & Gamified Field Journal

Reduce screen time, reconnect with nature, and explore the real world through AI-powered physical missions.

Python FastAPI Ollama PWA Ready License: MIT Zero Cloud Costs


πŸ“– Overview

TouchGrass Buddy is a privacy-first Single-Page Application (SPA) designed to solve modern screen fatigue. Instead of just telling you to take a break, it generates context-aware outdoor micro-adventures tailored to your exact neighborhood, current live weather, energy level, and personal interests.

Every aspect of the application runs 100% locally on your computer:

  • Zero Cloud AI API Billing: Driven entirely by local open-weight models via Ollama (llama3.2:3b for mission generation and moondream for photo verification).
  • Total Privacy: Your GPS coordinates, health energy levels, personal journal logs, and camera photos never leave your device.
  • Modern Outdoor Field Journal UI: An organic, forest-night design aesthetic (AllTrails meets Duolingo) built with high-performance Vanilla JavaScript, CSS custom properties, and Leaflet maps.

✨ Key Features

…

Demo

🌐 Published App: https://following-tones-justin-artists.trycloudflare.com

How I Built It

The main design decision was to keep facts and writing separate. The code fetches the facts (live weather, sun times, and real places from OpenStreetMap and Wikipedia), and the model only turns them into a mission. It is told not to invent places.

  • Mission writing: Llama 3.2 (3B) running locally through Ollama. The backend asks for structured JSON, validates it, retries if the output is invalid, and falls back to a default mission if the model is unavailable.
  • Photo check: Moondream through Ollama compares the uploaded photo with the photo challenge and returns an AI check with a confidence score. It is a small model and can be wrong, so the app calls it a check, not a guarantee.
  • Backend: FastAPI (Python).
  • Data: Open-Meteo for weather, OpenStreetMap Overpass and Wikipedia for places and photos, and Leaflet for the interactive map.
  • Frontend: a single-page app in vanilla JavaScript, set up as a PWA. Progress and journal entries are stored in the browser's localStorage, on the user's own device.
  • Tests: 19 automated unit and integration tests, all passing when I last ran them.

I used an AI coding agent (Antigravity) to help write the code, and I tested and edited the result myself.

Why Does Open Innovation Matter?

Open models let me keep the AI on my own machine. My notes and photos are not sent to an AI provider, it costs nothing per mission, and I can swap in another model whenever I want. A closed API would have made all three harder.

To be accurate: only the AI runs locally. Weather, place data and map tiles still come from online services, so the app is not fully offline.

What I Tested and What Went Wrong

I took my laptop and phone outside for a 25-minute test walk around my neighborhood and the nearby public park.

The mission it generated:

Walk towards the neighborhood park, pause near the tree line for 5 deep breaths, and find a leaf with serrated or unique edges to photograph.

Three real problems showed up outside that I never saw at my desk:

  1. The location button was confusing. At first it was only a crosshair icon next to the search box. Standing outside, I could not tell whether tapping it was fetching my GPS or had frozen. I replaced it with a labeled "Use My Location" button that shows its state: "Detecting GPS..." and then "Location found".

  2. Place lookups were unreliable. The public OpenStreetMap Overpass servers often timed out or returned nothing in dense or suburban areas, so someone standing on a street could get an empty list. I added fallback mirror servers and a Wikipedia GeoSearch lookup so the app can still suggest nearby landmarks when the main servers are slow.

  3. The photo check was slow. Sending a full-resolution camera photo to Moondream took almost 20 seconds on my laptop, and waiting on a spinner in the sun was frustrating. I added a fallback: if the vision model takes too long or is not running, the app accepts the photo and moves on. The cost is that the photo check can be skipped, so it is a nudge and not proof.

What I'd Improve Next

  • A "Parks Only" mode: a toggle that limits nearby spots to parks, nature reserves and trails, hiding cafes and urban places for people who want a quieter walk. It answers the mixed spots list I saw during testing.
  • Smaller photos for the vision model: compress camera photos in the browser (for example to 512x512) before sending them to Moondream. The aim is to cut the wait well below the roughly 20 seconds I saw, but I have not measured the new time yet.
  • Small model comparison: test Llama 3.2 3B against other compact models such as Gemma 2 2B, Phi 3.5 Mini and Qwen 2.5 3B, looking at mission quality, speed and battery use on a laptop.
  • Audio walk mode: a text-to-speech option that reads the steps aloud through earbuds, so the phone can stay in a pocket.

The best version of this app is the one you close after two minutes. 🌿

Top comments (3)

Collapse
 
erharshvav profile image
Harsh Vyavahare •

Awesome idea!!! Keep building @vinit_shinde_99 πŸ’―

Collapse
 
vinit_shinde_99 profile image
Vinit Shinde •

Thank you so much! πŸ™Œ Really appreciate the support! πŸ’š

Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more