Intelligence Redefined
Notes from ProductionProduction AI

Making Lovable, Bolt and Replit Apps Production-Ready

Where vibe-coded apps fail with real users, how to check yours, and when to fix or rebuild.

AI app builders such as Lovable, Bolt and Replit have collapsed the cost of a first version. They have not changed what it takes to run software in production: correct access control, reliable payments, an architecture that holds under load, and a codebase a team can change safely.

That gap is where many promising products stall. The demo works; the system underneath is not ready for real users. This article sets out where AI-built (or "vibe-coded") applications typically fail, how to check your own, what the 2026 evidence shows, and how to decide between targeted remediation and a rebuild.

A five-minute self-check

  • Could one customer ever see another customer's data?
  • If a customer closes the tab mid-payment, is the order still recorded correctly?
  • Does fixing one bug regularly break something else?
  • If the app went down tonight, would anyone be alerted, and is there a backup?
  • Do your AI feature's answers or costs ever surprise you?

If you cannot answer any of these with confidence, the sections below explain why it matters.

Why generated code degrades

AI builders optimise for the change just requested. They work with partial context of the codebase, rarely have tests that show what is safe to remove, and their output is seldom reviewed. The result is accretion: new code is added beside old code rather than replacing it.

Over successive prompts, an application accumulates parallel solutions to the same problem, unused services and layered workarounds. None of this is visible in a demo. All of it surfaces under real usage.

Where AI-built and vibe-coded apps fail

  1. Access control. Authentication usually works; authorisation often does not. Admin rights are enforced in the interface rather than on the server and in the database, or roles are read from user metadata that users can edit themselves. Permissions belong on the server, with roles held in app_metadata or a dedicated roles table. What you would notice: one customer sees another's orders, or a regular user reaches admin functions.
  2. Payment integrity. Only a Stripe webhook with a verified signature should confirm a payment, never a browser redirect. Because Stripe may deliver an event more than once and out of order, each event must be processed only once. What you would notice: orders marked as paid that never were, or customers charged twice.
  3. Real-time architecture. Long polling holds a request open for every connected user and adds load with each open tab. It is adequate at small scale; as usage grows, push connections such as WebSockets or Supabase Realtime are faster and cheaper to run. What you would notice: chat that lags as usage grows, and a hosting bill rising faster than your user count.
  4. Data security. Row level security must be enabled on every table, with policies that genuinely restrict access. A permissive policy is equivalent to none, and views, security definer functions and public storage buckets can bypass the rules entirely. Secret keys, including Stripe secret keys and the Supabase service role key, must never reach the browser. What you would notice: nothing, until your users' data turns out to be readable by anyone who knows where to look. That is the pattern behind every 2026 incident below.
  5. Change safety. Without automated tests, version-controlled database migrations, type checking or linting, every change carries more risk than the last. What you would notice: every release breaks something that used to work.
  6. AI features. Retrieval that sends far more context to the model than it needs, no fallback when the model is unsure, no evaluation against real user questions, and no tracing of how an answer was produced. Instructions hidden in user input or documents can also override the system prompt, known as prompt injection. What you would notice: confidently wrong answers, AI costs that spike with usage, or users who can talk the assistant out of its rules. More in Five Signs Your AI Prototype Is Not Production-Ready.

A correctly scoped policy in Supabase, restricting each signed-in user to their own rows:

-- Turn on row level security for the table
alter table public.orders enable row level security;

-- Each signed-in user can read only their own orders
create policy "Users read their own orders"
on public.orders for select
to authenticated
using ((select auth.uid()) = user_id);

What the 2026 evidence shows

Security carries the highest stakes, because a failure exposes customer data. This year's incidents follow a consistent pattern:

  • February. Moltbook, an AI social network whose founder stated he had not written a line of code, exposed approximately 1.5 million API tokens and 35,000 email addresses because its database had no access rules (Wiz).
  • June. An academic audit of 200 live applications built with Lovable and Claude Code found at least one vulnerability in 91% of them, most commonly broken access control, injection and authentication failures (arXiv).
  • September. UpGuard identified around 16,000 databases on Supabase, a service behind many AI-built applications, exposing personal data including names, addresses and phone numbers, and in some cases passwords (TechCrunch).

The common thread is not the tooling. It is the absence of engineering review before launch.

Remediate or rebuild

Many AI-built applications do not need a rebuild; targeted remediation is often sufficient. The following indicate that the foundations need attention:

  • Defects recur after every fix.
  • Changes in one area cause failures in another.
  • Parts of the codebase are avoided because changing them is unpredictable.
  • The AI tool rewrites code outside the scope of a request.
  • Real users, payments or personal data are imminent.

In practice, one or two of these can be addressed in place. Several together indicate that continued patching will cost more than re-architecting the core.

Our approach

  1. Assessment. We review the codebase and test the critical paths: authentication, data access, payments, deployment and any AI features. You receive a written report setting out what is broken, what is at risk and what to address first, with a fixed quote for the remediation.
  2. Remediation. The fixed scope from the assessment. We resolve critical issues, or rebuild the foundations where remediation will not hold, migrating existing users and data.
  3. Operation (optional). Monitoring, maintenance and ongoing changes after launch.

The codebase remains yours, documented and maintainable, whether your team continues with conventional development or with AI tools.

Case in point

A founder's Lovable MVP was scoped as "a few bug fixes" before launch. On inspection, we found backend services that were never used, two state management solutions where one sufficed, and real-time chat built on long polling. We consolidated state management, redesigned the Supabase integration and removed unnecessary abstraction. The result: the same functionality, roughly 60% less code, and a codebase the team can maintain again.

Next step

If the self-check left you unsure on any point, start there. An assessment shows exactly where your app stands before your users find out. Book a 30-minute conversation with our founder.

Keep reading

All notes →