AI Build South Africa
Ties together this site's own three prior Building guides as instances of one underlying gap, September 2026.

Quick answer

Generated code reliably handles the exact path it was demonstrated on, the specific prompts and clicks used while building it. A production system also has to handle the paths nobody demonstrated: malformed input, a third-party call that fails, two users acting on the same data at once, a deploy environment configured differently from the preview, and the specific failure states a webhook is contractually required to return. None of these are exotic edge cases. They're the ordinary behaviour of real strangers using a real app, and they're exactly what a demo, by its own nature, never exercises.

The gap in one sentence

Generated code reliably handles the path it was demonstrated on. A production system also handles the paths nobody demonstrated: malformed input, a third-party service timing out, two people submitting at once, a deploy environment configured differently from the preview, and the failure states a webhook is contractually required to return. That gap is where most AI-built projects break after launch, not because the AI wrote bad code, but because a demo and a production system are answering two different questions. A demo proves the happy path works. Production has to survive everything that isn't the happy path.

The five paths nobody demonstrated

Each of these is concrete and checkable in your own project, not an abstract risk category.

The five paths, and what each one actually looks like

Malformed input

A form or API call fed data it wasn't shown during building:

Usually: nothing, or a raw, unhandled 500

A failed third-party call

An API your app depends on times out or errors:

Every prompt during building assumed success

Two people at once

Two users act on the same record simultaneously:

A race condition, invisible with one tester

AI Build · aibuild.co.za

The fourth and fifth paths already have their own full treatment elsewhere on this site, worth naming here rather than duplicating: a deploy environment configured differently from the preview is exactly what this site's own guide to environment variables not working after deploy covers, and the failure states a payment webhook has to handle, including what your server checks before it trusts a notification, are covered in our guide to adding a payment gateway.

A malformed-input example, made concrete

A contact form generated during a demo was tested with a real name, a real email, a real message, since that's what a person testing their own app types. A malformed submission, an empty required field sent directly to the API rather than through the form, an email field containing a script tag, a number field containing text, was never part of that conversation. The default behaviour most generated backend code exhibits when it receives something it wasn't shown is either to fail silently, doing nothing and returning no error the frontend can act on, or to throw a raw, unhandled error, a blank screen or a generic 500 status with no useful information for the person who just hit it. Neither is a deliberate design choice. Both are simply what happens when validation was never written, because nothing during the demo ever needed it.

A real race condition, worked through

Picture a Lovable app selling a single limited item, backed by Supabase, that decrements a stock count on purchase. Tested by one person, one browser tab, one purchase at a time, it works every time: check the count, if greater than zero, decrement it, confirm the sale. Two real customers hitting buy within the same second is a different situation entirely. Both requests can read the stock count as 1 before either has finished writing the decrement, and both can pass the same check, resulting in two confirmed sales of one item. This is a genuine race condition, not a hypothetical one, and it's invisible to any testing done by a single person clicking through their own app one action at a time, since a single tester structurally cannot create the simultaneity the bug depends on.

Three guides on this site, one gap, three times

This site's other three Building guides aren't three unrelated facts, they're the same underlying gap showing up in three different places. Understanding your AI-generated project structure is what the demo showed you: a real, working file tree, the happy path made visible. Why you can't put an API key in the frontend is a failure state the demo never exercised, since a demo never has an actual attacker reading your page source, only production does. Environment variables not working after deploy is path four, named directly above, with its own full treatment. Recognising all three as instances of one gap, rather than three separate facts to memorise, is the actual skill this page is trying to hand you.

A self-check for your own project

Match this against what your own project actually does, not every row against every project equally.

Testing each path against your own project

Malformed input

Submit a form with an empty required field, or call your own API directly with a wrong data type:

A real error message, or a silent failure?

Failed third-party call

Temporarily use a wrong API key or URL for one integration and trigger it:

Does the user see something sensible?

Simultaneous action

Two tabs or two accounts, same action, same moment, on shared data:

Does the result stay correct?

AI Build · aibuild.co.za

A project with no payment or webhook integration doesn't have a webhook contract to get wrong, and a single-user internal tool has a far smaller race-condition surface than anything selling limited stock. Work through the rows that actually apply to what you built, not the full list identically on every project.

Where to go next

Not affiliated with the platforms we write about

AI Build South Africa is an independent resource. We're not endorsed by, or an official partner of, Lovable, Base44, Bolt.new, Supabase, PayFast, Yoco or Anthropic. We do participate in affiliate and referral programmes with some of these providers, including Base44. This guide explains general production-readiness concepts, not a complete audit of any specific project. See our Disclaimer for the full disclosure and our Terms of Service for the wider terms.

Frequently asked questions

Does this mean vibe coding can't produce a real, production-ready app?

No. It means the demo working is not the same claim as the system being production-ready, and treating them as the same claim is the actual gap. Every path this page covers is addable to a generated project, this page is about knowing which five to check, not a case against building this way.

Which of these five paths matters most if I can only fix one?

Whichever one your project actually exercises. A site with no payment or webhook integration doesn't have a webhook contract to get wrong. A single-user internal tool has a much smaller race-condition surface than anything selling limited stock. Match the list against what your project actually does, don't work it top to bottom as if every project faces all five equally.

How do I actually test for a race condition myself?

Open your live app in two browser tabs or two devices, sign in as two different accounts if your app has accounts, and trigger the same action, claiming the same stock item, submitting the same form, at the same moment in both. If both succeed when only one should, or the count ends up wrong, that's a real race condition, not a hypothetical one.

Do I need to fix all five paths before I ever launch anything?

No, and treating it as an all-or-nothing gate before any launch is its own mistake. Match the real cost of each failure to your actual project: a portfolio site failing gracefully on a malformed contact-form submission matters less than a checkout failing to verify a webhook signature correctly. Prioritise by what a failure would actually cost you, not by working through every item identically.

Why don't AI builders just handle all of this automatically?

Because the AI generates code from the specific interaction it was shown, your own prompts and the paths you clicked through while building. It has no way to know which malformed inputs, failed calls or simultaneous actions your real users will eventually produce, since none of those happened during the conversation that generated the code.

Is this the same as the environment variable problem covered elsewhere on this site?

It's one specific instance of this broader gap, not a separate problem. A deploy environment configured differently from the preview is exactly the fourth path this page names. This site's own guide to environment variables not working after deploy covers that one path in full detail; this page is about recognising it as one of five, not the only one.

Related reading