Dev.to WebDev ๐Ÿ›  Dev ๐Ÿ‘ 0 ๐Ÿ“– 2 min read

We tried to break an AI-built food ordering app: two phones, one last portion

If a restaurant puts 25 portions of a dish online for pickup, two customers tapping "Place order" on the last portion at the same second shouldn't both get an order confirmation. That's the kind of bug a single-browser d

If a restaurant puts 25 portions of a dish online for pickup, two customers tapping "Place order" on the last portion at the same second shouldn't both get an order confirmation. That's the kind of bug a single-browser demo never shows, so we built a pickup ordering app and tried to break it.

The build

One prompt in NoCoder (full-stack mode, DeepSeek V4.1 Flash), with no follow-up message:

Build an online pickup ordering app for Tandoor & Tiffin, a food counter in Hyderabad with limited daily portions, a live menu board, a customer order-status page, and a password-protected /admin board where the owner can mark dishes sold out or ready for pickup.

It generated 37 files and finished in 19 minutes ("Everything checks out").

Four tests we ran on the running app

1. Two phones racing for the last Paneer Tikka.

  • We ordered down to 1 portion left, then tapped "Place order" simultaneously from two devices.
  • Phone A got ORDER CONFIRMED TT-PCKNL.
  • Phone B got: "Paneer Tikka sold out while you were deciding, so your bag is empty now." The menu board updated to SOLD OUT TODAY.

2. Owner marks Butter Chicken sold out.

  • Tapped "Mark sold out" on /admin; the customer board switched from 30 PORTIONS LEFT to SOLD OUT TODAY.

3. Live order status update.

  • Tapped "Mark ready" on TT-PCKNL; the customer's /order/TT-PCKNL page flipped to READY FOR PICKUP without a page reload.

4. A stranger opens /admin.

  • An unauthenticated browser received only the sign-in screen (0/8 customer names or numbers in the HTML), wrong passwords were rejected, and /api/admin/orders + /api/admin/dishes returned 401.

What it still got wrong

Honest testing finds bugs a quick happy-path demo hides:

  • Cart vs. server mismatch on big orders: The bag allowed adding 22 Garlic Naan, then POST /api/orders returned 400 ("Something in your cart looked wrong. Please reload and try again.") while orders of 10 and 12 went through. No stock was taken, but the UI shouldn't let you add more than the server accepts.
  • Public order-code page leaked the customer's phone number: Opening /order/TT-PCKNL in a fresh browser without logging in showed "Collecting as Ananya Reddy ยท 9876500001". Since order codes are TT- plus 5 characters, that page needs a phone/PIN check or masked contact info before real launch.
  • Admin login redirect: After a correct password (POST /api/admin/session 200), /admin/login stayed on screen instead of redirecting automatically to /admin.
  • Invented store details: Prices (โ‚น220โ€“โ‚น340), portion counts, and a Banjara Hills address were invented because the prompt omitted them.

What to test before trusting any AI-built ordering app

  1. Race two browsers on the last item in stock.
  2. Add a huge quantity (e.g., 20+) to verify front-end and API validation agree.
  3. Open your order-status URL in a private window to check what PII is exposed without auth.
  4. Hit /api/admin/* endpoints directly without cookies (401 expected).

Full prompt, exact test logs, and the walkthrough video (https://youtu.be/9XiTSoraotg): https://nocoder.codes/gallery/tandoor-and-tiffin

๐Ÿ“ฐ Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.