Business & shops

Build a food delivery app with AI

Accept a delivery order with a verified address and show only status or courier locations backed by real operations.

Apirex TeamUpdated AndroidiOS
On this page
  1. Screens
  2. Data model
  3. Native features
  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
6data tables
136word prompt
2platforms: Android, iOS

A food delivery app coordinates a restaurant, a customer and an actual delivery operation. Begin with one restaurant per cart and a clearly bounded service area instead of promising a complete dispatch network. The first build should prove that an accepted order has a deliverable address, a trusted total and authorized status updates; a moving map is not a substitute for those working foundations.

Screens

  • Restaurants: show participating businesses and whether they currently accept delivery orders.
  • Menu: browse the selected restaurant’s real dishes, prices and availability.
  • Cart: keep one restaurant’s items together and explain delivery fees before checkout.
  • Checkout: confirm the written address, service-area eligibility and current server quote.
  • Track order: display actual fulfillment states and a truthful last-updated time; maps require a real location source.

Data model

Food Delivery storage contract
TableKey fieldsPurpose
restaurantsid (uuid), name (text), active (bool), service_area (jsonb)Owner-controlled delivery coverage and participating outlets.
menu_itemsid (uuid), restaurant_id (uuid), price_minor (int), available (bool)Trusted food prices scoped to a restaurant.
addressesid (uuid), customer_id (uuid), address_text (text), latitude (decimal?), longitude (decimal?)Private delivery destinations with optional confirmed coordinates.
ordersid (uuid), customer_id (uuid), restaurant_id (uuid), address_snapshot (jsonb), total_minor (int), state (text)Purchased order and delivery details preserved at checkout.
order_eventsid (uuid), order_id (uuid), actor_id (uuid), state (text), occurred_at (timestamptz)Auditable fulfillment updates from authorized operators.
paymentsid (uuid), order_id (uuid), provider_id (text), status (text)Server-verified payment state tied to one order.

An address belongs to its customer and must not appear in public restaurant responses. Backend row-level security should limit order details to that customer and explicitly assigned restaurant or delivery staff. Reprice dishes, delivery fees and tax on the server using owner-supplied rules. Validate delivery eligibility again at order creation, because an old quote or a device coordinate does not prove that the written destination is serviceable. Snapshot the confirmed address so editing a saved address cannot reroute an already accepted delivery.

Native features

Food ordering needs address selection, restaurant-specific cart recovery and status alerts from real order transitions. Opening a map for a delivery pin should not require continuous background location, and manual address entry must remain available. Room or SwiftData can keep a cart, but menu availability, delivery fees and the restaurant's acceptance belong to the server. Push through FCM or APNs should distinguish accepted, preparing and delivered states only when those events exist. Do not animate a courier marker or an arrival countdown as though live tracking were present when the backend supplies neither.

Android notes (Kotlin and Jetpack Compose)

Compose a restaurant menu with a LazyColumn keyed by menu-item ID and use a ModalBottomSheet for required modifiers, portion size and quantities. A ViewModel should reject an incomplete modifier selection before adding the line. Store restaurant ID with every Room cart so switching restaurants cannot merge incompatible orders. Navigation Compose can separate address confirmation from the payment result, preserving the draft when location permission is declined. On an Android device, deny location, type an apartment address, add a meal with an extra topping, and rotate. Change that topping's availability on the server before checkout and require a clear correction rather than a silent substitution.

iPhone notes (Swift and SwiftUI)

Use NavigationStack for restaurant, menu, cart and order tracking, with a SwiftUI List that identifies cart lines by both item and modifier selection. A MapKit address sheet should retain a typed entrance note without publishing it in notifications. SwiftData may restore an unfinished cart; .refreshable on order detail should request current status rather than restart checkout. Handle UserNotifications permission refusal without hiding delivery progress inside the app. On an iPhone, submit a test order, interrupt payment return, then reopen tracking from a genuine acceptance push. Confirm the receipt contains the correct modifiers, delivery address and one server-verified charge.

Copy-paste prompt

Build this yourself 134 words · Android
Create a food delivery app for Android with Restaurants, Menu, Cart, Checkout and Track order. Restrict each cart to one restaurant and model menus, private addresses, order snapshots, payment references and auditable status events. Ask for service boundaries, real food prices, delivery fees, tax, opening hours, refund terms and who actually performs delivery. Use trusted server totals and Stripe or Razorpay server verification with checked webhook signatures before marking an order paid. Never simulate courier movement or label invented coordinates as live tracking. If there is no real courier location feed, display status updates only. Include loading, no restaurants, undeliverable address, unavailable dish, interrupted checkout and stale tracking states. Acceptance requires a test order, authorized staff status updates, private address enforcement and recovery after reopening without a duplicate charge or a fabricated delivery event.

Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.

Acceptance test

  1. Configure a restaurant and a real service-area rule, then enter one eligible address and another outside the boundary.
  2. Attempt checkout to the excluded destination and require a server rejection even if the customer changes the displayed eligibility flag.
  3. Place a provider test order to the eligible address, verify the server total and record a preparing update using an authorized staff account.
  4. Close and reopen Track order and confirm the same order, address snapshot and actual latest event, with no invented courier movement.
  5. Try reading that address as an unrelated customer and submitting delivered as unauthorized staff; reject both, then verify duplicate payment events do not duplicate the order.

Frequently asked questions

What should Track order show without courier GPS?

Show real operational states such as accepted or dispatched only when an authorized operator or service supplied them. Never animate a vehicle along a route and present it as live courier tracking; delayed data must be labeled with its actual update time.

Can a delivery checkout also unlock digital memberships?

Keep this initial checkout focused on physical meals. As of November 2026, adding digital benefits consumed in the app requires a separate review of Google Play and App Store billing rules rather than assuming the meal payment integration covers them.

Can an estimated arrival time be generated automatically?

Only introduce estimates based on an actual operational model with supplied inputs and an honest explanation of uncertainty. The owner must decide service promises and escalation procedures; a decorative countdown is not evidence that a driver has accepted the job.

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.