DEV Community

Nikema
Nikema

Posted on AI-assisted

Touch Grass Coach: a chaotic garden that wants you to close the app

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 Coach turns a screen-time confession into one small outdoor mission. It is for the person who wants to take a break but keeps negotiating with the next tab.

Choose your screen time, five to fifteen minutes, a walk or one nearby outdoor spot, and gentle or spicy coaching. Gemma writes a short response and a concrete mission. Four garden mascots give the different screen-time tiers a face: Pip, Sprig, Scruff, and Goblin.

The important button is “Let's go outside.” It saves the mission and changes the app into a quiet reminder to pocket your phone. You can close the app and return to complete or abandon that same mission. Each completion grows a plant in your chaotic garden. The garden stays even when your streak resets.

There is no account, leaderboard, or endless feed. The reward is something small to come back to, after doing something away from the screen.

Demo

Try Touch Grass Coach.

Watch the 60-second demo.

Mission completion in the video uses a demo time jump; it demonstrates the UI rather than an outdoor trial.

Code

GitHub logo prophen / touch-grass-coach

Log your screen time. Get roasted by an open-weight model. Go outside. Hacktoberfest Week 1 build.

Touch Grass Coach

Log your screen time. Get roasted by an open-weight model. Go outside.

Public demo: touch-grass-coach.vercel.app.

Watch the 60-second demo · Demo walkthrough · Submission draft and checklist

Built for Hacktoberfest Week 1 (2026): theme "Touch Grass", open-weight models at the core. The coach is Gemma (gemma-4-26b-a4b-it) running on Google's free AI Studio tier, with gemma-4-31b-it as a fallback. No downloads, no GPU, no disk space needed.

How it works

  1. You drag a slider to log today's screen time (0-12h) Choose a 5, 10, or 15-minute mission, take a walk or stay in one nearby outdoor spot, and pick gentle or spicy coaching.
  2. Your hours pick one of four roast tiers: Seedling, Sprout, Weed, Feral.
  3. The coaching instructions go to Gemma via the AI Studio generateContent endpoint, which returns a short response plus one concrete outdoor mission using your selected preferences.
  4. Tap "Let's go outside"…

How I Built It

The app uses Next.js, React, TypeScript, illustrated mascot assets, CSS animations, and browser storage. The server calls Google's hosted AI Studio API with Gemma: gemma-4-26b-a4b-it, with gemma-4-31b-it as a fallback.

Gemma is at the center of the coaching interaction. The server combines the selected tier's persona with validated time, movement, and tone preferences. It asks for two short JSON fields: a response and an outdoor mission. Gentle mode uses supportive instructions instead of the roast persona. The mission duration includes leaving and returning.

The browser sends screen hours, preferences, and up to three recent completed mission texts to the server, which forwards them to Google. The API key stays on the server. Mission dates, IDs, progress, and sound preferences stay on the device. This version does not send precise location or photographs to the model.

The coach keeps the last ten completed missions locally. It supplies the latest three texts as untrusted historical data, asking Gemma to suggest a different activity while respecting today's time, movement, and tone choices. Variety is a prompt preference, not a guarantee. The app explains this sharing before coaching and lets you inspect or clear the remembered tasks. Clearing history keeps your plants, streak, and current mission; it cannot erase text already sent to Google. A new completion begins building fresh memory.

The model suggests the activity; ordinary code owns the progress. Starting a mission persists it before showing the outside view. Completing it saves the terminal state and progress together, so another click or a reload cannot award the same plant again. Consecutive-day streaks use the local calendar; multiple missions on one day increase the total without increasing the streak twice.

Failures get explicit retry states. Requests have time limits and bounded bodies, generated responses are checked, and the public deployment has a shared API rate-limit rule. Sound is optional and starts off. Reduced-motion settings disable the celebratory movement.

Codex helped implement and check the app, including the mission persistence, visual iterations, and submission materials. The repository records the changes as small pull requests.

Why Does Open Innovation Matter?

For me, the answer is cost and control.

Gemma is an open-weight model. This version uses Google’s hosted API, so I don’t need a GPU or space on my laptop for model weights. Free-tier access can lower the cost of experimenting, but it comes with limits. Anyone deploying their own copy should check the current API and hosting quotas, eligibility, and billing requirements.

The coaching prompts and game logic live in the repository. The UI talks to my server route, which currently uses Google’s request and response format. Switching providers would require adapting that integration and testing the new model’s output. The UI, tiers, and response structure could stay the same.

Open weights give builders more options for running and adapting the model. This particular deployment still depends on Google’s hosted service, including sending screen hours, preferences, and up to three recent completed mission texts to generate the next response.

What I Learned

The challenging part was keeping the game honest. A streak, a mission count, and a plant reward sound similar until you finish two missions in one day or reopen the app after midnight. Separating those concepts made the reward predictable.

The other design constraint was leaving. The app should make the screen the shortest part of the experience. I put the personality around choosing and returning; the active mission view keeps the task readable and encourages closing the phone.

There are deliberate limits. Missions are model suggestions, not mechanically guaranteed routes or timings. Older plants do not have individual completion dates because the original progress record did not store them. Browser data can be cleared, taking the garden with it. Saved missions restore locally, but this is not an offline-installed app.

Prize Categories

Best Use of Gemma: Gemma generates the personalized coaching response and outdoor mission at the core of the app.

Top comments (0)