The Duplicate Order
Clicking the Place Order button quickly two times in a row creates two identical orders and processes payment twice. A single click always works correctly.
The bug report
You get the whole project — a React front end, an Express API, and Mongoose models — opened in a browser editor. Reproduce the symptom by reading the code, change what’s wrong, and run the hidden tests to prove it.
What the fix must prove
- creates exactly one order for a single submission
- returns the existing order when the same operation key is replayed
- keeps two identical rapid submissions to a single order
- prices the order from the seeded catalogue
- rejects an order without purchasable items
Related challenges
- The Missing Name — api contract bug, beginner
- The Ghost Update — async / race condition, intermediate
- The Silent Field — database / schema bug, beginner