← All work

A food tracker that reads the plate

A macro and calorie tracker where logging a meal is a photo or a sentence: a model proposes each item with a portion and its macros, I check and correct it, and it lands in the day.

Status
In daily use
Runs
Macro Meeter
Started
Jun 2026
Stack
FastAPISQLiteReact 19TypeScriptOpenRouterPlaywright WebKit
Macro Meeter: main view
138Automated tests
44iPhone checks per deploy
32REST endpoints
52Dated brand decisions

The Problem

Every tracker makes you search, weigh and tap for each item. I eat a mix of home cooking, restaurants and cafeteria food, so the workflow that actually works is: a photo or a sentence, a sane estimate I can correct, and it lands in the tracker. The app is the honest daily view; the model does the typing.

How It Works

The workflow, step by step.

  1. 01

    Show it the plate

    Estimate a Meal, in the Add sheet: up to three photos, a note, or both. The model proposes each item with a portion, its macros and how sure it is, and asks what the photo can't tell it. I edit, then add.

    Show it the plate
  2. 02

    See the day at a glance

    Four concentric rings: calories outermost, then protein, carbs and fat. Four meal cards show what's eaten and what's still planned.

    See the day at a glance
  3. 03

    Or add it by hand

    One picker for items, recipes and meals, ranked by how often and how recently I log each in that meal. A barcode scan fills a new item from Open Food Facts.

    Or add it by hand
  4. 04

    Grade every day honestly

    History shows weight and intake against a dotted target line, and grades each day. Protein is a floor; everything else is a ceiling.

    Grade every day honestly

AI Inside The Product

Three ways to let AI log a meal. Two were retired.

First a Claude Code skill, then an MCP server for the Claude app, then a button in the app itself. Each step was judged by daily use, and the one that stayed is the one I actually reach for. Retiring the other two was as deliberate as building them.

git log · macro-meeter
  1. logFirst · a /log-meal skill: photo to macros, a confirm table, a backed-up write over SSH
  2. logSep · an MCP server with 18 tools, so the Claude app could write to the tracker
  3. logOct 5 · AI logging, server side: POST /api/estimate, estimate record, settings, photo store
  4. logOct 5 · AI logging, phone side: Estimate a Meal in the Add sheet (photo and/or note, check, edit, add)
  5. logOct 5 · Retire the /log-meal skill: everyday logging goes through the MCP server
  6. logOct 13 · Retire the MCP server: it was never reachable outside the LAN and the Add sheet's estimate does its job

Commit subjects from the repo, lightly trimmed. Both retired pieces are zipped into an archive, not deleted.

On The Phone

A real phone layout, not a shrunk desktop.

Check the Estimate: each item, how sure it is, and a question
Check the Estimate: each item, how sure it is, and a question
Fix a portion and the four numbers rescale
Fix a portion and the four numbers rescale
A day: four concentric rings for calories and macros
A day: four concentric rings for calories and macros
Weight and intake against each day's target
Weight and intake against each day's target
The Menu: every item, recipe and meal
The Menu: every item, recipe and meal

The Details

Where the rigor shows.

01

An estimate writes nothing

The estimate endpoint only proposes. Nothing is logged until I add it, through the same API as a hand-logged item, and my Menu is never sent to the model: a strict local match offers one-tap swaps afterwards.

02

Targets with effective dates

Changing a goal never rewrites history: each day is graded against the target that applied that day.

03

Honest averages

A half-logged day can be marked Left Out. Its entries stay, but it's kept out of the rolling averages so a forgotten lunch doesn't flatter the week.

04

Idempotent writes

Entry IDs are built from date, slot and name, and writes are insert-or-replace, so retries and corrections can't double-log.

05

Deploys that can't clobber data

The deploy excludes the data folder, backs up the database, tags the previous image, and fails loudly. The old setup "failed silently for weeks".

06

Tested on the real browser

Three fixes that passed in Chromium failed on the iPhone, so the rule became: iOS-only bugs are checked in WebKit. The lesson lives in memory.

07

Color by rule

Each macro has a text color (4.5:1) and a shape color (3:1) per theme. Over-target laps are the same hue 0.15 darker in OKLCH, and a color-blind palette keeps every pair distinct.

08

Failure modes designed in

The barcode scanner treats "not found" differently from "can't reach the database", and typing the digits is always an option when the camera fails.

09

Privacy and cost as settings

The model is a setting. Every request tells the router to refuse providers that train on what they're sent, except one model chosen knowingly. Each estimate records its model, time and cost, and photos are cleaned and kept 30 days.

10

Checked like an iPhone, for free

44 Playwright WebKit checks walk the whole estimate flow at phone width on a temp copy of the database, with the model answered in the browser so a run spends nothing. The deploy refuses to ship if one fails.

Architecture

How the pieces fit.

  1. Photo or note
  2. React tracker
  3. FastAPI
  4. OpenRouter
  5. SQLite

One container on my home server, behind Cloudflare Access. The estimate goes out through OpenRouter and comes back as proposed items; only what I add is written. An MCP server sat beside it until October.

How AI Built It

The process behind the product.

  1. A skill, a server, then a button

    Phase one was a Claude Code skill; phase two an MCP server for the Claude app. Both worked, and neither fit a meal on the go, since the server was never reachable outside home. Phase three put the estimate in the app, and the other two were retired.

  2. From Reflex to React

    The first UI round-tripped every tap over a WebSocket. A written plan replaced it with a client-first React app that loads everything once and derives the rest in the browser.

  3. 28 rounds of brand

    Ten logo directions down to four concentric rings that double as the O in MACRO, every dimension derived from Lexend's stem. 52 dated decisions, including "Not what I meant. Go back a step."

  4. Memory that compounds

    5 sessions and 18 project memory notes, like verify-ios-with-webkit and deploy-no-compose-on-box, so each session starts where the last one learned something.

  5. Tests arrived with the AI

    Until October there were no automated tests. The estimate came with 82 server tests that replay saved model replies offline, and the 44 phone checks Claude wrote while building it, which I chose to keep.

In Motion

Estimate a Meal: a photo in, items to check, added to the day

More Screens