The brain of MacroFactor is a weight-trend filter and an expenditure estimate from what you eat and how your trend moves, which an agent can write in one sitting from first principles. The weekend goes to everything around it: a mobile-first logging screen with barcode scanning, and a food database. Open Food Facts and USDA data are free but patchy and partly crowd-sourced, while MacroFactor leans on a verified database of about 1.36 million items. If you can live with some wrong entries and logging from a phone browser, a personal version works.
Before you buildMacroFactor has no free plan, only a 7-day trial. OpenNutriTracker and Cronometer's free version cover basic logging at no cost.
Build me a calorie and macro tracker with a self-adjusting daily target to replace MacroFactor. Requirements: - Python 3.12: FastAPI with Jinja2 pages and a little HTMX, a web manifest and service worker so it installs as a phone PWA. `uv run fastapi run` serves http://localhost:4760. - Storage: SQLite (SQLAlchemy 2.0) in ./data/macros.db: foods (name, brand, barcode, per-100 g kcal, protein, carbs, fat, fibre, serving sizes, source), recipes, log entries that copy the macros at the time of logging, daily weights in kg, and a goal and profile. - Food lookup: search the local table first, then Open Food Facts (text and barcode) and USDA FoodData Central (`FDC_API_KEY` in .env). Cache every hit, show its source, and mark Open Food Facts entries as crowd-sourced. - Logging screen: recent foods first, quick-add calories and macros, copy yesterday's meal, recipes as ingredient sums with portions, and barcode scanning from the phone camera with the BarcodeDetector API and `@zxing/browser` as a fallback. - Weight trend: an exponentially smoothed line (alpha 0.1, configurable) that handles gaps. - Expenditure: over a rolling 21-day window, average logged kcal minus trend-weight change times 7,700 kcal per kg, divided by the days. Skip days I mark as not fully logged, and blend toward a Mifflin-St Jeor estimate while there is under two weeks of data. - Weekly check-in: from my goal (lose, hold or gain at a chosen kg per week) set next week's calorie target from the expenditure, split macros by protein g per kg and a fat share, and show the working step by step. - Charts with Chart.js: weight and trend, expenditure, calories against target, protein. - Single user. No accounts, no telemetry, local-first; the only outbound calls are food lookups. - Out of scope: workouts, native apps, photo or voice logging, vitamins and minerals, coaching. - README: setup, where food data comes from, and a warning that crowd-sourced entries can be wrong and that this is not medical advice.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own MacroFactor.
Extend the macro tracker in this folder. Requirements: - An import page for the spreadsheets from MacroFactor's Data Export: weight, nutrition and targets, as CSV or XLSX (`openpyxl`). - Map columns by header, show a preview, and skip rows that already exist by date and entry. - Recompute the trend and expenditure from the imported history. - Report rows that could not be read instead of dropping them. - Update the README.
Add label capture to the macro tracker in this folder. Requirements: - On the add-food screen, take or upload a photo of a nutrition label and extract per-serving values with an OpenAI-compatible vision endpoint from .env. - Show the extracted values in an editable form; nothing is saved until I confirm. - Say in the README exactly what is sent and that the model can misread numbers. - Update the README.
Add micronutrients to the macro tracker in this folder. Requirements: - Store a fixed list of micronutrients (iron, calcium, vitamin D, magnesium, potassium, sodium) per food when the source provides them. - A daily panel that sums them and compares each with a target I can edit. - Show which entries lack data, so a low total is not read as a deficiency. - Update the README, with a note that targets are mine to check with a professional.
Add weight import to the macro tracker in this folder. Requirements: - A /import/weights endpoint with a token from .env that accepts JSON posts of date and kg, for use with an iOS Shortcut. - Also accept a Garmin or Apple Health CSV upload with a column picker. - Never overwrite a weight I entered by hand for the same date; show conflicts. - Update the README.
The pitch is that you only log food and weight and the app handles the maths, and the verified database makes logging fast enough to keep doing. That consistency is what people pay for; the formula alone is the easy part.
Estimate · Runs on a $5 VPS or a home machine behind a tunnel; the food APIs are free. The build is token usage on your agent plan.
Checked 2026-10-19 against MacroFactor's docs: 1, 2, 3, 4, 5, 6
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Monthly | $11.99 | — | Full app: food logging, barcode and label scanning, AI photo logging, weight trend, expenditure and weekly targets. |
| Every six months | custom | — | The same app. |
| Yearly | — | $5.99 | The same app. |
| Bundle with MacroFactor Workouts | — | $7.50 | Nutrition app plus the separate Workouts app. |
No free tier. The apps offer a 7-day free trial.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: The verified food database and its barcode coverage, AI photo logging, label scanning and recipe import from a link.
About $11.99 a month on the Monthly subscription plan, $143.88 a year (checked 2026-10-19).
The verified food database and its barcode coverage; AI photo logging, label scanning and recipe import from a link; Vitamin and mineral tracking, progress photos and body measurements; Native iOS and Android apps with fast offline logging; The refinements MacroFactor layers on its expenditure algorithm, such as its expenditure modifiers. If any of those matter to you, keep paying.
Yes: OpenNutriTracker (open source), FitBook (open source), Cronometer (free).