On this page
This meal planner build brief is for households turning a weekly menu into a shopping checklist with accountable quantities. Its first version should prove one concrete loop: assign a recipe to a day and verify its scaled ingredients contribute only once. Keep weekly meal assignments, recipes, deduplicated groceries and sourced nutrition connected to the same saved records before adding more ambitious integrations.
Screens
- Week plan: Assign meals to dated breakfast, lunch or dinner slots
- Recipes: Maintain serving yields and measured ingredients
- Grocery list: Aggregate planned needs while preserving checked state
- Nutrition: Show supplied values and explain missing information
Data model
| Table | Key fields | Purpose |
|---|---|---|
| meals | id (uuid), title (text), base_servings (decimal), nutrition_source (text nullable) | Reusable meal definitions with an explicit yield |
| meal_ingredients | id (uuid), meal_id (uuid), ingredient_key (text), quantity (decimal), unit (text) | The measured ingredients behind shopping calculations |
| plans | id (uuid), meal_id (uuid), planned_on (date), slot (text), servings (decimal) | Dated assignments rather than duplicated recipes |
| grocery_items | id (uuid), week_start (date), ingredient_key (text), unit (text), quantity (decimal), checked (boolean) | Deterministically aggregated needs for one planning week |
| nutrition_values | id (uuid), meal_id (uuid), nutrient (text), amount (decimal), unit (text), source (text) | Optional supplied values with provenance and basis |
A single-device meal plan can be stored locally without household accounts. If a backend is used, enforce server-side row-level security on plans, saved recipes and grocery rows using authenticated ownership. Public recipe access must not expose the days someone plans to be at home. Household collaboration is a separate membership decision, not an automatic consequence of assigning a meal to Monday.
Native features for the meal planner app
Keep checked items usable in a supermarket with weak reception, while distinguishing manual groceries from recipe-derived quantities. Export only the selected week and preserve units; two cans should not become two grams during formatting.
| Feature | Android (Kotlin) | iPhone (SwiftUI) | Notes |
|---|---|---|---|
| Offline supermarket checklist | Room grocery projection | SwiftData grocery snapshot | Keep checked items usable in a supermarket with weak reception, while distinguishing manual groceries from recipe-derived quantities. |
| Weekly grocery handoff | Android Sharesheet with measured quantities | ShareLink for a reviewed shopping list | Export only the selected week and preserve units; two cans should not become two grams during formatting. |
| Dinner planning reminder | Optional local planning notification | UserNotifications weekly planning request | Ask when the household plans meals; a reminder should open the relevant week rather than invent a new meal assignment. |
Android notes (Kotlin and Jetpack Compose)
Compose the week as date-labelled sections with stable plan-assignment IDs. Open meal choice in a ModalBottomSheet that includes the target day and meal slot, so choosing Tuesday dinner never replaces Monday lunch because the selection state was reused.
- Use a Room transaction to update servings and the derived grocery projection. Retain ingredient keys and compatible units during aggregation; if one meal uses grams and another uses individual carrots, show separate lines unless the owner has supplied a conversion.
- Keep the preferred week start and checklist grouping in DataStore, not in recipe records. A LazyColumn keyed by grocery-item identity should keep checked rows stable when recalculating quantities, and manual additions need a visible source label.
- Take an Android phone offline in Grocery view, check milk, then change a meal from two to four servings. Inspect which ingredient amounts changed and whether the milk check follows the declared rule. Share the week and compare the exported quantities with the visible checklist.
iPhone notes (Swift and SwiftUI)
Use NavigationStack to keep the selected planning week above recipe detail. Bind the serving selector to a draft in a sheet, applying the new value only when the household confirms; dismissing the sheet should not quietly double the shopping list.
- Persist meal assignments and grocery-item checks with SwiftData, preserving the original ingredient unit. A List can group produce, pantry and manual items, but grouping is a display choice and must not merge distinct ingredients that merely have similar names.
- Provide a ShareLink preview containing the week’s date range and measured amounts. Leave nutrition estimates out of that export unless their source and serving basis are present; a grocery list should not imply clinical dietary advice.
- On an iPhone, add the same rice ingredient to two dinners, mark its grocery line complete, then move one dinner to the following week. Reopen both weeks and verify totals, manual extras and check states. Test large text while increasing servings so the unit remains attached to its number.
Copy-paste prompt
Build a meal planner app for Android using native screens and a deliberately small first release. The core scope is weekly meal assignments, recipes, deduplicated groceries and sourced nutrition. Include these destinations: Week plan, Recipes, Grocery list, Nutrition. Use these persisted entities: meals, meal_ingredients, plans, grocery_items, nutrition_values; retain stable identifiers and explicit relationships rather than maintaining independent screen totals. Ask me these owner decisions before implementing ambiguous behavior: which day starts the planning week, how servings scale ingredients, and what source and serving basis nutrition values use. Do not invent a policy or add an unrequested external integration. Start local-only unless I explicitly choose account storage; if I choose a backend, enforce ownership on the server with row-level security. Show loading, empty and recoverable error states, plus permission-denied handling wherever a native capability requests access. Keep incomplete input recoverable and distinguish it from saved data. For acceptance, assign a recipe to a day and verify its scaled ingredients contribute only once. Also exercise the invalid-input or denied-permission path and reopen the app to inspect the persisted result. Explain any remaining device-only checks rather than equating a successful build with a passing journey.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
- Create a two-serving Lentil bowl using 200 grams of lentils and assign it to Monday dinner for four servings.
- Generate groceries and confirm the contribution is 400 grams of lentils, appearing in one compatible row.
- Regenerate without changing the plan and verify the quantity remains 400 grams.
- Reopen the planner and confirm Monday’s assignment, servings and checked grocery state survive.
- Try assigning zero servings and inspect a meal with no nutrition source; reject the quantity and show nutrition as unavailable.
Move Monday’s four-serving meal to Tuesday without changing servings and verify weekly grocery quantities remain unchanged. Then reduce it to two servings and confirm its ingredient contribution halves rather than adding another shopping row. If a user manually added extra lentils, preserve that separate contribution instead of erasing it during regeneration.
An unplanned week should invite the first meal assignment, whereas an unavailable recipe should remain visibly linked as a missing dependency until repaired or removed. Do not replace missing ingredient quantities with zero. Define whether past plans retain recipe snapshots or reflect later recipe edits, and test that policy before allowing a changed serving yield to rewrite historical grocery requirements without warning.
Frequently asked questions
What counts as a duplicate grocery ingredient?
Define a normalized ingredient key and compatible unit before merging. Similar names alone do not prove equivalence, especially for food allergies or ingredients with different preparation forms.
Can Nutrition fill in missing values automatically?
Do not invent nutrient amounts or health claims. Use explicit user input or an identified reliable source, and label the serving basis and any incomplete nutrient coverage.
Does deleting a planned meal remove a checked item?
Recalculate required quantities, but define how manually added groceries and checked items are preserved. Shopping history should not disappear unexpectedly because dinner moved to a different day.
Build this blueprint
The blueprint prompt, ready for your platform. Edit anything before you send it.
Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.