Web & SoftwareUpdated Reviewed 11 min read

Why Your Lovable App Breaks the Moment Real Users Show Up

Lovable is a valid way to ship an MVP. The break happens when preview assumptions meet production: auth cookies, RLS, Stripe live webhooks, and who owns the repo.

Cracked glass panel over dark circuitry, suggesting a polished product with a fragile production layer

For SaaS founders, Nontechnical founders, AI SaaS founders, Agency owners · Intermediate · Commercial · Solves: App works in Lovable preview and fails after publish, Payments work in test mode only, Users can see other users data, No idea who owns the repo or the database

Key takeaways

  • Vibe coding is a valid way to get an MVP in front of people. Production is a different job.
  • Most Lovable apps fail at auth cookies, RLS, Stripe webhooks, and ownership, not at UI polish.
  • Do not rewrite by default. Harden the parts that touch money, identity, and other people's data.
  • Hire the person who can explain those four surfaces in plain English, not the person who promises a new stack.

Your Lovable app did not suddenly become a bad idea. It left a preview environment that was covering for it.

In the builder, you are usually signed in. The database request often carries a session. Stripe is in test mode. Secrets live where the platform put them. Then you publish, invite real users, flip live payments, and the product starts lying. The login loop. Empty dashboards. Checkout that charges a card and never unlocks the workspace.

That is not proof vibe coding is fake. It is proof that shipping an MVP and running production software are two different jobs. I am in favor of the first. I will not pretend the second is optional once money and other people's data show up.

I build product software in Next.js with Supabase and Sanity. I work independently through ZedNova Studios. I am not going to invent a Lovable rescue story. The failure modes below come from the platforms' own docs, plus one public incident that made the same mistake at scale.

Vibe coding is legitimate. Production is not automatic.

The goal of software is a useful product. Spending six months hunting bugs nobody has asked you to solve, so you can feel like a 'real' engineer, is how founders overbuild. Lovable, Bolt, v0, and Cursor are valid ways to get something in front of people fast.

The rule I use is simple. Ship fast enough to learn. The moment real users arrive, stop treating security, payments, and ownership as later. Later is how you leak a customer table.

Build quickly to validate. Harden aggressively the week the first stranger can log in.

Lovable's own security best practices say the same thing in vendor language: the frontend is always public, authentication decisions belong in Edge Functions, and RLS is the last line if the UI or the backend logic fails. If you shipped without reading that page, you shipped a demo with a custom domain.

What actually breaks first

1. Auth that only worked because you were already in the session

The classic pattern: it works in preview, then production returns empty data or a permission error after a hard refresh. The UI still thinks you are logged in because it read a token from localStorage. The server request that loads the dashboard did not attach the user, so auth.uid() is null and Postgres correctly refuses the row.

Lovable is explicit: client-side auth checks can be bypassed and should never enforce access. Validate the session in an Edge Function with supabase.auth.getUser(). On a Next.js host, that same idea is a request-scoped server client that reads the cookie, plus the production domain in Supabase Auth redirect URLs.

2. A database that is public because RLS was never the product

Lovable's Supabase integration docs say the quiet part: missing RLS policies are the most common way app data gets exposed. Supabase's own RLS guide is sharper. A table in an exposed schema without RLS is readable and writable by any role that still has a grant. Adding a pretty policy later does not revoke those grants.

This is why 'it works on my account' is a useless test. You need a second user. You need an anonymous request. If the second user can read the first user's invoices, you do not have a SaaS. You have a shared spreadsheet with a login screen.

3. Stripe that charged the card and never updated the product

Test mode hides the production webhook problem. In live mode, Stripe retries events, events arrive more than once, and the only safe handler is one that verifies the signature and processes each event id once. If your builder wrote 'on success, set plan = pro' in the browser, a user with DevTools can skip the invoice. If the webhook URL still points at localhost, checkout will succeed and entitlements will stay empty.

I will not quote a fake conversion rate. I will say this: payment state belongs in a signed webhook, stored against a workspace id you already trust, with a unique constraint on the Stripe event id. Anything less is hope.

4. Ownership that still sits in the builder account

Lovable can export and two-way sync to GitHub. It cannot import an existing repo. If the only copy of the app lives in a personal Lovable workspace, you do not own the product. Same for the Supabase org, the Stripe account, and the Vercel team. Put those under the company before you spend money on features.

Rewrite versus harden

When to harden a Lovable app versus when a rewrite is actually justified
SituationFirst moveWhy
UI is ugly, users still complete the jobHarden, then polishLooks are not the production risk
Login, roles, or data leaksHarden auth and RLS this weekIdentity and data access are the product
Stripe live, entitlements wrongHarden webhooks and idempotencyMoney state cannot live in the browser
Wrong object model, cannot express teams or billingTargeted rewrite of the data layerPolicies cannot save a schema that lies
Agency wants to start over in a new stackAsk which of the four surfaces they will ownA rewrite that skips RLS is the same incident with nicer files

