← CartMyMeals
Product story

Why this exists, and how it’s built

The problem, who it’s for, where it sits among existing tools, how it works in five levels, what building it taught me, what it will never do, and what’s still missing.

Sunday, 4:00 → 5:0037 tabsTacos?again?protein?Do we haveeggs??!???Every week.
Summary

An hour of chores, every week

Every week, people who eat to a goal spend an hour or so on the same chores: adding up calories from labels, checking what’s in the fridge, writing a grocery list, and searching a store’s website for each item.

CartMyMeals plans your week around your goals, skips what you already have, and shows how every number was worked out. Then it fills your own Walmart cart in one click.

Why and how I built this

Why

Eating to a goal is a weekly chore.

I wanted one path from goal to cart.

How
01

The problem

Planning meals to a goal is hard. Even a good plan fails without the ingredients.

1. Hard to plan

Hitting 1,800 calories and 120 g of protein means adding up every label. AI chatbots just guess.

“Where did 420 calories come from?” The chatbot made it up.

2. No ingredients

Some of it is at home. The rest waits for a store run, or an order you put off or forget.

“I have the plan, but not the ingredients until Saturday.”

3. Goal missed

So you swap in what you have, like pasta for chicken, and the week drifts off target.

“I swapped in pasta and fell 30 g short on protein.”
02

Who it is for

Three people I designed for, each mapped to a feature that serves them. Hypotheses Checked with a few friends; not yet validated at scale.

MayaThe macro tracker · Trains four times a week
Goal

1,800 calories and 120 g protein a day, without a spreadsheet.

“I spend Sunday adding up labels, and I still don’t trust the numbers.”
What helps

Every number computed from USDA data, with the math shown.

Priya and SamThe family planners · Two kids, one with a nut allergy
Goal

One menu the whole family eats, sized for the kids.

“By the time I’ve checked every label and built the cart, dinner is late.”
What helps

Kids’ portions and allergies, and the whole list in one Walmart cart.

JordanThe plant-based cook · Vegan, with a full pantry
Goal

Enough protein, without wasting what’s already at home.

“Half my lentils expire because I forget I bought them.”
What helps

Vegan filters, and a week planned around the pantry first.

Willingness to pay Hypothesis Strong interest in anything that saves one to two hours a week and removes nutritional guesswork. Not yet tested.

03

The landscape

Trackers get the numbers right after you’ve eaten. Chatbots plan ahead but recall their numbers. Meal kits ignore what’s in your fridge. No one plans ahead with verifiable numbers and ends at a cart.

04

The solution, in levels

Each level removes one kind of risk before the next is added. Levels 1 to 3 are built and running; this is the same engine behind the try-it page.
  1. 1

    LLM answerer (the baseline)Built

    Profile in, seven-day plan out. The model invents meals and recalls their calories. Kept deliberately, as a live benchmark: its figures disagree with Level 2’s by roughly 15% on calories and 17% on protein.

  2. 2

    Retrieval with computed nutritionBuilt

    The model may only pick recipe ids from a shortlist. Every calorie is arithmetic in a database view: 60 g oats × 380 kcal/100 g = 228 kcal. Change a gram weight and every total that uses it updates.

  3. 3

    Pantry shortfall and a scoped cartBuilt

    Need minus have, in grams, across three unit systems (grams, packages, shoppable units). Each gap is matched to a real product by a scorer; weak matches are declined and shown, never guessed. The cart is built and handed over at checkout, on the demo store or as one link that fills the shopper’s own Walmart cart.

  4. 4

    OrchestrationNext

    Several models behind one controller, two approval gates as real product surfaces, and a visible run trace of which model ran, what it cost and where it waited for a human.

  5. 5

    Preference rerankerNot started

    A small model trained on logged Keep / Swap / Skip decisions, reranking candidates without loosening the guardrails. Waiting on enough real decisions; they are logged from day one and cannot be backfilled.

How it’s built

