Blog post
October 26, 2026

How to Take a Vibe-Coded App to Production

How to take a vibe-coded app to production: the database, secrets and backup checks to run first, a harden-or-rebuild score, and a four-week plan.

Illustration of a folded paper boat resting inside a sturdy wooden rowing boat moored beside a small jetty

To take a vibe-coded app to production, check four things before real customers arrive: every database table enforces who can read and write it, no secret ships inside the browser code, you can restore yesterday's data, and someone who can read the code owns it. Most prototypes fail the first check and can pass all four in two to four weeks without a rewrite.

"Vibe coded" here means an app generated mostly by prompting a tool such as Lovable, Bolt or Replit. That is a perfectly good way to find out whether anyone wants the thing. This post covers what to fix once they do.

What the prototype has already proved

A working prototype with real users has answered the expensive question: the problem is worth solving and the workflow roughly fits. Throw none of that away. The screens, copy, user flows and data you have collected are the specification for whatever comes next, whether you harden the code or replace it.

The gap between a prototype and a product is short and predictable. Generated code tends to optimise for "it works when I click through it", and production asks "what happens when someone clicks through it deliberately wrongly". Veracode's 2025 GenAI Code Security Report tested more than 100 language models on 80 coding tasks and found security flaws in 45% of the results. A human review before launch is not optional.

Is the database actually locked down?

Start here, because it is where the worst damage happens. Many generated apps use Supabase, which exposes your tables to the browser through an API. The only thing standing between a visitor and your customer table is row-level security (RLS), a set of database rules that say which rows each user may touch. Supabase's documentation says that a table in an exposed schema without RLS is readable and writable by any role with a grant on it.

This has already caused real incidents. CVE-2025-48757, rated 9.3 (critical), describes insufficient RLS in projects generated with Lovable up to April 2025. Lovable disputes the CVE and argues that each customer is responsible for protecting their own application's data. Whoever is right, the practical conclusion for a founder is the same: assume nobody has checked your rules and check them yourself.

A ten-minute test you can run today:

  1. In the Supabase SQL editor, run select tablename, rowsecurity from pg_tables where schemaname = 'public';. Any row showing false is wide open.
  2. Copy the project URL and public (anon) key from your deployed front end. From a terminal, request a table directly: curl "https://YOUR-PROJECT.supabase.co/rest/v1/YOUR_TABLE?select=*&limit=5" -H "apikey: YOUR_ANON_KEY". If rows come back and you were not logged in, anyone on the internet can read them.
  3. Repeat the request while logged in as user A, asking for user B's rows. It should return nothing.

Lovable's own documentation says its quick scan does not cover application-code risks such as weak authorization checks or exposed credentials, and recommends a professional review for sensitive data. Run the scan, then run the test above anyway.

The other gaps that bite early

Access control is the biggest one. OWASP ranks broken access control first in its 2025 Top 10, and every application it tested had some form of it. In a prototype this usually looks like an admin screen hidden in the interface but not protected on the server, or an endpoint that trusts a user ID sent from the browser.

Secrets come next. Search the repository for API keys, service-role keys and webhook secrets. Anything that appears in code sent to the browser must be rotated and moved to server-side environment variables. The Supabase service-role key bypasses RLS entirely and must never reach the client.

Payments need a webhook handler that verifies the provider's signature and is safe to receive twice. Error handling needs at least one rule: a failure should show the user a calm message and tell you about it, rather than swallowing the exception.

Tests, logs and a way back

You do not need full coverage. You need a short automated test for each money or data path: sign-up, the core action, payment, and deletion. Add error tracking and an uptime check so you hear about outages before customers do.

Then make sure you can undo mistakes. On Supabase, daily backups are included on the Pro plan with 7 days of retention, while point-in-time recovery is a paid add-on at roughly $100 a month for a 7-day window and needs at least a Small compute add-on (Supabase backups documentation, prices checked October 2026). For an app holding paying customers' data, daily backups plus a restore you have actually rehearsed is a reasonable starting point, and PITR becomes worth the money once losing a day of writes would cost more than $100.

Harden it or rebuild it?

Our default is to harden. Rebuilding throws away working behaviour and restarts the bug count. But some prototypes are not worth saving, and five questions separate them. Score one point for each "yes". This is our rule of thumb, not a published benchmark.

QuestionWhy it matters
Could a new developer run the app locally from the repository in under an hour?If not, every fix will be slow and risky.
Would you keep the current data model if you designed it again?Data is the hardest thing to migrate; screens are cheap to redo.
Does business logic live in the database or on the server, rather than inside UI components?Logic scattered through the front end cannot be secured.
Can the platform's architecture do everything the next six months need?Native mobile features, heavy background jobs or a fixed hosting region can rule it out.
Is the codebase small enough for one person to read in a few days?Unreadable code cannot be reviewed.

Four or five points: harden it. Two or three: harden the data layer and security first, then replace the front end screen by screen. One or none: rebuild, and treat the prototype as the brief.

A solo founder with a paying waitlist on a Lovable and Supabase app will probably score four, because the data model is simple and the work is mostly RLS and payments. An operations team whose Replit tool has grown to 40 staff may score two, since logic has accreted in odd places and nobody remembers why. A technical founder whose prototype receives data from devices in the field needs authentication, audit logs and a data model that can take ingestion at volume, and often ends up with a rebuilt back end behind the original interface.

Who owns the code after launch

Ownership has two parts. First, the code and data must live somewhere you control: a Git repository in your own account, a database project in your own organisation, and a domain registered to you. Second, a named person must be responsible for updates, dependency patches and the monthly review of access rules. If that person is "whoever prompts the tool next", expect the same security gaps to return with each new feature.

Staying in the generator is fine if you add that discipline. Changes should go through a branch, a review and the same short test suite, even when an AI wrote them. Our planning estimate for ongoing care of a small app is half a day a month, rising with usage.

How to take a vibe-coded app to production in four weeks

This is a planning estimate for a small app with one database and a payment provider. Larger apps stretch the middle weeks.

WeekWorkDone when
1Move code to your own repository. Rotate and relocate secrets. Enable RLS on every table and write policies. Run the three database tests.Logged-out and cross-user requests return no data.
2Add server-side authorisation checks on every protected action. Fix the payment webhook. Add input validation to every form.An attacker's request is refused even if the interface hides the button.
3Write tests for sign-up, the core action, payment and deletion. Add error tracking and uptime monitoring. Set up a staging copy.A deploy to staging runs the tests and fails loudly.
4Rehearse a backup restore. Write a one-page runbook. Do the harden-or-rebuild scoring for anything still shaky. Launch to a small group first.You have restored data once and know who answers an alert.

Do you need a penetration test first?

Not for a first launch of a small app. A review of access rules and secrets, plus the tests above, covers the likeliest failures. Commission a test when you hold sensitive personal data, take significant payments or sell to customers who ask for one in procurement.

If you have a prototype with real users and want a second pair of eyes on it, we offer a free 30-minute workshop to walk through the checks above and score it with you. Book a workshop.

For wider context see our overview of AI in web development, a breakdown of what an AI MVP costs, and a two-week proof of concept plan.

Sources: Veracode GenAI Code Security Report (July 2025); CVE-2025-48757; Supabase row-level security docs; Supabase backups docs; Lovable security docs; OWASP Top 10 2025, A01.

Other blog posts

Talk to us

Partner with a design team that turns ideas into powerful digital experiences

Start now

Book your free workshop and let's create magic together