david anderson
← All work Project 02 · Food & drink

Coffee Calc

A brew journal that suggests what to change next time. Log a cup, answer four quick questions, and it tells you how to adjust the grind and the ratio, in your own grinder's numbers.

Roles
Product owner, analyst, engineer
Platform
Mobile web app
For
People brewing coffee at home
Runs on
Docker, behind a Cloudflare Tunnel
01 · Problem

Ratio calculators help with the first cup, not the next one.

I'd know a cup was a bit sour but not what to change. Going from “sour” to “two clicks finer” takes experience most home brewers don't have.

What's online is mostly ratio calculators, which give you a starting recipe, and brew loggers, which store your numbers without interpreting them. Brewing guides explain the theory (sour usually means under-extracted, bitter over-extracted) but don't connect it to your beans, your method or your grinder. Home equipment adds its own confusion: the “cups” on a US coffee maker aren't real cups.

  • Job to be done: “Tell me what to change so tomorrow's cup is better than today's.”
  • Takeaway: The feedback after each cup matters more than the starting recipe.
02 · Roles

Turning brewing advice into rules.

I worked out which questions to ask and how each answer maps to an adjustment, designed the logging around a morning routine, and planned the accounts and limits needed to put it online. I built it with Claude Code and tested changes by brewing with it.

  • Business analystResearchGathered common dial-in advice and reduced it to a few rules about grind, ratio and body.
  • Product ownerFeedback designCut the questions to four taps (strength, taste, body, overall), because people skip anything longer.
  • Product ownerReal-world unitsSuggestions use your grinder's actual numbers. Water can be grams, ml, fluid ounces or your coffee maker's cups.
  • Product managerFlowBrews made ahead wait under “Made ahead”, then “Waiting for a taste”, until you rate them.
  • Software engineerAccountsNo sign-up form: each browser gets a private journal, and a passkey keeps it across devices.
  • Project managerGoing onlineRate limits, storage caps, data expiry and automatic backups, in place before it went public.
03 · Requirements

What it had to do

An excerpt of the requirements, each written so it could be tested.

coffee-calc / advisor.mdexcerpt
  1. Taste sets the grind. Sour suggests finer, bitter suggests coarser. A balanced cup leaves the grind alone unless the body says otherwise.
  2. Strength sets the ratio. Weak adds coffee, strong removes it. Espresso keeps the dose and changes the yield instead.
  3. Don't overshoot. If the last cup of the same beans went the other way, split the difference.
  4. Real grinder settings. Suggestions stay within the user's grinder range, including dials that count down as they get coarser.
  5. Start from the advice. The next brew form is pre-filled with the suggestion. “Keep ratio” holds whatever ratio the brew is at.
  6. Store exact values. Brews are stored in grams whatever unit was entered, so ratios and advice stay exact.
04 · Decisions

Decisions and trade-offs

Four questions, not a tasting wheel

Three-way choices plus a rating, with optional notes.

WhyFeedback only helps if people give it every morning, so speed mattered more than detail.

Readable rules, not a model

The advice is a short rule set in one file.

WhyI can see why it suggests something, test it and tune it, and so can anyone reading the code.

Journal first, account later

Every browser gets a private journal on first save. A passkey keeps it and syncs it.

WhyNobody wants to sign up before their first coffee. Unused guest journals are deleted after 30 days.

Measure your own cup

A setup step measures your coffee maker's cup line once. After that you just pick a number of cups.

WhyThat's how people actually fill a drip machine.

05 · Alternatives

How it compares

The usual options are ratio calculators, brew-logging apps and written dial-in guides.

Coffee Calc and typical alternatives
NeedTypical alternativeCoffee Calc
What to change nextA calculator gives a start; a logger just stores itA specific grind and ratio change for the next brew
Your equipmentGeneral advice like “go finer”Your grinder's actual settings
UnitsUsually grams onlyGrams, ml, fluid ounces or your machine's cups
HistoryEach brew stands aloneUses the last cup of the same beans to avoid overshooting
Getting startedAn account or an app-store installOpen it and log a brew; keep it with a passkey
06 · Stack

What it's built with

Frontend
React, Vite, Tailwind CSS, TanStack Query; follows the phone's light or dark mode
Backend
Python, FastAPI, SQLAlchemy, Alembic; the advice rules in one tested module
Data
SQLite in a Docker volume, backed up on every start (newest ten kept)
Auth
Cookie-bound guest journals, WebAuthn passkeys, one-time sign-in links
Hosting
One Docker image, published through a Cloudflare Tunnel
CI
pytest, ruff, Vitest, ESLint, type checks, pip-audit, npm audit; Renovate for updates
AI-assisted coding
Claude Code
How it was built

The rules took the most thought, and I worked those out. Claude Code wrote the code and tests from my notes. I checked each change by brewing, rating the cup, and seeing whether the next suggestion made sense.

07 · Status

Where it is now

Working and self-hosted. I'm moving it to Cloudflare along with the other projects.

Next: Per-bean summaries, such as the best recipe so far for a given roast.