Food, travel & lifestyle

Build a recipe app with AI

A native recipe build brief covering saved data, purposeful screens and a repeatable real-input acceptance journey.

Apirex TeamUpdated AndroidiOS
On this page
  1. Screens
  2. Data model
  3. Native features for the recipe app
  4. Android notes (Kotlin and Jetpack Compose)
  5. iPhone notes (Swift and SwiftUI)
  6. Copy-paste prompt
  7. Acceptance test
  8. Frequently asked questions
5screens
4data tables
192word prompt
2platforms: Android, iOS

This recipe build brief is for home cooks maintaining recipes they own or have permission to publish. Its first version should prove one concrete loop: save a recipe, favourite it, and transfer its measured ingredients to a durable shopping list. Keep recipes, ingredients, ordered instructions, favourites and shopping lists connected to the same saved records before adding more ambitious integrations.

Screens

  • Discover: Browse the owner-supplied recipe collection and filters
  • Recipe detail: Read servings, measured ingredients and ordered steps
  • Add recipe: Enter a recipe and optionally select a food photo
  • Favourites: Revisit explicitly saved recipes
  • Shopping list: Collect ingredient quantities with checked state

Data model

TableKey fieldsPurpose
recipesid (uuid), title (text), servings (decimal), photo_path (text nullable), favourite (boolean)Recipe identity, yield and personal bookmark state
ingredientsid (uuid), recipe_id (uuid), name (text), quantity (decimal nullable), unit (text)Measured ingredients with support for an unquantified pinch
instructionsid (uuid), recipe_id (uuid), position (int), body (text), timer_seconds (int nullable)Ordered preparation steps and optional timer durations
shopping_itemsid (uuid), ingredient_key (text), quantity (decimal nullable), unit (text), checked (boolean)A persistent shopping checklist with compatible quantities

A personal recipe book may use local-only storage, with no implied public feed. With a backend, private recipes and shopping rows need owner-based server-side row-level security; public publishing must be a distinct, authorized operation. Ingredient and instruction access follows the recipe. If public contributions are requested later, establish reporting, moderation and content rights instead of exposing every saved family recipe.

Native features for the recipe app

Keep the display awake only in active cooking mode and restore normal device sleep when the cook leaves it. An oven countdown and a sauce countdown need separate identifiers; stopping one must not cancel both alerts.

FeatureAndroid (Kotlin)iPhone (SwiftUI)Notes
Readable cooking stepsWindow keep-screen-on while cookingScene-scoped idle timer overrideKeep the display awake only in active cooking mode and restore normal device sleep when the cook leaves it.
Independent step timersDeadline-based timers and optional notificationsUserNotifications per cooking timerAn oven countdown and a sauce countdown need separate identifiers; stopping one must not cancel both alerts.
Recipe image importPhoto Picker for the selected dish imagePhotosPicker for an owned recipe photographMake photo selection optional so a cook can save ingredients and method without granting broad library access.

Android notes (Kotlin and Jetpack Compose)

Build a numbered method LazyColumn with stable step IDs, not list positions, because inserting a preparation step should not attach the simmer timer to the wrong instruction. Keep serving multipliers separate from original ingredient quantities in the ViewModel.

  • Apply the window keep-screen-on flag through a lifecycle-aware DisposableEffect tied to cooking mode. Clear it when leaving the recipe or backgrounding according to the chosen policy, rather than making the entire application prevent screen sleep.
  • Persist timer deadlines and their step references in Room. WorkManager is not a precise kitchen countdown; select an appropriate notification or alarm strategy, explain platform timing constraints, and keep the visible remaining time calculated from the saved deadline.
  • On an Android phone, start a twelve-minute bake timer and a two-minute sauce timer, then leave cooking mode. Check normal screen sleep returns, relaunch, and cancel only the sauce timer. Compare ingredient scaling at half and double yield without changing the original recipe.

iPhone notes (Swift and SwiftUI)

Use NavigationStack to enter a dedicated cooking view with generously spaced method steps. Maintain a SwiftData recipe independently from the current serving multiplier, so a temporary dinner-for-six adjustment does not rewrite the author’s base yield.

  • Scope UIApplication idle-timer changes to the visible cooking experience and restore the previous behavior when it ends. A sheet with detents can collect a step timer duration while leaving the current instruction visible behind it.
  • Schedule UserNotifications with distinct recipe-and-timer identifiers, and store each deadline for reconciliation when the app resumes. Explain that a denied alert permission leaves an in-app countdown but no promised audible signal while the application is inactive.
  • On iPhone, launch two timers from different steps, lock the screen, and reopen the recipe after one deadline passes. Verify the expired timer is identified by step and the other is still running. Exit cooking view and check that the phone is allowed to sleep normally again.

Copy-paste prompt

Build this yourself 190 words · Android
Build a recipe app for Android using native screens and a deliberately small first release. The core scope is recipes, ingredients, ordered instructions, favourites and shopping lists. Include these destinations: Discover, Recipe detail, Add recipe, Favourites, Shopping list. Use these persisted entities: recipes, ingredients, instructions, shopping_items; retain stable identifiers and explicit relationships rather than maintaining independent screen totals.
Ask me these owner decisions before implementing ambiguous behavior: who supplies recipe rights and images, whether shopping additions merge, and which ingredient units are safely compatible. 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, save a recipe, favourite it, and transfer its measured ingredients to a durable shopping list. 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

  1. Create Tomato toast for two servings with 2 tomatoes and 4 slices of bread, plus two ordered steps.
  2. Favourite the recipe and verify it appears once in Favourites.
  3. Add its ingredients to Shopping list and inspect quantities and units before checking off bread.
  4. Reopen the app and confirm the recipe, favourite state and checked shopping item remain.
  5. Cancel photo selection and submit a negative serving count; verify the valid draft survives and the invalid recipe is rejected.

Add the same recipe ingredients twice and verify the specified merge policy rather than assuming another tap was accidental. Test an ingredient with no numeric quantity, such as salt to taste, alongside measured tomatoes; the shopping list should retain readable instructions without inventing a gram conversion.

Discover needs a purposeful empty collection state when the owner has supplied no recipes. A failed recipe load must not open a blank editor that can overwrite the missing record. Define what happens to shopping items when their source recipe is deleted: preserve a readable shopping snapshot or warn before removing linked items. Clean up private photo files only when no retained recipe or recovery record still needs them.

Frequently asked questions

Where do Discover recipes come from?

Use a collection supplied or licensed by the owner. A Discover screen does not imply permission to copy recipes, photographs or instructions from another publisher.

Can all ingredient quantities be combined?

Only merge quantities with compatible units and a defined ingredient identity. Keep grams, cups and unquantified items separate unless the owner supplies a reliable conversion rule.

Will a cooking timer work with the phone locked?

Treat locked-screen and background behavior as an explicit real-device test. A foreground countdown alone is insufficient evidence that an alert will arrive after the screen turns off.

Build this blueprint

The blueprint prompt, ready for your platform. Edit anything before you send it.

AndroidKotlin · Jetpack ComposeReal source on your computer

Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.