I had recipes everywhere.

Cookie & Kate links in a "Recipes 🌢πŸ₯¦πŸ•" thread in my email. Apple Notes from the time I copied a tofu marinade off Instagram before it scrolled into the void. A photo of a Pike Place Market chalkboard. Three browser tabs open since the Obama administration. Two cookbooks on the shelf I never opened because I couldn't remember which one had the lentil dal. A printed PDF of an endurance fueling recipe shoved between two issues of Cartographic Perspectives.

On a weeknight, finding the recipe took more effort than cooking it. I'd give up and make pasta.

This post is about how I fixed that, and how the fix turned into a small, real piece of personal infrastructure I now use several times a week. The cookbook is the demo. What's underneath it is the fun part.

What I wanted

A single searchable page on my own site at brooksgroves.com/recipes.html that holds every recipe I cook. Filterable by ingredient, cuisine, cook time and dietary tags. Same parchment palette as the rest of the site, so it doesn't feel like a third-party tool bolted on. Mine, static and fast.

That part was easy: static HTML, a recipes.json file, and a little JavaScript to filter and render. Day one.

The hard part was the input pipeline. If I had to hand-type recipes into a JSON file, I'd stop after the third one. Bookmarks piled up everywhere in the first place because structuring a recipe is a chore. If I didn't fix the input side, the cookbook would become the next graveyard.

What I built

Three pieces, stacked on each other.

1. A Cloudflare Worker

About 230 lines of code holding two encrypted secrets (an Anthropic API key and a fine-grained GitHub Personal Access Token), with four HTTP routes:

RouteWhat it does
POST /Relays requests to Anthropic's Messages API
POST /save-recipeAppends a recipe to recipes.json via the GitHub Contents API
POST /delete-recipeRemoves one by slug
POST /update-recipeEdits one in place

It runs on the free tier, the browser never sees the secrets, and CORS is allowlisted to my domain.

2. A Recipe Extractor at /recipes/extract.html

Three input modes: paste a URL, paste raw text (for paywalled sites, Apple Notes, screenshot OCR), or drop a photo. Every mode sends the content to Claude with a schema prompt. One Save to Cookbook button commits the structured JSON straight to recipes.json on GitHub. The site rebuilds, and the recipe is live on my phone in about thirty seconds.

3. The cookbook at /recipes.html

Search it, filter it, tap a card to open it. An Admin button hides the edit and delete controls. A Share button lets me text a recipe to anyone, and the link opens straight to the right card, already expanded.

That's the whole system. I see a recipe on Instagram, screenshot it, paste it into the extractor's Photo tab and hit Save. Now I can find it again.

Why it works the way it works

The Worker as the linchpin

Every API key in this system lives encrypted in Cloudflare, and browser code never touches them. I want to use this from my phone, in any browser on any network, without typing in credentials, and that's the only sane way to set it up.

The Worker is also general-purpose. I didn't build a "recipe Worker," just a Worker, with routes. The same encrypted-keys-plus-GitHub-commit pattern is already on my list for a Save Concert button on my setlist log, a Save Book flow that takes a Goodreads URL, and an auto-summarizer for the day's Giro d'Italia stage. Once the base is there, each new feature costs less.

Structure first

Every recipe in recipes.json follows the same shape:

{
  "slug": "miso-glazed-tofu",
  "title": "Miso-Glazed Tofu",
  "cuisine": "Japanese",
  "category": "Main",
  "cook_time_min": 30,
  "active_time_min": 15,
  "servings": 2,
  "source": "Pike Place",
  "dietary": ["vegetarian", "vegan"],
  "added": "2026-04-10",
  "ingredients": [
    { "qty": "1 (14 oz)", "item": "extra-firm tofu, pressed and sliced 3/4-inch thick" }
  ],
  "steps": ["..."],
  "notes": "Watch closely under the broiler β€” sugar burns fast."
}

Boring and predictable, which is what I want. Anything I decide to do later, like filtering, scaling or exporting, works on this shape without re-typing recipes. The schema also encodes my dietary preference directly into the Claude system prompt. If a recipe calls for chicken stock, the extractor swaps in vegetable stock and notes the change. I can extract from omnivore food blogs without thinking about it.

Static site, live edits

The whole site is GitHub Pages: a glorified file server with no database and no runtime. By routing writes through a Worker that hits the GitHub Contents API, I get the appearance of a database with none of the maintenance. Every save and every edit is a real commit. If I delete a recipe by accident, git log recipes.json shows me every prior version, recoverable with a single command.

I think versioned data without a database is one of the most underrated tricks in small-scale software.

