Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Touch Grass: voice dares that get you off the screen, running on-device with Gemma 3 270M

Description and use

Touch Grass is a PWA that generates short outdoor dares based on user‑reported time and energy, using Gemma 3 270M on‑device via transformers.js for privacy and offline use.

Problem

Users often spend time on their phones without taking action, leading to inactivity and missed opportunities to be outdoors.

Outcome

Touch Grass provides a privacy‑preserving, offline‑capable solution that turns idle phone time into actionable outdoor activity, with a single dare, photo proof, and streak tracking.

Workflow

  • 1. User opens the PWA and speaks their available time and energy via the Web Speech API.
  • 2. The app matches the input against a curated dare bank (dares.json) or, if a Hugging Face token is provided, generates a new dare with Gemma 3 270M via transformers.js.
  • 3. The generated dare is spoken using the browser’s speechSynthesis and displayed in a dialogue ribbon with time/energy tags and a "prove it outside" button.
  • 4. The user clicks the button, the camera opens via getUserMedia, captures a photo, and saves it as proof of completion.
  • 5. The app records the completion toward a daily streak and updates the UI accordingly.

Evidence

Touch Grass — say how much time and energy you've got, and it gives you one short, concrete dare to go do outside.

Source

It's a PWA: install it, and after the first load it keeps working with no signal, because the shell and the model are both cached by a service worker.

Source

dare generation runs on-device with gemma 3 270m via transformers.js, not a hosted api

Source

The app is a static site, no build step.

Source

Camera proof uses getUserMedia + canvas, with a defensive timeout — confirmed by hand that getUserMedia can hang indefinitely on a device with no camera rather than reject, which otherwise traps the UI with no way out.

Source

  • Record date: 2026-10-10T19:41:01.062Z