SAMPLE BUILD · APP RESCUE · AI-GENERATED CODE · BUG FIXING
The problem
AI app builders like Lovable, Bolt, Base44, Cursor and Replit can build an app in an afternoon. But the last 10% is where real customers get hurt: wrong totals, broken buttons, pages that go blank. To show how I rescue these apps, I took a small bakery ordering app (Sunrise Bakery, a demo shop) built the way an AI builder writes it, and fixed it properly.
How I worked
Audit: I used the app like a real customer and tried to break it on purpose (odd inputs, wrong times, bad data).
Reproduce: for every problem, I found the exact steps that trigger it.
Root cause: I fixed the real cause, not just the symptom, so it can't come back in a new form.
Prove it: I wrote an automated test for each bug that shows it existed in the original and is gone in the fix.
Ship it: both versions are deployed online, so anyone can compare them.
The 7 bugs I found and fixed
Broken quantities: adding 2 croissants twice showed "022". The app glued numbers together like text. Now quantities are read as real numbers.
$NaN total: entering −5 loaves broke the whole total. Now only whole numbers from 0 to 50 are allowed.
Discount code ignored: "welcome10" failed because it wasn't typed in capitals. Codes now work in any case, with extra spaces ignored.
Wrong money math: totals like $10.044 appeared. Money is now calculated in whole cents and shown in proper US dollars.
Wrong pickup times: the 8:00 AM slot showed as 13:00, and times that had already passed were offered. Times now show in the customer's own time zone, and only future slots appear.
Blank page crash: one bad piece of saved data made the whole page disappear. The app now loads safely and recovers.
Security hole (XSS / HTML injection): a customer name could inject code into the page. Names now display as plain text only.
Results
• 7 real-world bugs fixed at the root cause
• 8 automated tests, all passing, each proving a bug existed and is now gone
• Order checks added: no empty orders, no missing names, no unavailable pickup times
• Live before-and-after demo with a "Try to break it" panel
• Original code kept untouched, so every change is easy to review
Tools and skills
JavaScript, HTML, CSS, automated testing (Node.js test runner), debugging, root-cause analysis, input validation, web security (XSS prevention), time zones, money handling, GitHub, GitHub Pages deployment. Built with Claude Code, every change reviewed and tested.
Try it yourself: thomasc334.github.io/app-rescue-demo
Code and tests: github.com/ThomasC334/app-rescue-demo
Got an AI-built app that's 90% done? Send me a message describing what's broken.

The original app: "022" croissants, a $NaN total and injected HTML.

The rescued app: correct quantities, $14.58 to the cent, safe names.

All 7 bugs fixed at the root cause, each covered by a test.
0 likes · 0 views · Dec 1, 2026
An AI-built bakery app with 7 real bugs, from $NaN totals to injected HTML, found, fixed and tested. Live before and after demo.