Back to projects

Cobok

2026

A recipe app for family and friends. A Claude agent searches the web for trusted recipes, writes them up and finds real photos; recipes are shared across accounts, so each dish is generated once and everyone gets it from the shelf afterwards.

  • Next.js
  • TypeScript
  • Drizzle ORM
  • Turso
  • Claude API
  • Vercel
  • vitest
  • A Claude 'chef' streams its work over server-sent events, searches the web, and returns a recipe through a strict `submit_recipe` tool call that is validated with zod.
  • Recipes are shared across accounts, so a dish generated once is free for everyone else; each user keeps their own notes, cooked history and daily limit.
  • Next.js + Drizzle + Turso, deployed on Vercel, with invite-code auth, a servings scaler, cook mode and vitest coverage.

The problem


My family wanted one place to keep recipes we actually cook, not another app that makes you paste ingredients into a form. Asking an LLM for a recipe usually returns something plausible and untrustworthy, with cups and Fahrenheit mixed into a metric kitchen.

Cobok takes the opposite approach: the agent has to find a real recipe on the web, cite where it came from, and return it in a shape the app can validate. The result is a shared shelf rather than a chat log.

How it works


  • The chef runs as a server-side streaming endpoint: `thinking`, then `searching` with Claude's web search tool, then `writing`, then `photos`.
  • It returns the recipe by calling a strict `submit_recipe` tool rather than writing prose, and the app validates the result with zod before storing it.
  • Metric only: anything with cups, ounces or Fahrenheit is sent back to be fixed.
  • Real photos come from Pexels and from the source recipe's own page; the agent is told to find a photo that matches the dish, not a generic stock image.
  • Recipes are shared across accounts, so the second person to ask for a dish gets it instantly at no extra API cost.
  • Each account has its own recipe box, cooked history, notes and a daily chef limit; a refused or failed request does not count against it.
  • Invite-code auth keeps the family instance closed, and the database runs on Turso so the Vercel deployment has somewhere persistent to write.

What I learned


The tool call is what makes the agent usable. Free-form recipe text is easy to generate and miserable to parse; a declared shape that is validated on arrival turns the model into a component that either produces a recipe or fails visibly.

Sharing generation across accounts was the other design decision that mattered. It changes the economics of the app — most requests are cache hits — and it matches how a family actually cooks: someone asks for a dish once, and everyone else benefits.