What broke

Plenty. Here it is, roughly in order of how long each took to figure out.

Mojibake spiral

The first save worked fine. The fifth corrupted recipes.json. The Worker's base64 decode was using atob() directly, which returns a binary string where each character represents one byte. For ASCII that looks right. For an em-dash or a degree symbol (multi-byte in UTF-8), every read-and-rewrite cycle re-interpreted the bytes and added a layer of garbage. By the time I noticed, one recipe's notes field had ballooned from "Watch closely β€” sugar burns fast" to 393,301 characters of nested Γƒ and Γ‚ sequences. The whole file was 1.46 MB.

The fix was a proper UTF-8 decoder using TextDecoder. The lesson is as old as Unicode: if you find yourself doing String.fromCharCode(...new TextEncoder().encode(s)), stop and ask whether you want bytes or characters, because the shortcut gets worse every time it runs.

Stack overflow on save

A spread operator into String.fromCharCode works fine when the array is small. Above ~30 KB of input, the engine refuses. Fixed by chunking the encode loop into 32 KB slices.

Git treating HTML as binary

A stray *.html binary line in .gitattributes from years ago meant every commit showed Binary files differ instead of a real diff. Merge conflicts were unrecoverable. Fixed by writing a proper .gitattributes declaring HTML/JSON/CSS/JS as text with LF line endings.

Cache poisoning

GitHub Pages serves static files with caching hints that, in practice, meant my browser would show yesterday's JavaScript long after I'd shipped today's. Fixed with Cache-Control: no-cache, no-store, must-revalidate meta tags on the tool pages, since pages I'm still changing shouldn't cache.

Each of these bugs took 10 to 90 minutes to track down, and each was a four-line fix. Fixing them is what turned a proof-of-concept into something I trust to hold years of recipes.

What it's like to use

Here's an actual recipe-add, start to finish:

  1. I'm in the kitchen and want to save the Cookie & Kate enchilada recipe I've been meaning to try.
  2. I tap the Recipe Extractor bookmark on my phone.
  3. I paste the URL, hit Extract. About 8 seconds later, structured JSON appears.
  4. I tap Save to Cookbook. A real GitHub commit fires. A green confirmation shows the commit SHA.
  5. About 30 seconds later, GitHub Pages has rebuilt. The recipe is live, searchable, filterable by cuisine.

Under a minute, start to finish, and no typing.

When the extractor gets a category wrong (calling a Mediterranean dish "American" because Cookie & Kate's metadata is fuzzy), I open the card, hit the pencil icon, fix the JSON in place and save. That's another real commit, and the site rebuilds.

The bigger picture

The cookbook is the first feature of something larger: a small AI infrastructure for my personal site that I can keep adding to. The Worker is the load-bearing wall.

A few things I came away with:

A static site with one tiny serverless backend punches way above its weight. There's no database, Docker, deploy pipeline or monitoring stack. It costs zero dollars to run, and there's next to nothing that can break in the middle of the night. The Worker has been running for two weeks and handled thousands of requests, and I haven't thought about its health once.

LLMs are good at turning messy input into clean output. Every recipe page on the internet has a different shape. Some have JSON-LD schema and some don't. Some hide behind ad walls. Some make you scroll through a life story before the recipe starts. None of that matters when Claude can pour the content into a fixed schema, swap meat for vegetarian equivalents and fill in sensible values for missing fields.

Friction kills personal projects. If adding a recipe meant hand-typing JSON, I'd have abandoned the cookbook by now. Every minute I cut from adding a recipe made it more likely I'd actually use the thing.

Versioned data with no database is about as close to a free lunch as small-scale software gets. Every save is a commit, every commit can be recovered, and the audit log comes for free. When did I add a recipe? What did it look like before I edited it? Who changed it? git log answers all of that without me building anything.

What's next

The same Worker pattern is already on the list for other parts of the site: a Save Concert button on the setlist log, a Save Book flow, maybe a geocache save route.

On the cookbook itself: better cooking-from-the-recipe view (scale to N servings, imperial/metric toggle, checkbox ingredient tracking), and freeform tags beyond cuisine and category β€” "potluck," "weeknight," "from a friend."

Mostly, though, what's next is using it. Two weeks of cooking from it told me more about what to build than any amount of planning. The cookbook has 8 recipes now. By the end of the year it'll have 80, and by then I'll know what the next feature should be.

The friction is gone. That's what I was after all along.


The cookbook is at brooksgroves.com/recipes.html. The whole site is open source on GitHub. The Worker isn't, since it's holding my keys.