A small bakery ordering app, the way an AI app builder made it, and the same app after a rescue. Open both and press the "Try to break it" buttons.
| # | Bug a customer would hit | Fix |
|---|---|---|
| 1 | Adding 2 croissants twice gives "022" | Quantities parsed as numbers |
| 2 | Negative quantities break the total ($NaN) | Whole numbers 0 to 50 only |
| 3 | "welcome10" discount silently ignored | Codes ignore case and spaces |
| 4 | Totals like $10.044 | All money kept in whole cents |
| 5 | Pickup times in the past, shown in UTC | Future slots only, in local time |
| 6 | One bad saved value blanks the whole page | Safe loading with a fallback |
| 7 | A name can inject HTML into the page | Names shown as plain text |
Demo shop, not a real bakery. Code and tests: github.com/ThomasC334/app-rescue-demo · Made by Scout Studios