On this page
A restaurant ordering app connects a hungry customer to a kitchen that needs an unambiguous ticket. Start with one restaurant and pickup rather than combining table service, delivery dispatch and loyalty schemes. The first version should prove that a customer can choose permitted modifiers, approve a trusted total and create one order the kitchen can actually see, even after a connection interruption.
Screens
- Menu: browse available categories and dishes using the restaurant’s supplied descriptions and prices.
- Item detail: select required modifiers and quantities with clear unavailable-option handling.
- Cart: review line items and estimated totals before the server produces a final quote.
- Checkout: confirm pickup details, current opening hours and the verified payable amount.
- Order status: show persisted kitchen states and payment state without guessing preparation progress.
Data model
| Table | Key fields | Purpose |
|---|---|---|
| menu_items | id (uuid), title (text), price_minor (int), currency (text), available (bool) | Trusted dish prices and availability managed by restaurant staff. |
| modifier_options | id (uuid), item_id (uuid), label (text), extra_minor (int) | Allowed selections and authoritative additions to the dish price. |
| orders | id (uuid), diner_id (uuid), branch_id (uuid), fulfilment (text: pickup or table), table_label (text?), total_minor (int), kitchen_state (text), checkout_key (uuid), ready_at (timestamptz?) | One kitchen order per accepted checkout request. |
| order_lines | id (uuid), order_id (uuid), item_id (uuid), quantity (int), snapshot (jsonb) | Immutable purchased dish, modifier and price details. |
| payments | id (uuid), order_id (uuid), provider_charge_id (text), captured_minor (int), outcome (text) | Verified payment references, never card details. |
Customers may inspect their own orders, while kitchen staff can read accepted orders for their restaurant and update permitted preparation states. Enforce these roles through server checks and row-level security. Recalculate every total from trusted menu prices, allowed modifiers, taxes and owner-supplied fees; never accept a cart total as authoritative. A server idempotency key prevents repeated checkout requests from creating multiple kitchen tickets. Keep menu editing separate from kitchen status permissions, and preserve the purchased item snapshot when tomorrow’s menu changes.
Agree on how the kitchen acknowledges receipt and handles rejected orders before enabling live ordering. If the restaurant cannot fulfill a paid purchase, show its real unresolved state and follow the supplied refund procedure rather than automatically displaying a preparation countdown.
Native features for the restaurant ordering app
Keep accepted, preparing and ready distinct from a payment attempt; only trusted restaurant state should mark food ready for pickup. Use the branch attached to the order rather than the closest branch or an address copied from a different menu.
| Feature | Android (Kotlin) | iPhone (SwiftUI) | Notes |
|---|---|---|---|
| Kitchen status updates | Order-scoped push routing | UserNotifications and order detail routing | Keep accepted, preparing and ready distinct from a payment attempt; only trusted restaurant state should mark food ready for pickup. |
| Pickup directions | Map intent with restaurant coordinates | MapKit launch for the pickup branch | Use the branch attached to the order rather than the closest branch or an address copied from a different menu. |
| Resilient basket draft | Room cart with option selections | SwiftData basket lines | Cache dishes and modifiers for editing, but revalidate stock, tax and total on the server before an order is accepted. |
Android notes (Kotlin and Jetpack Compose)
Compose menu categories with a LazyColumn keyed by dish ID. Put size, add-ons and allergy-information text in a ModalBottomSheet that shows the full line price before adding; two differently customized dishes must remain distinct basket lines.
- Use a ViewModel checkout state machine with an idempotency token for each intentional submission. Room may restore the basket after a restart, but a cached menu price cannot authorize checkout and a loading button cannot prove restaurant acceptance.
- Navigate to Order detail using the server order ID after a confirmed response. Push messages should trigger a status refresh rather than directly changing local state to ready. Keep rejected payment, sold-out item and closed-kitchen errors separate so diners know what to correct.
- On Android hardware, add two bowls with different toppings, make one topping unavailable from staff tools, and submit. Require a clear correction without silently substituting food. Retry during a network interruption and confirm the kitchen receives one order with the intended pickup branch.
iPhone notes (Swift and SwiftUI)
Use a NavigationStack for Menu, Basket and Order detail, keeping the basket model outside individual dish views. A List of basket lines should use line identifiers that include the selected modifier combination rather than collapsing every instance of the same dish.
- Present dish customization in a sheet with detents and a clearly named Add action. Preserve required-option errors beside their controls, support long dietary descriptions, and do not infer allergen safety from the absence of an ingredient label.
- Persist the draft basket with SwiftData if restart recovery is wanted. Request notification authorization in the order-tracking context; refusal must leave an accessible status screen that reads trusted backend state instead of claiming delivery of an alert.
- On iPhone, background checkout immediately after tapping the final order action, then reopen the receipt. Compare the order identifier, modifiers, total and branch with the authorized restaurant record. Open an older ready notification after cancellation and verify current status wins over the old message.
Copy-paste prompt
Build a restaurant ordering app for Android with Menu, Item detail, Cart, Checkout and Order status. Start with pickup from one restaurant. Ask for real menu prices, allowed modifiers, taxes, opening hours, pickup instructions, cancellation terms and refund rules. Model menu items, modifier options, orders, line snapshots and payment references. Recalculate totals on the server and deduplicate order creation using a stable request key. Integrate Stripe or Razorpay only with the owner’s merchant account, server-created orders, server payment verification and signature-checked webhooks. Keep paid separate from preparing. Include loading, empty menu, sold-out selection, stale quote, network failure and denied notifications. No timer may pretend that food is ready. Acceptance means one real test checkout reaches the authorized kitchen view with the correct total; reopening recovers that order and replaying payment confirmation cannot create another kitchen ticket.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
- Configure a dish at 1200 minor units and an allowed 200-unit modifier; order two and verify the server’s pre-tax line total is 2800.
- Tamper with the submitted price and confirm checkout ignores it or rejects the request rather than charging the altered total.
- Complete a provider test payment and inspect the authorized kitchen view for exactly one order with the purchased modifiers.
- Reopen Order status after disconnecting during checkout and recover the existing order instead of automatically creating a replacement.
- Replay the verified payment event and try a kitchen update from a customer account; require no duplicate ticket and no unauthorized status change.
Frequently asked questions
When may the kitchen start preparing?
The restaurant must define whether acceptance requires verified payment or another approved payment arrangement. As of November 2026, Stripe and Razorpay flows should use server verification and checked webhook signatures, not a customer-visible success screen, as payment evidence.
Can this checkout sell recipe downloads too?
Physical meals and digital content need separate policy decisions. As of November 2026, digital goods consumed inside native apps may require Google Play or App Store billing; review the applicable store rules before adding downloads to a food checkout.
Who supplies allergen and tax information?
The restaurant supplies and reviews ingredient, allergen, tax and availability information. Do not generate safety assurances from dish names or infer that a missing allergen label means an item is safe for a customer.
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.