Push2Commit
Book a Call
All blog posts

Vibe Coding Got You 80% There. Here's What Breaks Next.

Author: Abderrahmen Lahmedi4 min read
A partially built bridge over a canyon, steel frame solid but planks missing on the final 20% span

A founder posted on r/lovable in February 2026: "AI gets me 80% there then I'm in a doom loop." The post had 400 upvotes in a day.

The feeling is accurate. The 80% that vibe coding builds — the screens, the happy path, the demo — is real. It works. The 20% it does not build is not a small gap to close. It is a category switch from "build the feature" to "make it safe for people you don't know, handling money you haven't seen, at traffic you can't predict."

Here is what breaks in that 20%, in order of how often we see it.

Stripe Webhooks Are Unsigned

An audit of 30 vibe-coded MVPs published in mid-2026 found that 26 had unverified Stripe webhooks. This means anyone who knew the endpoint URL could POST a fake payment confirmation and receive access, credits, or a subscription upgrade.

Fixing it takes about 30 minutes. Discovering it after a founder's first refund dispute takes much longer.

The fix: Stripe signs every webhook with a secret. Your handler must check stripe.webhooks.constructEvent(payload, sig, process.env.STRIPE_WEBHOOK_SECRET) before acting on it. If you built with an AI tool and never saw this line in the generated code, check your handler now.

Supabase Row-Level Security Is Off

This is the most common security gap in Lovable and Replit projects. When you build with AI, the tool creates tables and writes your app logic. It does not, by default, write database-level access rules.

The result: a logged-in user can often query rows belonging to other users by modifying the request slightly. In a SaaS with multiple tenants, this means user A can read user B's data.

Supabase RLS must be enabled per-table and per-operation. The app works fine without it in a demo where there is one test user. It is a data breach in production.

Auth Edge Cases the Happy Path Doesn't Hit

Your AI-built app almost certainly handles login correctly. It probably does not handle:

  • A user who opens the same magic link twice
  • A session that expires mid-form submission
  • A password reset for an email address that doesn't exist in the database
  • An OAuth callback that lands on a 404 after a URL refactor

None of these matter in a demo. All of them generate support messages and sometimes security incidents in production.

Environment Variables in the Client

Cursor, Bolt, and similar tools sometimes generate code that places API keys in environment variables prefixed with VITE_, REACT_APP_, or NEXT_PUBLIC_. Those prefixes mean the value is bundled into the JavaScript that ships to the browser. Anyone who opens DevTools can read them.

If your Supabase service-role key, your OpenAI key, or your Stripe secret key is in a client-side variable, it is public.

Concurrent Users Break What Solo Testing Passes

One user clicking "submit" triggers one database write. That is easy to test. Fifty users clicking "submit" in the same second creates race conditions: duplicate records, negative inventory, double charges.

This is not an edge case in a successful launch. It is the normal case the morning after you post on Product Hunt.

Race conditions require database-level locks or upsert patterns. AI tools do not add these by default because they cannot know which operations are sensitive. You have to add them.

What This Looks Like in Practice

A founder we worked with launched a subscription product using Lovable. The app looked excellent. First ten paying customers worked fine. Customer eleven hit a webhook timing issue that created a subscription record but no user account — they paid but could not log in.

The fix was two lines. Finding it took longer because the logs were not structured, the error was swallowed silently, and there was no alerting set up. Standard AI-built behaviour.

Fix vs Rewrite

The honest answer: most vibe-coded apps do not need a full rewrite. They need an audit that finds the specific gaps, followed by targeted fixes.

The rewrite case applies when the data model is wrong in a way that affects every query — when the core schema needs to change and there is no migration path without it. That happens. It is not the common case.

The more common case is 15–30 hours of a senior developer reviewing the code, documenting what is broken, and patching the specific issues. The app continues. The auth edge cases close. The webhooks get verified. The RLS goes on.

If your app is in the "80% done" state and you are trying to decide whether to push it live, do not. Run the audit first. The cost of fixing security holes before launch is about one-tenth the cost of fixing them after a customer raises a dispute.

Our Clients

We partner with startups, scale-ups and established businesses across industries, from fintech and SaaS to AI and trading platforms. Our client portfolio reflects the trust and long-term collaboration we build by shipping production-ready products.

Copyright © 2026 P2C - All Rights Reserved.

STE PUSH TO COMMIT · VAT No. 000/M/A/1877276/G