Back to Home
AI Building

The AI Built a Beautiful Interface but Nothing Works: How to Close the Prototype Gap

Why AI coding agents produce convincing front ends with no working backend, and the vertical slice method that gets you from prototype to an app real people can use.

13Labs Team25 July 20269 min read
vibe codingAI prototypingbackendSupabasedebuggingbuildAcademy

Contents

Why the AI Builds the Interface and Skips the Backend

AI coding agents build interfaces first because interfaces are the part of your prompt they can see. You describe a dashboard, they generate a dashboard. Nothing in that description tells the agent where the data comes from, so it invents placeholder data and moves on. This is the single most common sticking point among people signing up to build with AI. In the 13Labs buildDay registration survey (July 2026, n=41 registrants, 23 free-text answers), 4 of the 20 substantive answers described the same problem in different words: - "Agent built great interfaces, but a lot of functionality was missing (on the backend)." - "Making it functional, so beyond UI." - "Figuring out how to move from an AI-generated prototype to a properly structured, testable application where the output is reliable enough for real users." The mechanism is straightforward. A front end is self-contained: one file, no external state, and it looks finished the moment it renders. A backend is a chain of dependencies (database schema, auth rules, environment variables, an API contract, error states) where every link has to hold. The agent optimises for the thing it can show you. So you end up with an app that demos perfectly and does nothing. The buttons are there. The data behind them is hardcoded.

The Four Layers a Good-Looking Mockup Hides

A prototype that looks finished is usually missing four specific layers, and naming them turns a vague feeling of "it doesn't work" into a checklist you can work through. Persistence. Your data lives in React state, so it vanishes on refresh. Test: reload the page. If your saved item is gone, you have no database. Identity. There is a login screen but no session, or a session with no rules about who can read which rows. Test: open the app in a private window. If you can see another user's data, you have no auth. The write path. Reading data is easy and agents usually get it right. Writing is where validation, error handling and race conditions live. Test: submit the form twice fast, then submit it with an empty field. Failure states. The prototype assumes every request succeeds. Real apps spend a meaningful share of their life offline, rate-limited or timing out. Test: turn off your wifi and use the app. Run those four tests on any AI-generated prototype and you will find the gap in about five minutes. That list is also the fastest way to get useful work out of the agent, because now you are asking for four concrete things instead of asking it to "make it work properly".

The Vertical Slice Method: Build One Feature All the Way Down

Build one feature through every layer before you build a second feature. This is the fix for the prototype gap, and it inverts how most AI-assisted builds go wrong. The common pattern is horizontal: generate all the screens, then try to wire them up. You get eight half-built features and no working path through the app. Debugging is miserable because nothing is a known-good reference. A vertical slice means picking the smallest action a real user takes and building it end to end: form, validation, database write, read back, display, error state. For a job-tracking app, that slice is "add a job and see it in the list after refresh". Nothing else. No settings page, no dashboard, no export. Once that slice holds, you have a template. Every later feature copies a pattern the agent can see in your own codebase, which improves its output sharply. Agents are far better at matching an existing pattern than inventing one. A practical instruction to give the agent: "Build only the add-job flow. Include the Supabase table, the insert, the read query, loading and error states. Do not build any other screen. Stop when I can add a job, refresh, and still see it." The constraint is doing the work. "Do not build any other screen" is the part most people leave out.

How to Brief an Agent for Backend Work

Backend briefs need three things a UI brief does not: the shape of the data, the rules about who can touch it, and what should happen when it breaks. Supply those and agent output improves immediately. Start with the data shape, in plain English. "A job has a customer name, an address, a status of one of quoted, booked, done, and a created date. A job belongs to one user." That one paragraph is a schema, and it stops the agent inventing column names that drift between files. Then state the access rule. "A user can only read and edit their own jobs." In Supabase that becomes a row-level security policy, and if you do not say it, you will not get one. Then state the failure behaviour. "If the insert fails, keep the form filled in, show the error text, and let them retry." Agents default to silent failures because nobody asks for anything else. One more habit worth building: ask the agent to explain the data flow back to you before it writes code. "Before you build, tell me which table this writes to, what happens on error, and which files you will change." If the answer is vague, the code will be too, and you have caught it in ten seconds instead of an hour.

Proving It Works Instead of Assuming It Works

An AI-generated app that has never been tested against real input is a demo, not an app. The gap between the two is closed by a handful of checks you run yourself, not by more code. The minimum set, in order: - Refresh the page after every write. Persistence is the most common silent failure. - Use the app as a second user in a private window. Auth rules fail quietly and only for other people. - Put in bad data on purpose: empty fields, a 500-character name, an emoji, a date in 1823. - Break the network mid-action and watch what the interface does. - Deploy it, then run all four again on the deployed URL. Environment variables that exist locally often do not exist in production. That last one catches a surprising share of "it worked on my machine" failures. Local and deployed are different environments with different secrets and different databases. One registrant in the same survey named the deeper version of this problem: getting to output "reliable enough for real users". Reliability is not a feature you add at the end. It is what you get from testing each vertical slice as you finish it, while you still remember how it works.

A Worked Example: From Mockup to Working App in One Sitting

Here is the sequence applied to a real case, an app for logging client enquiries, starting from an AI-generated prototype that looked complete and stored nothing. 1. Delete the fake data. Find the hardcoded array the agent invented and remove it. The app should now be visibly broken. That is progress, because the broken state is honest. 2. Create the table. One table, the fields you actually need, nothing speculative. 3. Wire the write. Form submits, row appears in the database. Check it in the database viewer with your own eyes, not in the interface. 4. Wire the read. List pulls from the database. Refresh. The row survives. 5. Add the access rule. Second user in a private window sees nothing of yours. 6. Add error and loading states. Turn off the network and confirm the app says something useful. 7. Deploy and repeat steps 3 to 6 on the live URL. Seven steps, and at no point are you asking the agent to "finish the app". You are asking for one link in the chain at a time, and checking each one before moving on. This is the working method taught in buildAcademy, because it is the difference between people who leave with a deployed app and people who leave with a prototype.

Common Questions

Why does the AI keep using fake data instead of my database? Because nothing in the prompt told it a database exists. Agents fill gaps with plausible placeholders. Name the table, the fields and the access rule explicitly, and the placeholders stop appearing. Should I start over or fix the prototype I have? Fix it, but strip it back first. Delete the hardcoded data and any screen that is not part of your first vertical slice. A smaller codebase gives the agent less to contradict itself with. Do I need to understand the backend code the AI writes? You need to understand the data flow, not the syntax. If you can say which table a button writes to and what happens when it fails, you can debug it. That is a learnable skill and it is most of the job. How long should the first working slice take? For a simple app, a focused session. If you have spent days without one feature working end to end, the problem is usually scope, not skill. Cut the feature list and finish one thing.

Get Past the Prototype Stage

buildAcademy is three live sessions where you build and deploy a real AI-powered app, one working slice at a time. No coding experience needed, and you leave with something people can actually use.

Explore buildAcademy