DEV Community

VARNIT KUMAR
VARNIT KUMAR

Posted on

Last Light: An Open-Source AI Walk Ticket That Tells You to Put Your Phone Away

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

Last Light is an open-source AI walk ticket that tells you to put your phone away.

Most outdoor apps give you more things to look at. Last Light does the opposite. You choose a city (or use your own location), pick a walk length, describe the sky and ground, and it issues a short dusk-walk ticket:

  • ⏰ A leave-by time and sunset direction ("Leave by 17:42. Walk west.")
  • 🧭 A destination-free route suggestion and estimated distance
  • πŸ“ˆ A walk-quality score
  • πŸ‘€ Four sensory prompts: look, listen, touch, notice
  • πŸ“΅ One rule: "Phone in a pocket that is not your hand."
  • ⏳ A Pocket Mode countdown, a printable ticket, optional voice narration, and a private field note stored only in your browser

It's for anyone who wants a simple reason to step outside at the end of the day. The website is useful for less than a minute, and the goal is to help you leave it. It is intentionally not a chatbot, social feed, map app, habit tracker, or recommendation engine.

Demo

πŸŒ… Live app: https://touch-grass-beryl.vercel.app/

  1. Choose a city or use your door.
  2. Select a walk duration.
  3. Describe the sky and ground.
  4. Issue a ticket.
  5. Read it, print it, or start Pocket Mode.
  6. Put the phone away.

Code

Last Light

Animated Last Light dusk walk ticket preview

The screen is the shortest part.
A local-first dusk walk ticket that gets you outside, then gets out of the way

Build status MIT License Python 3.11 or newer FastAPI  Touch Grass

Last Light turns sunset geometry, local climate signals, and open-weight AI into a small printed-style brief: when to leave, which way to walk, four sensory prompts, and one rule β€” put the phone away.

Why it exists

Most outdoor apps increase screen time. Last Light is deliberately the opposite:

  • Prepare on screen. Calculate the useful facts before leaving.
  • Carry a ticket. Print it, read it aloud, or remember the four cues.
  • Pocket the phone. Pocket Mode becomes a simple countdown.
  • Notice the ordinary. There is no feed, streak, destination, or species database.

The best interface is the one you stop looking at.

What the experience feels like

  1. Choose a city or use your door.
  2. Set the walk length, date, temperature, ground, and sky.
  3. Receive a dusk ticket…




How I Built It

Stack: Python, FastAPI, vanilla JavaScript, HTML/CSS, TabPFN, scikit-learn, Gemma-compatible endpoints, Docker, with Render and Vercel deployment support.

1. Solar math, no weather API. Sunrise, sunset, golden hour, civil dusk, solar noon, sunset azimuth, and day length are computed from latitude, longitude, date, and time-zone offset. That's enough to say "Leave by 17:42. Walk west." with no map tiles or weather service.

2. A generated, transparent dataset. The scoring engine trains on 1,400 generated dusk-walk rows. Features include temperature, rain, wind, cloud cover, humidity, latitude, day of year, minutes until sunset, foliage season, urban surroundings, and walk duration. Because the dataset comes from a transparent recipe, evaluation is repeatable rather than an unexplained number.

3. TabPFN with a Ridge baseline. TabPFN predicts the walk-quality score, and a Ridge regression model is trained alongside it as a baseline. The app reports held-out metrics so the two can be compared. The full TabPFN backend runs locally and on Render. Vercel uses the lightweight Ridge fallback because TabPFN's PyTorch dependencies exceed Vercel's serverless size limit. If TabPFN is unavailable, the app still issues a ticket.

4. Gemma writes the ticket, with offline recipes. When a compatible Gemma endpoint is available, it receives structured facts and returns a small JSON response: a title, a one-sentence lead, four sensory cues, a route, and a phone-away rule. The response is validated before it reaches the user. With no model endpoint, deterministic offline field recipes generate the ticket. That is an intentional product mode, not a broken fallback.

So Last Light works with local Ollama, with a hosted compatible endpoint, with no AI endpoint, with no weather API, and without storing field notes on a server.

The key design decision was making the screen temporary. There are no streaks, notifications, feeds, or scroll time. The product succeeds when the user stops using it.

Privacy: location is used only to issue a ticket. Field notes live in localStorage, with no account, database, or profile. The walk score is an experiment, not a safety guarantee, so use your own judgment about weather, lighting, traffic, and accessibility.

Why Does Open Innovation Matter?

This project is about reducing dependence on the screen, and open components made that design possible:

  • Privacy: with a closed hosted API, location and conditions would have to leave the device. With open-weight Gemma on Ollama, they don't.
  • Offline-first: the experience doesn't depend on a network connection, and the deterministic recipes work with no model at all.
  • Swappable and inspectable: anyone can replace the language model, read the prompt and validation rules, or run the scoring model on their own machine.
  • Controlled degradation: I could design exactly what happens when the model, TabPFN, or the network is missing, which is much harder behind a closed platform.
  • Remixable: someone can change the behavior without waiting for a vendor feature.

My Agent Session

Prize Categories

  • Best Use of TabPFN (Prior Labs): TabPFN scores dusk-walk conditions from a generated dataset of environmental, seasonal, solar, and duration features, with a Ridge baseline and held-out metrics for comparison.
  • Best Use of Gemma: Gemma writes the natural-language walk ticket from structured facts. Responses are validated, and deterministic field recipes keep the app working when no endpoint is running.

The screen prepares the walk. Then it gets out of the way. 🌿

Top comments (0)