Guardrails:No checkout tool: a person always paysYou approve the menu firstThe model picks recipes, never numbersLow-confidence matches go back to youAllergies filter every mealAll nine →Evals: five automated checks run against the real planner and storeDiet rules 80/80Allergies 20/20Nutrition fit 30/36Pantry reading 42/42Cart matching 51/51How I test it →

Next.js 16 and React 19 on Vercel · TypeScript · Postgres on Neon · Walmart prices via SerpApi · Shopify Storefront GraphQL · Claude Sonnet 5 and Opus 5 · USDA FoodData Central

Integrations

7 grocery integrations built or evaluated. One is live for shoppers; ordering sits behind one interface (a shortfall list in, a cart out), so the rest can drop in without touching the planner.

The public version

Anyone can try it, with no account:

  1. Describe who’s eating. Diet, style, calories, protein and allergies, for adults and kids.
  2. List the pantry, or skip it. The week is planned around what’s at home.
  3. Edit and approve. Replace or remove meals; nothing is listed until you approve.
  4. Fill your Walmart cart in one click, or save the list for any store.

It runs on retrieval alone, with no model call, so it’s instant, free to run, and private.

Example of what it produces
A real week from Try it: 28 meals for an 1,800-calorie target, each coloured by its main protein, with Replace and Remove buttons
A real week from Try it: an 1,800-calorie target, planned around four pantry items.
05

What building it taught me

Six things I’d take into the next product.
06

Guardrails: what the agent cannot do

The principle is safety by architecture, not by prompt.

No purchasing

Checkout tools such as complete_checkout are never wired in. The agent can stage a cart; only a person can pay.

Show what was sent

Some cart APIs are write-only and can’t be read back, so every payload is recorded and shown, and test environments are labeled as test.

No silent substitutions

Below a confidence threshold the match is declined, the reason is shown, and the choice goes back to the person.

You approve first

Nothing goes on a shopping list until you approve the week. A scanned receipt becomes rows you check before they count, and scans are capped per visitor per day.

Allergies cover the whole table

“Soy” removes tofu, edamame and soy sauce, not just the word. A child’s allergy applies to everyone’s meals, since the family eats together. The allergy eval checks this: 20 of 20.

Says no instead of guessing

If no meal fits your diet and allergies, it tells you rather than bending a rule. A pantry line it can’t read, or a “box” with no known weight, is flagged, not guessed.

The model can’t invent numbers

It picks recipe ids from a retrieved shortlist and never writes a calorie. An id outside that list is dropped and reported; every figure is computed from gram weights.

Edits can’t bend the rules

Replace and Add only offer meals that already passed your diet and allergy filters, and the server re-checks every choice, so an edited request can’t bring a meal back in.

Warns before it adds

Walmart’s link adds to whatever is already in your cart and can’t empty it, so the page tells you to empty it first rather than letting old items slip through.

07

Success criteria

These are targets, not measured results. The app has not yet run at a scale that could measure them.
MetricTargetWhere it stands
Weekly planning and ordering timeFrom ~60 minutes to under 10Not yet measured
Nutrition figures produced by a modelZeroMet by design Every figure is computed from gram weights, using USDA values for 51 of 52 ingredients.
Product match precisionOver 90% of matches accepted first time; no unflagged wrong substitutesPartly built In the offline eval every stocked ingredient matched the right product and none matched a wrong one; acceptance by real shoppers not yet measured
From list to a real retailer’s cartOne click, no retypingMet for Walmart The whole list goes to the shopper’s Walmart cart in one link; Instacart and Amazon still go item by item
Food wasteLess leftover food each week, by netting out what is on handPartly built Pantry netting built; waste not yet measured
08

How I test it

