Macros in seconds, even with no signal.Macros in seconds, even with no signal.
- Client
- My own product
- Type
- iPhone app · Nutrition & training
- Built with
- Expo · React Native · TypeScript
- Status
- In development
Scroll to begin

Built from scratch — from schema to screens.Built from scratch —from schema to screens.
Counting macros is tedious, and most trackers punish you for it: slow search, wrong entries, nothing works in a gym basement. MacroFitly is my answer: log by barcode, search, a typed sentence or a photo, with no signal needed, and a coach that measures your real maintenance calories from your own log instead of guessing them.
My part
Everything. Product, design, the React Native app, the Postgres schema and its functions, the sync engine, payments, the food data and the test tooling. I use AI agents heavily; the architecture, the reviews and every call are mine.
In development and not on the App Store. The new sync's first stage is built and reviewed on a branch, not yet in production; its next two stages are designed only. Training runs on sample data for now.
889
Commits on main in this rebuild, all mine
26
Screens, on 343 component files
11
Tables that sync between phone and server
290
Test files, plus a real-Postgres harness
30
Languages food can be searched in
4 × 8
Skins and accents, light and dark
Stack & services
- Expo
- React Native
- TypeScript
- SQLite
- Supabase
- PostgreSQL
- RevenueCat
- OpenRouter
- Product design
- Mobile engineering
- Backend & sync
Works offline. Agrees everywhere.Works offline.Agrees everywhere.
The phone is the source of truth. Everything you log lands in encrypted SQLite first, then syncs to Postgres when there's signal, field by field.
People
You
Logging a meal
Surfaces
The app
React Native, Expo
Reanimated · Skia
SQLite
Encrypted, on the phone
SQLCipher
Services
Sync engine
Outbox, clocks, cursor
HLC per column
AI endpoint
Gated, quota first
Edge Function
Payments
Plans and entitlements
RevenueCat
Data
Postgres
Supabase, row-level security
Postgres 17
Food data
USDA and Open Food Facts
pg_trgm aliases
01/05You scan a barcode in a basement gym. No signal.
Where did the banana go?Where did thebanana go?
The first sync shipped in July. In October I built a harness that runs it against a real Postgres, and it found a bug I'd never have seen by tapping around.
- ✗Two phones, offlinePhone A moves a meal from Monday to Tuesday. Phone B adds a banana to the same meal.
- ✗They syncThe banana ends up on no day at all, on both phones. Its date pointed at a day the meal had left.
- ↻PinnedThe harness reproduced it, and ten more, as tests that must fail until fixed.
- ↻The ruleThe server dates each food from its meal, and one writer per user takes a lock that waits at most two seconds.
- ✓Seventeen roundsA chaos simulator runs the real client through kills, clock jumps, time zones and expiring sessions, and shrinks every failure to a minimal replay.
- ✓Honest pillThe app only says Synced once the server has confirmed everything, and warns before signing out with unsynced changes.
- → The happy path was done in July. The work was everything around it.
Try to lose the banana.Try tolose the banana.
Two phones, offline, editing the same meal. Play it with the first sync, then with the fix.
Phone A
Monday
Lunch
- Oats
- Yoghurt
Tuesday
Food keeps its own date
Phone B
Monday
Lunch
- Oats
- Yoghurt
Tuesday
01/04Both phones have lunch on Monday. Both go offline.
Decisions that shaped it.Decisions thatshaped it.
A sync engine of my own
01 · The problem
It has to work with no signal, on two phones, without paying for a sync service.
02 · The call
Local encrypted SQLite is the truth. Every column carries its own hybrid logical clock, and one write function commits the row, its clocks and an outbox entry together.
03 · Why it matters
Edit your weight on one phone and the note on another, and both edits survive.
Logging that keeps up with your day.Logging that keeps upwith your day.
What's built today. Training is designed and running on sample data; it isn't listed here until it saves for real.
- 01
Log by photo or sentence
Photograph a plate or a label, or type what you ate. The AI names it; a food database supplies the macros.
- 02
Barcode and search
Scan packaged food, or search over a million products and generic foods in 30 languages.
- 03
A coach that measures
Your real maintenance, estimated from your own weigh-ins and log, with an honest ± range.
- 04
Works with no signal
Everything saves on the phone first and syncs field by field when you're back online.
- 05
Water, body and progress
A water tank that tilts with your phone, body metrics and nutrition trends.
- 06
Make it yours
Four skins and eight accents, light and dark, on one token system.