Most founders overbuild the rewrite. They are embarrassed that AI wrote the first version, so they pay for a ceremonial restart. If users already do the job, keep the product and fix the dangerous parts. If nobody cares yet, you do not have a production problem. You have a distribution problem.

If you are still deciding who should own a Next.js-shaped product after the export, read how to scope a real Next.js product build. Agency versus freelancer is the wrong first question. The scope is the question.

The production pass I would run

  1. Export to a company GitHub org and confirm you can open a pull request without the original builder login.
  2. Inventory secrets. Stripe secret, OpenAI key, and service role stay on the server. Publishable keys can live in VITE_ variables. Lovable documents that split clearly.
  3. List every table in an exposed schema. Enable RLS. Revoke leftover anon grants you do not intend. Write one allow and one deny test per operation.
  4. Walk the auth path on the production domain: sign up, magic link or OAuth, hard refresh, invite a second user, confirm isolation.
  5. Put Stripe in a staging clone first. Verify webhook signatures. Replay an event and confirm the workspace does not double-credit.
  6. Only then add the next feature. New tables inherit the same RLS and grant ritual.

If you leave Lovable Cloud for managed Supabase, Lovable's external hosting guide is honest: there is no one-click migration. You take backups, auth providers, redirect URLs, and incident response with you. That is fine. It is still cheaper than pretending Cloud will babysit a growing SaaS forever.

How to hire without getting a theatrical rewrite

Ask the candidate to do four things on a call, with your actual app if you can share a staging clone:

  • Name the tables that should be private and how they would prove a second user cannot read them.
  • Explain where the Stripe webhook lands, how they verify the signature, and what happens when Stripe sends the same event twice.
  • Point at one secret that must never appear in the browser bundle, and one value that is allowed to.
  • Tell you who should own GitHub, Supabase, Stripe, and hosting after week one.

If they cannot do that in plain English, they are not a production engineer. They are a prompt operator with a rate card. If they insist the only professional move is a greenfield Next.js app before they have looked at the schema, they are selling hours.

A strong independent operator can often beat a process-heavy agency here. Fewer handoffs. One person who will still be in the repo when the first live invoice fails at 11pm. That is the job clients actually buy.

What this means if you are the founder

You did not waste the last month. You bought a validated shape of the product for a fraction of a traditional build. The mistake is treating the builder as a production department.

If you have no users yet, keep shipping and talking to people. Do not spend a quarter 'making it enterprise.' If you have users, or you are about to take cards, the production layer is now the product. Auth, RLS, webhooks, ownership.

The same post-launch mindset applies to marketing sites. I wrote about why I build for the post-launch web. SaaS just has a sharper version of that decay: a pretty dashboard that leaks rows.

If you want a second set of eyes, send the live URL, whether Stripe is test or live, and who currently owns the Supabase project. I will tell you whether you need a harden pass, a data-model rewrite, or more distribution. I will not sell you a ceremonial restart because the first version came from a prompt.

Implementation table

FixProblemWhat to changeMetricTool
Auth on the live domainWorks in preview, 401 after publishAttach the user session on every server request and add the production URL to auth redirectsHard refresh stays signed inSupabase Auth
RLS on every exposed tableUsers can query other users rowsEnable RLS, revoke leftover grants, write allow and deny testsAnon cannot read private rowsSupabase SQL + supabase test db
Live Stripe webhooksCheckout succeeds, entitlements stay emptyVerify signatures, handle retries, process events idempotentlyinvoice.paid updates the right workspaceStripe webhooks
Company-owned GitCode lives only in a builder accountExport to the company GitHub org and document env varsYou can deploy without the builder loginGitHub + Vercel
Related services

Work this article points to.

Website redesign

Website redesign

A redesign fails when it starts in Figma. Website redesign services should start with website strategy, the pages that create pipeline, then website design and website development. I run that sequence so a custom website redesign does not erase the rankings you already have.

View service

Sources & references

Related links

Zlatko Marjanovic — founder of ZedNova Studios

Zlatko Marjanovic

Founder, ZedNova Studios

I am Zlatko Marjanovic, founder of ZedNova Studios and an AI product engineer. I take over Next.js, Supabase, and Stripe codebases, fix what is actually broken, and keep shipping.

On GitHub I work in public with Cursor, Claude Code, Next.js, and Supabase. On Upwork I help founders who already have a product, often one built fast with AI tools, and now need someone to stabilize auth, billing, and deploys.

I have been doing this for 7+ years and have shipped 120+ projects for US and EU teams. The work I care about is the layer after the demo: RLS, webhooks, Vercel, and the next version.

If you want help with a build, a messy repo, or a site that should rank and convert, email me at zlatkomarjanovic.zm@gmail.com.

LinkedInX / TwitterGitHubWebsiteUpwork
Older articleHeadless CMS for Marketing Teams: When Webflow or Framer Is Not EnoughNewer articleSupabase RLS Is Where Vibe-Coded SaaS Starts Getting Dangerous

Related