How to take a Lovable app to production

Saif Ali, MVP developerBengaluru, India · works with React and SupabaseLast updated · 9 min read
In shortA Lovable app is ready for production once these are true: every Supabase table has row-level security tested against the public key, no secret key ships in the browser, the server decides who the user is and what things cost, verified webhooks confirm payments, production has its own backed-up database, and core flows have automated tests.
Plain version: it's ready when strangers can't see your users' data, nobody gets your product without paying, and you'd know if something broke. Not sure? It isn't ready yet.
Not technical? Send me the link. I'll run the database test with you on a free 15-min call.
Nothing to pay until you approve the Day-2 plan, then one week at a time.
$1,200a week to fix it · most prototypes need 1–2 weeks · Next sprint starts next week · See the offer ↓
Is Lovable production-ready?
As a starting point, yes. I've built with Lovable myself (the marketing site for Gozo, joingozo.com), and the front end it writes is ordinary React and TypeScript that any developer can read. With GitHub sync turned on, the code is in your own repository.1 Jobly, a contractor platform I built, runs on React and Supabase too.
The risk isn't the screens. It's everything around them: who can read the database, where secret keys live, what confirms a payment, and what happens when something breaks at 2 a.m. A prototype doesn't need any of that. A product with real users does.
Here's the list I'd work through before launch.
The production checklist
If you only have a day, do 1, 2, 3 and 4. They're the ones that leak data or money.
- Can a stranger see my users' data? Signed out, or signed in as someone else. Check 1
- Are my secret keys hidden? Nothing secret should ever reach the browser. Check 2
- Can someone fake a price or a user? The server decides, not the browser. Check 3
- Does a closed tab still count as paid? Only Stripe's confirmation should. Check 4
Not sure about any of them? I fix prototypes at $1,200 a week, and most need one or two weeks. Send me the link on a free 15-min call →
For your developer: the detail behind the 4 questions
| Area | What goes wrong in prototypes | How to check | Fix |
|---|---|---|---|
| 1. Database access (Supabase RLS) | Tables readable or writable by anyone holding the public anon key | Call the Supabase API with only the anon key and no login; try reading another user's rows | Turn RLS on for every table; write policies per role; re-test signed out and as a second user |
| 2. Secrets | A service-role key or a third-party secret key ends up in the browser bundle | Search the built JS and your env files; anything prefixed VITE_ is public | Move secret calls into Edge Functions or a server; rotate any key that was ever exposed |
| 3. Server-side checks | The browser sends user_id, role or a price, and the backend trusts it | Change the value in dev tools and replay the request | Derive the user from the session on the server; look up prices server-side |
| 4. Payments | Order marked “paid” from a browser redirect; double charges on retry | Close the tab mid-payment; replay a webhook | Create checkout on the server; fulfil only from a signature-verified Stripe webhook; make fulfilment idempotent |
8 more checks: environments, custom domain and deploys, test data, rate limits, auth, backups, errors, tests, speed
| Area | What goes wrong in prototypes | How to check | Fix |
|---|---|---|---|
| 5. Environments | One database for testing and real users | Look at where your dev app points | Separate production project; schema changes as migrations in git. Custom domain and SSL set on the production project; deploys from git, not from the preview |
| 6. Test data | Seed users, sample promos or fake listings reach production | Browse production signed out | Remove seed data; keep fixtures out of production migrations |
| 7. Rate limits | Login, OTP and AI endpoints can be hammered (and billed) | Script 50 quick requests | Rate-limit by real client IP and by account |
| 8. Auth edge cases | Password reset or OAuth redirects still point at the preview URL | Run every auth flow on the production domain | Set production redirect URLs; test reset, expiry and sign-out |
| 9. Backups | No tested restore | Check your Supabase plan's backup settings | Turn on backups that fit the plan; do one test restore |
| 10. Errors and logs | Users hit errors nobody sees | Break something on purpose | Add error tracking (for example PostHog or Sentry) and alerting |
| 11. Tests | Every change can silently break sign-up or payment. If every prompt breaks something else, this is why | Is there a test that fails if sign-up breaks? | Automated tests on sign-up, payment and the main workflow, run on every change |
| 12. Speed and SEO | Slow on phones; marketing pages invisible to search because they render in the browser | Lighthouse on mobile; view page source | Compress images, split heavy code; serve marketing pages pre-rendered or from a separate site |
The one that matters most: who can read your database
Lovable apps usually talk to Supabase straight from the browser using a public key (Supabase now calls it the publishable key; older projects say “anon”). That's fine, by design, only if row-level security (RLS) decides which rows each person can see.2 Without it, the public key opens the table.
This isn't theoretical. In March 2025 a Replit engineer, Matt Palmer, scanned 1,645 public Lovable apps. 170 of them (about 10%) exposed data through 303 open endpoints.3 In May 2025 it was published as CVE-2025-48757: with weak or missing row-level security policies, anyone on the internet, with no login, could read or write the tables of Lovable-generated apps. The record rates it 9.3 out of 10 (critical).4 Lovable disputes the CVE: it says each customer is responsible for protecting their own app's data.
Since then Lovable runs a security scan when you publish.5 It helps, but a scan can tell you a policy exists, not that it's right for your data. The fix is yours: turn RLS on for every table in the public schema, write policies that only return the signed-in user's rows (for example auth.uid() = user_id), and keep the secret service_role key on the server, never in the browser.2 Then test it as a signed-out visitor and as a second user.
Test it yourself in 10 minutes:
- Open your app signed out. In dev tools, copy a Supabase request.
- Replay it with only the anon key. Do you get rows back?
- Sign in as a second test user and request the first user's data by ID.
Got rows back? Fix RLS before anything else. Send me the link: on a free 15-minute call we'll run this test together and I'll tell you what to fix first.
Book a free 15-min callPayments: where prototypes lose money
The common prototype pattern: Stripe redirects back to /success, and the app marks the order paid. Anyone can open /success.
What production needs:
- Create the checkout on the server, with the price looked up there, not sent from the browser.
- Fulfil the order only from a Stripe webhook, after checking Stripe's signature.6
- Make fulfilment idempotent, so a retried webhook never ships twice or charges twice.
- Handle the late cases: payment succeeds after the user closed the tab, or after your app timed out.
- Subscriptions too: renewals, failed payments and cancellations should update your app only from verified webhooks, not from the browser.
On Gozo, food-truck customers pay at a kiosk through Stripe Terminal. Every payment attempt is recorded per order, webhooks and a poller both settle the outcome, and late successes are reconciled, so nobody is charged twice and no paid order is lost. Tests cover declines, cancel then late success, lost responses, and repeated or forged webhooks. I've also spent seven months as a core engineer on a white-label payments platform built on Stripe Connect.
Gozo: in production in 26 days, 50+ orders per merchant
Keep building in Lovable, export, or rebuild?
| Situation | My advice |
|---|---|
| Simple app, small team, you still change the UI often | Stay in Lovable, keep GitHub sync on, and fix items 1–4 and 9 first. |
| Real users or payments coming, logic growing, a developer will own it | Export through GitHub sync and continue in code. Keep the UI; move secrets and business rules to the server. |
| The prototype's data model is wrong, or it's a tangle of patches | Rebuild the backend around what you learned, reuse screens where they fit. A clear first version makes a rebuild fast. |
A rebuild sounds scary, but it's often the fast option once the product is clear. I rebuilt Hibnus Find from a Flutter app into an installable web app in 6 working days, because the first app had already answered the hard product questions. Whichever you pick, the code stays in your GitHub.
What a security pass found on a real launch build
On launch day for Hibnus Find, my own local-services marketplace, I probed the production build (read-only) and attacked a staging copy on purpose before real users arrived: forged logins, reading other people's data, role escalation, booking race conditions. Most of it held. Four high-severity issues didn't, and I fixed all four the same day.
Login limits counted the wrong visitor
Login rate limits counted the CDN's rotating proxy addresses instead of the real visitor. The fix keys on the real client IP.
Phone numbers visible signed out
Worker phone numbers were visible to signed-out visitors. They now need sign-in.
Booking your own service
A worker could book their own service, which would allow fake ratings. It's now refused.
Sample promos in production
Sample promos from test data had reached production. A migration removed them.
None of these would show up in a demo. All of them would show up with real users. That's the gap between a prototype and production. Hibnus Find isn't a Lovable app, but every one of these four is on the checklist above (rows 7, 1, 3 and 6).
Want me to do it?
I take AI-built prototypes to production as a fixed weekly sprint. You don't start over: I keep what works. Same checklist, same price for Bolt, Base44, v0 and Cursor projects.
- Free call
Before the sprint · Free 15-min call
Your app and what's breaking. Bring the repo link and we'll look at it together.
- D2
Day 2 · Fix plan and price
A one-page plan from our call and the database test: what's fine, what's risky, what I'd fix first. You approve it and pay for week 1, then I start.
- Week 1 on
Code review and fixes
Week 1 starts with a code review, and I keep what works. Then database security, secrets, payments, a production environment, tests on your core flows. A demo link every 2–3 days.
- Launch
Live
Live on your domain, code in your GitHub. Built in Lovable? You can keep editing it there through GitHub sync; we agree who changes what.
$1,200a week, fixed · usually 1–2 weeks
A week is a 5-day sprint, Monday to Friday. Most prototypes need one or two weeks. If yours needs a rebuild, the Day-2 plan says so, with the price, before you pay anything.
- Nothing to pay until you approve the Day-2 plan, then one week at a time
- If I lose a day on my side, it's added to the end of your sprint at no extra cost
- Hosting stays on your own accounts, billed at their normal rates
- Only one or two small things broken? $50/hour before or after launch, only for hours you approve
- Online until 11am US Eastern (8am Pacific), and through most of the UK working day. You pay in USD, by card or Wise
- Your stack: I built joingozo.com, Gozo's marketing site, on Lovable · Jobly: React and Supabase, client MVP in 14 days
- Security: Hibnus Find, 4 high-severity issues found and fixed the same day
- Payments: Gozo, tests cover declines, late payments, and repeated or forged webhooks
“They built a complex MVP with Google Business and payment integrations in just two weeks.”
Starting from scratch instead? MVP development in 2 weeks → · All prices: Pricing → · Fixing a Bolt, v0, Cursor or Base44 app →
Questions about Lovable in production
Is Lovable good enough for a real product?
As a starting point, yes. The front end is standard React and TypeScript, and GitHub sync keeps the code in your repository. What needs work before real users is around it: database security, secrets, payments, environments, backups and tests.
Is my Lovable app secure?
Not automatically. Test whether your Supabase tables can be read with the public anon key while signed out, and whether one user can read another's data. If either works, fix row-level security before launch.
Can I keep editing in Lovable after a developer works on the code?
Yes, through GitHub sync, but agree on who changes what. The code stays in your GitHub either way. Once business rules move to the server and tests exist, most teams let the developer own the code and use Lovable for UI experiments.
How much does it cost to make a Lovable app production-ready?
Freelance gigs start from about $300 for single fixes. Agency cost guides commonly quote $10,000–50,000 for a whole first version. I do it as a fixed sprint at $1,200 a week; most prototypes need one or two weeks. For one or two small fixes, it's $50/hour, only for hours you approve.
How long does it take?
Most prototypes need one or two weeks; a focused app is often one. A backend rebuild takes longer; you'll know on Day 2.
Do I need to move off Supabase?
Usually not. Supabase is a solid Postgres host. Fix the policies and move secret logic into Edge Functions or a small server.
Do you also fix Bolt, Base44, v0 or Cursor apps?
Yes. The checklist is the same, and so is the price. Fixing a Bolt, v0, Cursor or Base44 app →
Sources
- Lovable GitHub sync and code export: lovable.dev/faq/code-export
- Supabase row-level security: supabase.com/docs/guides/database/postgres/row-level-security
- The researcher's statement (1,645 apps scanned, 303 endpoints across 170 projects): mattpalmer.io/posts/statement-on-CVE-2025-48757. Press report: Semafor, 29 May 2025
- CVE-2025-48757 (insufficient Row-Level Security policy in Lovable through 2025-04-15; CVSS 3.1 9.3; marked disputed by Lovable): nvd.nist.gov/vuln/detail/CVE-2025-48757
- Lovable security scan on publish: docs.lovable.dev/features/security
- Stripe webhook signature checks: docs.stripe.com/webhooks
Related guide: Webflow custom code in a repo, loaded per component →