Lesson 3 of 4 · 6 min read
Hardening a vibe-coded app
"How do I make it not fall over?"
Vibe-coded apps are great at getting something working. They're often brittle in predictable ways: messy state, no error handling, exposed secrets, no input validation. It often works until it doesn't.
Get the code into your hands
Connect to GitHub immediately. You want version control, the ability to roll back, and the option to have a human or another AI review the code outside the building tool.
Read it, even if you don't fully understand it
Open the files. Ask Claude or ChatGPT to explain what each file does and flag anything risky. You'll learn fast and catch the obvious problems.
Check the boring stuff first
- API keys should never be in frontend code.
- Database rules should restrict who can read and write what.
- Authentication should actually verify users, not just hide buttons.
These are the failures that turn into news stories.
Test like a hostile user
Click things in the wrong order. Submit empty forms. Paste 10,000 characters into a name field. Open it on a slow phone. Try it logged out. Try it on Safari. Most vibe-coded apps fall apart at the edges because the AI only built the happy path.
Add error handling explicitly
Ask for try/catch blocks, loading states, and friendly error messages everywhere a network call happens. Beginners will see a lot of "undefined" otherwise.
Get a second opinion
Paste key files into Claude and ask: *"What would break this? What's fragile? What would a senior engineer change?"* You'll get a punch list.
Deploy to a staging URL first
Share with two or three real beginners and watch them use it without helping. You'll find more bugs in 20 minutes than in a week of solo testing.
The honest truth: vibe-coded apps can absolutely be production-quality, but only if you treat the AI's output as a first draft, not a finished product.