Can AI build your app? What AI assistance changes in a production build
By Alvi Lika, Founder, Soatech
· · 6 min read
AI coding tools speed up work whose correctness is cheap to check. They don't make the decisions that decide whether an app is safe for paying users. Here is where that line falls, with code you can check.
Yes, AI tools can write a large share of the code in a working app, and app builders such as Lovable, Bolt and v0 can produce a usable prototype from a description. The more useful question is which parts of the work AI assistance actually speeds up, and which decisions still have to be made by someone who can check the result.
A useful rule: AI assistance speeds up work whose correctness is cheap to verify. It does little for decisions where nothing fails visibly when you get them wrong.
Where AI assistance saves time
The tasks below share one property. You can check the output quickly with a compiler, a test run or a glance at a diff.
- Scaffolding. Routes, forms, CRUD queries, typed data access functions. Wrong output usually fails to compile or fails at first use.
- Mechanical changes across many files. Renaming a field, replacing a deprecated API, extracting repeated logic. The type checker and the test suite catch most mistakes.
- Listing test cases. Given a flow description, an assistant will propose edge cases (missing data, duplicate submissions, a third-party API failing) faster than most authors think of them. A person still decides which ones matter and what the correct behaviour is.
- First drafts of documentation. READMEs, runbooks and code comments, which a person then corrects.
How much this saves depends on the codebase and on how much review the output needs. Treat any single headline percentage with suspicion. Time saved typing is partly spent again on review.
Where it does not: decisions with no visible failure
These are the parts of a build where code can compile, pass a happy-path test and still be wrong.
Tenant boundaries
Ask an assistant for "a function that lists proposals" and you will often get a correct query with no tenant filter. Every test passes as long as there is only one tenant in the test data. The fix is not a better prompt. It is a decision about where isolation is enforced, and a test that signs in as two tenants and checks that neither can see the other's data.
In Wintura, every tenant-owned table carries an agency_id, all SQL lives in one data-layer directory, and queries filter on the tenant they are given. That is application-layer isolation, and it has a known weak point: a new query that forgets the filter. The decision record explains the trade-off and when database Row-Level Security is worth adding.
Auth and session configuration
Auth libraries have defaults that are fine for a demo and wrong for production. Wintura's Auth.js configuration contains a comment recording one example. With database sessions, the object the session callback returns becomes the response body of /api/auth/session, so returning the raw session row would expose the session token to any script on the page and make the httpOnly cookie pointless. The fix is a few lines that return an explicit shape:
// lib/auth/config.ts (simplified)
callbacks: {
async session({ session, user }) {
return {
expires: session.expires,
user: { id: user.id, name: user.name ?? null, email: user.email },
};
},
},
Nothing about the broken version fails in a test. You only find it by knowing what the callback controls and checking it.
Failure policy
Generated error handling tends to be a try/catch that logs and carries on. Production code needs a policy: which failures are retried, how many times, within what total time, and what the user sees when the budget runs out. Wintura's first AI stage retries rate limits, server errors and connection faults, but not malformed-request errors, and it only starts a retry if enough of the deadline remains for it to finish (lib/ai/stage-1-analysis.ts). An assistant can write that code once you have chosen the policy. Choosing the policy is product work.
What not to build
An assistant builds what you ask for, well and quickly. It won't tell you that a feature has no real user. As code gets cheaper to produce, this becomes the most expensive mistake, because every unneeded feature still has to be tested, secured and maintained.
What the evidence says about AI-generated code
Veracode's 2025 GenAI Code Security Report tested code from more than 100 language models on 80 curated tasks. 45% of the tasks produced code containing an OWASP Top 10 vulnerability. That doesn't show that AI-built apps are insecure. It shows that generated code needs the same security review as any other code, and that the review can't be skipped because the code looks clean.
App builders have added controls of their own. Lovable, for example, runs a quick scan on publish, covering database access rules, known-vulnerable dependencies and exposed MCP servers, and offers an on-demand deep scan of the application code. Its documentation says these scans "do not replace a thorough security review" (Lovable security docs). Use them, and know where they stop: a scanner can flag a table with no access rules, but it can't know which of your users should see which records.
If you are not technical: questions to ask whoever reviews your app
You don't need to read the code to test whether someone else has. Ask:
- How is one customer's data kept away from another customer's, and which test proves it?
- What does the session endpoint return, and can a script on the page read the session token?
- Are payment and webhook events verified, and what happens if the same event arrives twice?
- When a third-party service fails, what does the user see, and what gets retried?
- Which errors would you hear about in production, and how?
Vague answers to any of these tell you where the work is.
The short answer
AI can build much of your app, and it can build a convincing prototype on its own. Getting from there to something you can safely charge for depends on a small number of decisions about isolation, auth, failure handling and scope. AI tools make the code for those decisions cheap to write. They don't make the decisions.
If you have an AI-built prototype and want those five questions answered in writing for your codebase, that's what the Production Audit is for.
Want the gap between your prototype and production in writing?
Working on a feature this article touches? A 30-minute call is the quickest way to scope it.
Discuss your project