NoCoder 生成的理髮店預約網站測試:兩部手機同搶 12:00 時段
We tried to break an AI-built barber booking site: two phones, one 12:00 slot
作者以一段提示詞在 NoCoder 建立 Sharp & Co. 理髮店預約網站,耗時 12 分鐘,並用兩部手機同時預約 Imran 的 12:00 時段測試,系統只接受一筆。測試亦顯示,未輸入密碼只會看到 /admin 登入頁,店主取消預約後,時段會重新開放。由於提示詞沒有提供價格和地址,網站自行填入 ₹450 剪髮價格及 Koregaon Park 地址;客戶不能自行取消預約。
The bug that matters most in a booking site for a barber shop is the same one that matters in any booking site: two people getting the same chair at the same time. A demo with one user never shows it, so we built one and tried to break it.
The build
One paragraph, typed into NoCoder (full-stack mode, default model), no follow-up message:
Build a booking website for Sharp & Co., a two-chair barber shop in Pune. Customers pick a service (haircut, beard trim, haircut + beard) with its price, choose a barber (Imran or Rohit), a date and an open time slot, and enter their name and phone number to book. A barber can never be booked twice at the same time, but both barbers can work at the same time. Add an owner page at /admin, behind a password, where the owner sees today's bookings for each chair and can cancel one. Clean, modern design that works on phones.
It planned the files first, built the app with a database behind it, and took 12 minutes. Before finishing, it tested its own rule: both chairs can hold 11:00 at the same time, one chair never twice.
Three tests we ran on the finished site
1. Same barber, same 12:00, two phones at once. Both phones picked Imran at 12:00 and pressed Confirm together. One got "Chair's booked… we've held the seat for Imran". The other got "That time has just gone for Imran. Pick another slot."
2. A stranger with the owner-page link. Opening /admin without the password shows only the sign-in form, and a wrong password is refused. None of the customer names or numbers were in what the stranger's browser received.
3. The owner cancels a booking. We booked 19:30 for a test customer; on a second phone that slot was greyed out. The owner cancelled it on /admin, and the 19:30 slot opened again on the customer's phone.
What it got wrong
- The prompt gave no prices or address, so the build made them up (₹450 haircut, a Koregaon Park address, barber bios). A real shop would replace them.
- Customers can't cancel their own booking online; only the owner can.
- Its last screenshot check said the menu and time pickers were missing. They were on the page, below the fold. We've since fixed that check to look at the whole page.
The 5-minute test for any AI-built booking app
- The same slot from two devices at the same moment.
- Reload and check the booking is still there.
- Open the owner page in a private window.
- Cancel, and check the slot opens again.
- Look at it at phone width.
The full build with the prompt is here: https://nocoder.codes/gallery/sharp-and-co. The recording, including all three tests, is here: https://youtu.be/xxw5vVoZbUA
來源:DEV Community · dev.to