Case study · Health tech · 2026 – Present
Nourish.
An AI-Snap-first calorie tracker — photograph a meal, get macros — built on Claude vision, barcode-grounded, and synced to Apple Health and Health Connect.
Photo → macros
AI Snap core loop
Claude vision
server-side, tool-use
iOS + Android
Health sync both
Day-one i18n
lint-enforced
The problem
Calorie tracking has a brutal retention problem: people download a tracker in January, log diligently for two weeks, and quit when the friction of searching a database and guessing portions outweighs the payoff. The dominant incumbent, MyFitnessPal, made this worse in 2022 by moving its barcode scanner behind a paywall[4]— turning its single biggest friction-reducer into a resentment driver and a durable stream of "MyFitnessPal alternative" searches.
Then in 2025 the category was redefined almost overnight. Cal AI, a photo-calorie app built by two teenagers, hit 15M+ downloads and a ~$30M revenue run-rate in under two years and was acquired by MyFitnessPal in late 2025[2][7]— proving the incumbent couldn't build the snap-a-meal category fast enough internally. Nourish was built in that window, on the same core insight, with a sharper honesty about where AI estimates break.
Market & opportunity
$4.56B1
diet & nutrition apps market by 2030 (~13% CAGR)
15M+2
Cal AI downloads in <2 yrs — then acquired by MyFitnessPal
200M3
MyFitnessPal registered users; 30M+ monthly active
~39%6
AI portion-size accuracy — the category's open wound
The diet & nutrition app market is estimated at roughly $2.1B in 2024 growing to ~$4.56B by 2030 at a ~13% CAGR by Grand View Research[1]— though firm-to-firm estimates diverge two-to-three-fold, so the growth direction is more reliable than any single dollar figure. What's unambiguous is the structural shift: AI photo logging has gone from novelty to table stakes in 18 months. YAZIO, Lifesum, Lose It! and HealthifyMe's "Snap" all ship some form of it, and Cal AI's acquisition was the category's definitive signal.
The most load-bearing fact for Nourish's thesis is on the public record: Cal AI itself runs on Anthropic + OpenAI vision models with retrieval over open food databases[2]. The Claude-vision approach isn't speculative — it's what the category leader already does. And the open wound is accuracy: peer-reviewed work in 2024–2025 found AI identifies a food at 68–86% but portion-size estimation collapses to ~39%, with LLMs averaging ~40% error on energy[6]. That gap is the design brief.
Who it's for
Lapsed trackers — the ~70% who abandon a food log within two weeks because manual entry is too slow — and paywall refugees who resent paying to scan a barcode. Nourish targets the user who wants the frictionless snap UX of Cal AI but distrusts a black-box number, and who lives inside Apple Health or Health Connect already.
Constraints
- The Anthropic key can never ship in the binary. Vision inference is the product; the API key is a liability. All Snap calls go through a Supabase Edge Function, never the client.
- AI estimates are wrong often enough to matter. A tracker that silently logs a confidently-wrong number erodes trust fast. Every AI result has to be cheap to correct.
- Health data sync must work on both platforms. Apple HealthKit and Android Health Connect have different permission models; both need read + write.
- Apple's account-deletion and data rules apply. Sign in with Apple requires server-side token revocation on account delete (Guideline 5.1.1).
- Internationalised from commit one.Retrofitting i18n across a tracker's hundreds of strings is the kind of multi-day tax this build refused to take on later.
Architecture & what I built
The AI Snap pipeline (Claude vision, tool-use, quota-capped)
The core loop is a Supabase Edge Function, analyze-food: the client captures a photo, sends base64 + media type, and the function calls Claude with a forced log_foods tool call. Forcing tool-use means the model mustreturn structured JSON — an array of food items with servings, per-item macros, and a confidence score — instead of prose I'd have to parse. A per-user daily spend cap in a shared quota.ts module backstops cost. The Anthropic key lives in a Deno secret, server-side only.
Honesty as a feature: editable results + barcode grounding
Because portion accuracy is the category's weak point, Snap results land in a Zustand store as a draft the user edits or deletes before committing — never a silent log. For anything packaged, the barcode scanner over Open Food Factssidesteps vision guesswork entirely with a real, grounded number — and Nourish keeps it free, directly courting MyFitnessPal's paywalled users.
Backend, state, and offline behaviour
Supabase Postgres holds accounts (profile + macro targets), foods, meals, exercises, and health syncs. Auth bootstraps an anonymous user on first launch, then upgrades to email/Apple on demand — so the app is useful before any sign-up wall. State splits cleanly: Zustand for transient UI (the Snap draft, onboarding) and TanStack Query for server data, with network-error detection driving an offline banner and one-shot retry instead of spammy refetches.
Health sync, monetisation, and the platform footguns
- Apple Health + Health Connect via a single
health.tsabstraction that reads steps and active energy and writes workouts back, platform-detected at runtime. - RevenueCat hosts the paywall UI; the customer is linked to the Supabase uid on sign-in, with a single premium entitlement gating Snap.
- Apple token revocation wired through an
apple-linkfunction that exchanges the one-time auth code for a refresh token (service-role protected) so account deletion can actually revoke it — the thing most apps quietly skip. - A pinned patch to supabase-js: versions ≥2.106 ship a dynamic
import(OTEL_PKG)that Hermes can't compile, so it's patched out via a pnpm patch — re-verified on every SDK bump.
Trade-offs
- Claude vision over a cheaper/faster model. Vision quality drives whether the whole loop feels magic or junk, so Nourish pays for a strong model and caps spend per user rather than degrading to a weaker one. The cost is per-Snap economics that have to be watched.
- Draft-then-commit over auto-log.Auto-logging the AI result would feel faster and more "magic," but it ships wrong numbers. Nourish chose the extra tap; the bet is that trust retains better than a dopamine hit.
- Free barcode over paywalling it.Keeping barcode free forgoes the obvious MyFitnessPal-style monetisation lever, but it's the cleanest wedge against the incumbent's most-resented decision.
Goals & what's next
Outcome
Nourish is live on the App Store and Play Store, shipping the snap-a-meal loop the category leader spent two years and an acquisition to own — with a server-mediated Claude pipeline, free barcode grounding, two-platform Health sync, and the platform-compliance details (Apple token revocation, anonymous bootstrap) most indie trackers skip. The deeper bet is that in a category racing toward "magic" AI numbers, being honest about the estimate is the durable retention advantage.
Sources & references
- 1.Diet And Nutrition Apps Market Size, Industry Report 2030 — Grand View Research, 2025.
- 2.Photo calorie app Cal AI, downloaded over a million times, was built by two teenagers — TechCrunch, 2025.
- 3.MyFitnessPal Revenue and Usage Statistics — Business of Apps, 2026.
- 4.MyFitnessPal's barcode scanner will only be available to Premium users — XDA Developers, 2022.
- 5.Noom revenue, valuation & funding — Sacra, 2025.
- 6.Apps That Calculate Calories From Photos: Are They Accurate? (citing Fridolfsson et al. 2025) — Fitia / PMC, 2026.
- 7.MyFitnessPal has acquired Cal AI, the viral calorie app built by teens — TechCrunch, 2026.
Stack
Want help shipping something like this? Book a call, or grab the snippets this case study draws from.