Build a SaaS in a weekend with AI — and catch the payment bug it approved itself
Ryan Mercer spent a weekend building a SaaS with AI and Next.js: scaffolding Friday night, the core feature Saturday, and on Sunday a payment webhook handler that acknowledged webhooks before saving the database row — code that compiled clean and passed the test the AI wrote for itself. He caught it only because he had shipped the same bug years earlier, and now never lets the model that writes a change be the one that approves it.
How it works
- Friday night: scaffold the app (Next.js App Router, Tailwind, Postgres, auth, schema) in a couple of hours with AI writing and him steering
- Saturday: build the core feature in slices, his time mostly spent reading plausible code
- Sunday: The AI writes a payment webhook handler that acknowledges the webhook before persisting the row, and its own test passes it
- He spots the ordering bug from personal experience
- Fix is reordering two lines: persist before acknowledging
- His standing rule becomes separate author and skeptic passes, with him owning the merge
Why it’s worth knowing
The dangerous bug was two lines in the wrong order, and the model's own test suite blessed it — only the human's scar tissue caught it.
Where it’s from
Summarized from a public post on medium.com. See the original ↗