Skip to content
Projects / A93-08

Macros & Meals

A macro tracker that works out the grams for your next meal so you hit today's targets.

Part no.
A93-08
Status
beta
Platform
iOS
Year
2026
Stack
SwiftSwiftUISwiftDataVision OCRHealthKitClaude Haiku
0Mental maths at dinner
M0→M8Milestones specced before code
5Unit-tested maths modules
01 — The problem

Logging food tells you what went wrong after you've eaten. It doesn't tell you how much rice to put on the plate now.

02 — The case for it

Turn tracking into planning. Pick the foods you want, lock what's fixed, and the solver portions the rest to land on what's left of today's macros.

03 — Back of the napkin
Back of the napkinRough · not a forecast

Subscription, ≈ €3.99/mo, or a lifetime unlock.

  1. Downloads (assumption)5,000
  2. ×Download → paid5%
  3. =Paying users250
  4. ×Net revenue per user≈ €30/yr
  5. =Year-one revenue≈ €7,500
  6. −Label scans with Claude Haiku≈ $0.001 each
Running costs
Backend
none
Food database (Open Food Facts)
free, with attribution
Label structuring (optional)
fractions of a cent
At 10× / 100×

The maths runs on the phone, and barcode lookups hit an open database. Even heavy users cost less than a cent a day. The competition (MyFitnessPal, MacroFactor) is the constraint, not the cost.

Verdict

Cheap to run. Planning the meal before you eat it, not just logging it after, is the thing that sets it apart.

04 — How it works
Diagram · The portion solver
  1. 01TargetsDaily macros from your profile and weekly check-ins.
  2. 02RemainingWhat’s left today after the meals you’ve logged.
  3. 03Pick & lockChoose foods and lock any fixed portions.
  4. 04SolvePortionSolver rebalances the unlocked foods to hit what’s left.
  5. 05LogOne tap to log it, with barcode and label-OCR input.
06 — Engineering highlights
01

Labels read on the phone

The Vision framework reads nutrition labels on device. Claude Haiku optionally structures messy results, using a key kept in the Keychain.

02

Maths as a package

NutritionCore holds PortionSolver, Energy, Budget, WeightTrend and LabelTextParser, all unit tested and kept apart from the UI.

03

Spec-first

Product spec, algorithms with worked examples, data model and milestones were all written before the first Swift file.