A diary that multiplies grams by per-100 g nutrient values and compares totals to targets is an afternoon of code, and USDA's free FoodData Central supplies generic foods with many nutrients. The weekend goes into what Cronometer built over years: lab-analysed entries behind common foods, a community database whose packaged-food entries a curation team reviews, and phone logging with device sync. Open Food Facts covers barcodes with label data only, so the micronutrient totals will show gaps.
Before you buildCronometer Basic is free with full CSV export. If 7-day charts are enough for you, you may not need Gold.
Build me a personal nutrition tracker to replace Cronometer Gold. Requirements: - Node.js 22 + TypeScript: a Fastify API and a React UI built with Vite. `npm start` serves http://localhost:4890 with a layout that works in a phone browser over my home network. - Storage: better-sqlite3 in ./data/food.db: foods (source, source id, name, nutrients per 100 g as JSON), portions per food (label, grams), diary entries (time, food, grams, meal group), recipes (ingredients in grams plus cooked yield), biometrics (weight, blood pressure, one custom metric) and a daily target per nutrient. - Food data: USDA FoodData Central for generic foods (FDC_API_KEY in .env, free from api.data.gov) and Open Food Facts for barcodes, with a User-Agent that carries the contact email from .env and a limit of 10 requests a minute. Cache every food fetched, forever. When a food lacks a nutrient, show "no data" for it, never 0. - Diary: a day view with meal groups; search the local cache first; add by barcode (typed or camera scan with `@zxing/browser`); edit grams; copy yesterday; custom foods and recipes. - Nutrition: per-day totals for every nutrient against its target, with a count of logged foods that have no data for it. Seed targets from a targets.json of general US reference intakes by age and sex (set in config) and say in the UI that they are not medical advice. - Charts (`recharts`): weight, calories, protein and one chosen nutrient over 7, 30 and 90 days, plus a table of weekly averages. - Import and export: CSV export of diary servings and daily totals; an importer for the servings CSV from Cronometer's Export Data that maps columns by header and turns unmatched foods into custom foods, printing a summary before it writes. - Single user. No accounts, no telemetry, local-first. Outbound calls: FoodData Central and Open Food Facts lookups only. - Out of scope: wearable sync, photo and voice logging, fasting, an AI coach, native apps. - README: getting the FDC key, backing up ./data, and what the "no data" marker means.
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 Cronometer Gold.
Extend the nutrition tracker in this folder with a history importer. Requirements: - A command `food import-cronometer <file.csv>` that reads the servings CSV from Cronometer's Export Data and maps columns by header; unknown headers are listed, not guessed. - Match each food to an existing food by exact name, else create a custom food with the nutrient values from the row; print counts of matched, created and skipped rows first. - Support a dry run, and make running the same file twice safe by hashing each row. - Update the README with the export steps.
Add meal templates to the nutrition tracker in this folder. Requirements: - Save any set of diary entries as a named template; adding it logs every item with its grams to a chosen meal group and day. - A "repeat last time" button on each meal group that copies the most recent day with entries in that group. - Editing a template never changes past diary entries. - Update the README.
Add a weekly gaps report to the nutrition tracker in this folder. Requirements: - For each of the last 4 weeks, list nutrients whose weekly average is below 70% of target, with the three logged foods that contributed most and three foods in the cache that are rich in it. - Exclude nutrients where over 30% of logged foods have no data, and list them separately as "not measurable". - Write the report to ./data/reports/<week>.md every Monday at 08:00 and show it in the UI. - Update the README.
People who track micronutrients on purpose need numbers they can trust and a phone that logs a meal in seconds. Cronometer's curated database and its sync with trackers are what $10.99 buys; a home-built diary is only as good as the foods it can look up.
Estimate · Runs on your own machine; FoodData Central and Open Food Facts are free to query. The build is token usage on your agent plan.
Checked 2026-10-19 against Cronometer Gold's docs: 1, 2, 3, 4, 5
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Basic | $0 | $0 | Logging of food, exercise, biometrics and notes, barcode scanner, custom foods, meals and recipes, device and app sync, reports and charts limited to a 7-day window, ads, export of all raw data as CSV. |
| Gold | $10.99 | $4.99 | No ads, unlimited history and reports, Photo Log, Voice Log through Siri, Recipe Importer, Macro Scheduler, Fasting Timer, custom biometrics and charts, Nutrition Scores, food suggestions, Oracle nutrient search, printable reports, Crono Coach AI assistant. |
| Pro | custom | — | For health professionals: client dashboards, secure messaging, nutrition reports for EMR upload, BAA signing, free Gold on mobile for clients. |
Basic is free for as long as you like: food, exercise and biometric logging, a barcode scanner, custom foods and recipes, device sync, and charts limited to 7 days.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: A curated database with lab-analysed entries behind most common foods, Native iOS and Android apps with sync to fitness devices and apps.
About $10.99 a month on the Gold plan, $131.88 a year (checked 2026-10-19).
A curated database with lab-analysed entries behind most common foods; Native iOS and Android apps with sync to fitness devices and apps; Photo and voice logging and the Crono Coach assistant; Fasting timer, macro scheduler, nutrition scores and the Oracle nutrient search; Packaged-food coverage for brands and countries that Open Food Facts hasn't filled in. If any of those matter to you, keep paying.
Yes: wger (open source), OpenNutriTracker (open source), FoodYou (open source).