Five evals run the same code the site runs and judge it against rules written out separately, so a bug in the planner can’t also hide itself from the test. No model is called, so a run is free and gives the same answer twice. Last run September 30, 2026.
EvalWhat it asksResult
Diet and style rules
safety check
Across every diet, style, gluten-free and protein combination, does any meal or Replace option break the rules?80 of 80
Allergies and dislikes
safety check
When someone types an allergen in "Avoid", does any meal or Replace option still contain it?20 of 20
Nutrition fitDoes the week land within 15% of the calorie target, and within 10% of the protein goal when one is set?30 of 36
Pantry readingDoes typed pantry text become the right ingredient and amount, and is anything unknown left unrecognised rather than guessed?
0 non-food or unknown items were wrongly matched
42 of 42
Cart matching
safety check
For every ingredient the store stocks, is the right product put in the cart? Is anything put in the cart that is wrong?
0 wrong products in the cart, 0 held back for a person to choose, 0 not stocked
51 of 51

Findings so far

<1 minfrom Try it now to a cart
51/51right store product, none wrong
51/52ingredients traced to USDA
1 clickwhole list into a Walmart cart

Since Sep 28, visitors built 158 carts and sent 31 to Walmart. These measure the product, not people; user testing is next on the roadmap.

What the evals caught

  • 7 of 20 allergy checks failed on the first run: the filter only matched the word itself.
  • “Soy” left tofu in, “shellfish” left shrimp and “milk” left yogurt. Allergy words now map to the ingredients they cover.
  • The pantry reader took “almond milk” for almonds.
  • It read “2 cans black beans” as dried beans.

What still fails, on purpose

  • Nutrition fit misses above about 2,000 calories (6 of 36).
  • Those weeks come in a few hundred calories short: portions are fixed and the recipes top out there.
  • The eval stays strict, so the score rises when portions scale instead of being loosened to pass.
09

Limitations

What it can’t do yet, stated plainly.
Food data4
  • One ingredient isn’t sourced51 of 52 use USDA values. Protein bars are branded, and cooking losses aren’t modelled.
  • A small recipe collection51 recipes and only three with fish, so weeks repeat and strict diets rotate through a handful.Roadmap: Grow and resize recipes
  • Portions are fixedWeeks land near the calorie goal, not on it. Keto runs a few hundred under.Roadmap: Grow and resize recipes
  • The pantry reader knows only its own ingredientsUnknown items are ignored, and a “box” with no known weight is flagged.Roadmap: Pantry from a photo
Store and safety3
  • Walmart’s cart is a one-way linkThe link adds to your Walmart cart but can’t empty it first or read it back. Items already there stay, and fresh food needs a local store set.Roadmap: A real store, confirmed
  • Allergies are matched by nameIt can’t see inside a packaged protein bar or wrap.
  • No accountsYour setup stays in the browser you used. On another device, you start again.
Proof2
  • No model plans the public weekRetrieval and ranking only, to stay instant and free. Claude plans my own week and reads receipts.Roadmap: Level 4, orchestration
  • Only a few testers so farTested with a few friends; the evals test the product’s rules, not yet whether many people find it useful.Roadmap: Test it with people
10

Roadmap

  1. Shipped
    • ✓Levels 1–3Model baseline, computed nutrition, pantry shortfall and a scoped cart.
    • ✓Walmart one-click cartThe whole list into a real Walmart cart.
    • ✓USDA nutrition data51 of 52 ingredients traced to a source.
    • ✓5 evalsDiets, allergies, nutrition, pantry and cart.
  2. NowI am here
    • Test it with peopleTested with a few friends so far; more people next, each planning a real week. Measuring time to cart and matches accepted.
    • Re-measure Level 1Re-run its ~15% gap against the USDA-based figures.
  3. Next
    • Grow and resize recipesFish, meat and keto, with portions that scale to the target.
    • A real store, confirmedA partner API that reads the cart back and offers swaps.
    • Pantry from a photoSnap the fridge; a vision model fills the pantry to check.
    • A weekly budgetSet a spend limit in your profile; the planner favors cheaper meals and shows the list against it.
    • No repeatsAn option for a week where no meal repeats. Today each slot rotates its top three to five recipes.
  4. Later
    • Level 4, orchestrationSeparate models for ideas, rules and cart, with a visible trace.
    • Level 5, preference rerankerLearn from Keep / Swap / Skip without loosening a guardrail.