Skip to content

About

A cheeky potato chef and coach. Reads your WHOOP recovery and a fridge photo, then suggests dinner. Built in one day at an SFTechWeek Hackathon..

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Watts for Dinner 🥔

Watts is a warm, slightly cheeky potato who's your personal chef and coach. He reads your WHOOP recovery, looks in your fridge from one photo, and suggests three recipes that fit your energy tonight, from a quick fix to something more ambitious. Pick one and he gives you a short shopping list and step-by-step directions, then remembers which meals were keepers so tomorrow's ideas get better.

Live demo: https://watts-for-dinner.fly.dev (sign in with Google)

📸 Screenshot coming soon.

How it works

  • TanStack Start (React, TypeScript, Tailwind) for the app and its server routes and server functions.
  • Mastra agent (src/agent) with tools for profile, recovery, recipes, cooking steps, meal memory and keeper ratings.
  • Claude (Sonnet) through the Neon AI Gateway, including vision for fridge photos.
  • Neon Postgres for profiles, meals, ratings and WHOOP tokens: one SQL file, no ORM (src/db/schema.sql).
  • Better Auth with Google sign-in, stored in the same Neon database.
  • assistant-ui for the streaming chat and recipe cards.
  • Spoonacular for real recipes, ranked by what's already in your fridge.
  • WHOOP API v2 for recovery, strain and sleep.
  • Fly.io for hosting (Dockerfile, fly.toml).
  • CodeRabbit reviews every pull request.

The browser never talks to outside services: every API key stays on the server.

The WHOOP toolkit (src/whoop)

A tiny, dependency-free WHOOP API v2 client you can lift into your own project: OAuth helpers, typed reads, and token refresh that handles WHOOP's refresh-token rotation. Plain fetch, so it runs on Node, Bun, Deno and edge runtimes.

import { buildAuthorizeUrl, createWhoopClient, exchangeCode } from "./whoop";

// 1. Send the user to WHOOP (request "offline" to get a refresh token)
const url = buildAuthorizeUrl({ clientId, redirectUri, state, scopes: ["offline", "read:recovery", "read:cycles", "read:sleep"] });

// 2. In your callback, after checking state
const tokens = await exchangeCode({ clientId, clientSecret, code, redirectUri });

// 3. Read data; persist every refreshed token set
const whoop = createWhoopClient({ clientId, clientSecret, tokens, onTokens: saveTokens });
const recovery = await whoop.getLatestRecovery(); // score.recovery_score, hrv_rmssd_milli, resting_heart_rate

More in src/whoop/README.md. Example responses (real shape, made-up values) are in src/whoop/fixtures/.

Run it yourself

  1. Copy .env.example to .env.local and fill it in: Neon DATABASE_URL, Neon AI Gateway, Better Auth + Google OAuth, WHOOP and Spoonacular keys.

  2. Install, create the tables and start:

    pnpm install
    pnpm db:migrate
    pnpm dev --port 3100
  3. Spoonacular's free tier is 50 points a day, so in development set FAKE_SPOONACULAR=1 to use the fixtures in src/recipes/fixtures/.

Register http://localhost:3100/api/auth/callback/google with Google and http://localhost:3100/api/whoop/callback with WHOOP.

Fork it for your goals

Watts' personality and rules live in one place: the instructions in src/agent/watts.ts. Change the effort bands, the tone, or what he optimises for (marathon training, a budget, a picky toddler), and the tools in src/agent/tools/ keep working. The model id is the WATTS_MODEL constant in the same file.

Roadmap

  • Same-fridge memory: remember what was in your fridge so you don't need a new photo every night.
  • 3D Watts moods: an animated Watts that thinks and talks along with the chat.
  • Voice: talk to Watts while your hands are busy.
  • Exa recipe inspiration: ideas from around the web, beyond Spoonacular.

Credits

Food photos in public/recipes/ are from Unsplash, used under the Unsplash License:

Fonts: Fraunces and Inter, both under the SIL Open Font License.

Recipe data from Spoonacular. Built by Bianca and Michael at a hackathon.

Licence and privacy

MIT © 2026 Bianca and Michael. See the privacy policy for what we collect and why.

About

A cheeky potato chef and coach. Reads your WHOOP recovery and a fridge photo, then suggests dinner. Built in one day at an SFTechWeek Hackathon..

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages