Nourish
A four-stage AI pipeline that turns 'I want to eat better' into a costed, macro-accurate week of meals.
Meal planning is deceptively hard. Not the "what's for dinner" part — the part where dinner has to hit a household's macros, respect everyone's preferences, use ingredients that exist, and not repeat lasagna four times. Nourish solves it with an assembly line of language models and a healthy respect for the USDA.
The pipeline has four stations. The Planner drafts a 7-day plan from your preferences and targets. The Chef fleshes each meal into a real recipe — ingredients, method, quantities. The USDA stage looks up every ingredient in FoodData Central for actual nutritional data. The Analyst then scales those quantities until the day's macros land on target. Progress streams to the browser over SSE, so you watch your week assemble itself instead of staring at a spinner wondering if it died.
The clever bit is knowing which problems are language problems and which aren't. Claude is wonderful at inventing a plausible Tuesday lunch and terrible at remembering how many grams of protein are in a chicken thigh. So Nourish doesn't ask it to. The creative steps — Planner, Chef — use Anthropic tool_use with strict schemas, so there are no JSON-parse retries on the critical path. The factual step is delegated to the USDA database, cached in MongoDB keyed by fdcId, because the government's API is many things but fast is not one of them.
The data model reflects a system that grew up. Postgres is the system of record — persons, meal plans, recipes, ingredients, the nutrient tables. MongoDB holds the full recipe documents, the FDC cache, and the "planning rules" injected into the AI prompts. There are, gloriously, two planning_rules collections — one in Postgres for the legacy agents, one in Mongo for the pipeline — and the docs cheerfully tell you that when in doubt, ask which one. That's not a mess; it's an honest map of a migration in progress, where a years-old markdown-and-spreadsheet workflow is being replaced one router at a time without dropping the households who depend on it.
Multi-tenancy is per-household and absolute: owner_id scopes everything, no plate crosses a boundary. Approved weeks carry an is_approved flag and refuse to be deleted, because nobody wants the AI helpfully removing the week they already shopped for.
Stack-wise it's unremarkable on purpose: FastAPI async with asyncpg, Next.js 16 server components on Cloudflare Workers, prompt caching on every Claude call. Underneath the wellness gloss, Nourish is a careful exercise in putting the LLM exactly where it's good and nowhere it isn't. The result is a meal plan you can actually cook — and the macros to prove it.