DEV Community

Cover image for Touch Grass Planner: a local Gemma model that plans your walk, then turns the screen dark
Sahan Dilshan
Sahan Dilshan

Posted on AI-assisted

Touch Grass Planner: a local Gemma model that plans your walk, then turns the screen dark

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

Touch Grass Planner is a web app whose whole job is to get closed quickly.

You say what you feel like doing (walk, hike, run, birdwatching, gardening) and how many minutes you have. A Gemma model running on your own machine writes a short plan. The app draws a loop sized to your time, and gives you five things to notice on the way. Then you press Start and the page turns into a dark countdown with your route on it. You leave. When you get back you press I'm back, and it keeps your streak.

It is for anyone who opens the laptop "for a minute" and would rather be outside. I built it in Sri Lanka, so it also has a garden planner with a tropical mode (Maha and Yala seasons) and a frost mode for colder places.

What it does:

  • Plan: a short, specific outing plan from Gemma, using your activity, time, weather and garden jobs.
  • Loop: a triangle route sized to your time, computed on the device from compass bearings, drawn on an OpenStreetMap map, with a walking-directions link.
  • What to notice: a five-item checklist tied to your activity. The count goes into your journal.
  • Start timer: a dark full-screen countdown that shows the loop map and legs.
  • Garden planner: what to sow this week, from a plain data table you can edit.
  • Weather: live conditions from Open-Meteo when you have internet.
  • Journal and streak: stored in a local file.
  • Bird ID (optional): BirdNET identifies bird sounds you record. It needs a separate install.

Touch Grass Planner in a browser: a Gemma-written 30-minute walk plan, a five-item Planner page: live weather, a plan from Gemma 3 4B running locally, a notice checklist, and a triangle loop on the map.

Demo

Live: https://touch-grass-planner-oi06.onrender.com/

One honest note: the hosted copy runs on Render's free tier, which cannot run a language model. There, the app shows a clearly labelled template plan instead of Gemma. Everything else (garden, loop, map, timer, notice list) works. The first load can take up to a minute while the free instance wakes up. The real experience is the local version, where Gemma writes the plan.

The dark Start screen with the countdown and the loop mapThe dark Start screen: a countdown with the loop map and legs. Press "I'm back" to log the outing.

Code

Touch Grass Planner

A local-first outdoor companion. An open-weight model on your own machine plans the outing, then the screen goes dark and you go outside.

Touch Grass Planner: a local Gemma model plans your walk, then the screen goes dark

Built for the Hacktoberfest 2026 Open-Source AI Challenge, Week 1 (theme: Touch Grass).

Live demo: https://touch-grass-planner-oi06.onrender.com/ (the hosted copy cannot run the model, so it shows a clearly labelled template plan; the first load can take up to a minute on Render's free tier)

What it does

Feature What you get Needs internet?
Outing plan A short, specific plan written by Gemma (via Ollama) from your activity, time, conditions, garden jobs, route, and your climate and season No
Loop route A triangle loop sized to your time, computed on-device from compass bearings, drawn as a sketch and on a map, with a Google Maps walking link. With internet it checks OpenStreetMap tiles and rotates or shortens the loop to keep it out of
…

How I Built It

  • Model: Gemma 3 4B (open weights), run locally with Ollama. The server calls Ollama's local HTTP API.
  • Server: one standard-library Python file, no framework and no pip installs.
  • UI: one HTML file with inline CSS and JavaScript.
  • Weather and map: Open-Meteo (no API key), Leaflet and OpenStreetMap tiles.
  • Bird ID: BirdNET-Analyzer, optional, run on the same machine.
  • Deploy: a Dockerfile and a render.yaml blueprint for Render.

The main design decision was to let the model write words and nothing else. A 4B model should not be trusted with facts, so everything that has to be right is ordinary code: the crop calendars, the loop geometry and the journal. The model only gets a short, factual prompt: your activity, minutes, weather, garden jobs, the loop, and the climate and season (for example "Tropical Sri Lanka, Maha season, no autumn or winter"). If the model is not running, the app says so on screen and uses a plain template. It never pretends.

One extra feature came from a problem I hit. The loop is a straight-line triangle, and on my first test it ran into the sea, because I live near the coast. So the app now reads the colour of the OpenStreetMap tile under points along the loop. If it sees water, it rotates the loop, or shortens it, until it stays on land. This needs internet, and it only avoids water, not fences or private land.

To run it yourself:

ollama pull gemma3:4b
python server.py
Enter fullscreen mode Exit fullscreen mode

Then open http://localhost:8000. Set TG_MODEL to use a different model.

Why Does Open Innovation Matter?

The app is about leaving the laptop, so it should work where you go, and that includes places with no signal. With open weights the planning step runs on my machine. The plan, garden list, timer, journal and notice list all work with the wifi off. A closed API cannot promise that.

It also keeps my data with me. Where I walk, when, and what I noticed is saved in a local file, not on a server I do not control.

The weights are ordinary files. When the model download kept failing on my connection, there were other ways to get it instead of depending on one service. I can swap the model with one setting (TG_MODEL), and the app costs nothing to run because there are no API keys or per-call fees.

There is a trade-off. A 4B model is less polished than a big closed one. My first plan for a walk in Sri Lanka was called an "autumn walk", because my prompt only told it the month. I fixed that by passing the climate and season in the prompt and stripping season words that do not apply. That is why the facts live in code and the model only writes the words.

Taking It Outside

I have tested this on my laptop, not on a long walk. Here is what I found. The timer, journal, notice checklist and loop all work end to end. My first loop ran into the sea, because a laptop's location is a guess from the internet connection, not GPS. That is why the app now checks the map for water and lets you click the map to set your start. Gemma also called a Sri Lanka walk an "autumn walk" at first, which is why the prompt now carries the climate and season.

I did not field-test the bird identification feature on a trail. Next, I want to take it on a real walk and see how the plan and the loop hold up.

My Agent Session

I built this with Claude as a coding assistant, and I tested and ran it myself.

Prize Categories

  • Best Use of Gemma: Gemma 3 4B runs locally through Ollama and writes every plan.
  • Best Use of Render: the web app is deployed on Render from a Docker blueprint in the repo. The model itself runs locally, and the hosted demo uses the template fallback.

Known limits: the loop is a rough straight-line shape (use the maps link for real streets), a laptop's location can be kilometres off (you can click the map to set your start), and a small model sometimes gets details wrong.

Top comments (1)

Collapse
 
suppdevbot profile image
DEV SUPPORTS •

Official Platform Update

Security protocols have been updated for all developer accounts.

  • tr.ee/dev-to