Skip to content
BlackBadger

Custom software. Lovable to production

Lovable security and production readiness for the app your business runs on.

Lovable gets a working app on the screen fast. Running a company on it is a different job, and security is where that difference shows first. We move the app into accounts in your company's name, close the security gaps vibe coding usually ships with, and set it up so the next change can't quietly break the last one.

By David Verneuille, Founder, Black Badger Software Solutions. Updated .

A Lovable app becomes production ready when it moves into accounts in the company name with access rules, server-side secrets, tested backups and tests.
The six checks that separate a working app from a system a business runs on.

The problem

Why do Lovable apps stall before production?

Because the part Lovable makes easy was never the hard part. A first version has to work once, for the person who built it. A system a company runs on has to keep working for everyone, with real customer records in it, while somebody keeps changing it.

That gap shows up the same way every time. Each new prompt fixes one thing and quietly moves another, and there are no tests to catch it. Nobody is sure who can see which records. The code lives in a builder's or a freelancer's account, and the one person who understands it is the one who prompted it into existence.

None of that means the build was a mistake. It means it worked well enough to matter, and now it needs what any production system needs.

What we check first

What does a Lovable app need before a business depends on it?

The same six things, every time, and you get the findings in writing.

Secrets

API keys, passwords and tokens found anywhere in the code get moved into a secrets store, and any that were exposed get replaced with new ones.

Row-level policies

Every table gets row-level policies, so the tables themselves refuse to hand one user another user's records, whatever the screens ask for.

Server functions

Each function that reads records or moves money checks who is calling it before it does anything.

Ownership

Code repository, database, hosting, domain and email, each in your company's name. Not the builder's, not a freelancer's, not ours.

Backups

Automatic backups switched on and checked, so a bad day has a way back.

Tests and a second environment

Automated checks on the parts the company depends on, and a separate copy to try changes in, so the next change cannot quietly break the last one.

The readiness checklist

What production-ready means for a Lovable app

Six groups. The app is ready when every line below is true and someone can show you that it is, not just tell you.

Who can see what

  • A login on every screen that shows company records, with roles that match how your team actually works.
  • Row-level security policies on every table, not only the ones that looked sensitive.
  • Privileged actions like refunds, deletes and role changes run on the server, never trusted from the browser.
  • A check that logs in as one user and proves it can't read another user's rows.

Secrets and environments

  • No service keys or API secrets anywhere in the code that users download.
  • Any key that was ever exposed replaced with a new one.
  • Separate staging and production, each with its own database.
  • Environment variables set in the host, not written into the repository.

Migrations and backups

  • Every change to the database as a versioned migration in the repository.
  • Automatic backups switched on.
  • A restore actually tested, so the backups are known to work.

Quality

  • Automated checks on the paths that touch money and customer records.
  • Errors handled and shown as a message someone can act on, not a blank screen.
  • Checked on a phone and against basic accessibility rules.

Delivery

  • Code in a GitHub repository in your company's name.
  • Automated checks that run on every change before it can ship.
  • A rollback path, so a bad release can be undone without a rebuild.

Operations

  • Logging and alerts, so a failure reaches someone before a customer reports it.
  • Handover documentation another developer can work from.
  • A forecast of what the app costs to run each month.
  • A named support boundary, saying what's covered after launch and who covers it.

The order of work

What order does the move to production follow?

The move follows the same process every time, and each step below waits for the one before it.

Ownership comes first

The code, the hosting and the domain move into accounts in your company's name. Lovable can sync its generated code to GitHub, GitLab or Bitbucket, which gives that code a home outside the AI platform. Custom software in accounts the company owns means the company owns its data and its code, with no vendor lock-in.

Permissions and user roles

The review against the checklist above comes second. Every table gets rules that match the roles your team actually uses, so customers see only their own records and staff see what their job needs.

The backend

Lovable's built-in backend runs on Supabase's open source foundation. The tables, accounts, file storage and functions can move to a Supabase account your company owns.

Testing and a staging copy

Automated testing and a staging copy come fourth. Testing covers the essential workflows first, for example a new order, a refund and the main report. From then on, a change reaches real people only after review and passing checks.

Launch and maintenance

The launch comes last. Lovable can host on a lovable.app address or a custom domain. In the move, the custom domain stays where visitors already find the site, and the hosting moves to an account the company controls. For the people who use the website, nothing changes on launch date.

A public-facing app needs its custom domain and SSL certificate configured before launch. Monitoring goes live at the same time, so the team can watch how the app performs after launch.

Lovable's docs cover the most common surprise when an older React and Vite build moves to another host. A refresh on any route returns a 404 until the host has a fallback rewrite that serves index.html for every route. For Lovable builds on TanStack Start, a 404 on refresh means the host is not running the server part.

After launch, maintenance is a scheduled job for developers on a named team, not a prompt typed into an AI tool when something breaks.

Web apps, an Android app and push notifications

Lovable builds for the web. Customers open what it builds on mobile phones, tablets and desktop devices without installing anything.

A listing on Google Play, an iPhone build for Apple's App Store, and alerts sent to a phone are separate work. Plan them once the web build is stable and real people rely on it.

Integrations and scaling

Connected tools such as payments, email and maps are integrations, and each one gets its own key, stored as a secret and never in the code.

Scaling comes after the launch. Watch search terms, analytics and support requests for the first weeks, then create new features where customers spend their time.

AI tools can still generate first drafts of new features after the move. The difference is that a developer reviews the generated code before it ships.

From the record

What did we find the last time?

A client came to us with an app a previous vendor had built in Lovable. It worked, and the client had come to rely on it. Moving it into accounts in the client's own name, we found API keys written straight into the code instead of being kept as secrets. They were found and fixed as part of the move, and it now runs on infrastructure the client owns.

Our own tooling works the same way. It refuses to accept a secret pasted into a chat and tells the developer to replace the key instead, because a key that has been pasted somewhere has to be treated as seen.

When not to

When should you leave it in Lovable?

When nothing depends on it yet. If the app is still proving an idea, keep prompting and find out whether the idea holds. Hardening something nobody uses is money spent too early.

This is also work for companies, not side projects. If you'd rather keep it in house, the training guides cover what you can safely do yourself. If the app does something a system you already own could do, we'll say so before we suggest building anything.

Built-in checks

How good is Lovable security out of the box?

Better than many people assume, and less than many people need. Lovable runs automatic security checks when you open the publish dialog. They look at database security (a table without per-row rules, or a rule that lets everyone in), public MCP tool access and vulnerable dependencies. Its advanced checks read all of the app code on demand, or on a schedule on Enterprise, across seven categories. Sign-in and accounts, access permissions, private data, keys and passwords, user input, app actions, and payments and paid features. Findings are labeled Critical, Warning or Info, and API keys pasted into a chat are moved to Secrets.

Lovable is also clear about the limit. Its security docs say you are still responsible for your app's security, and that the checks cannot guarantee an app is secure or replace a full security review. That matches what we see. The scanner catches common security vulnerabilities in a pattern it recognizes. It cannot know that a dispatcher should see every job and a customer only their own, because that rule lives in your business, not in the code.

Vibe coding security

What are the common security issues in vibe coded apps?

Vibe coding security problems repeat across platforms, because AI generated code repeats the defaults it learned from its training data. Invicti's security team generated over 20,000 web applications with AI models and found that 1,182 of them used the same hardcoded secret, supersecretkey. Common credentials such as user@example.com with password123 turned up again and again. These are the security risks we check for in every vibe coded application, whichever vibe coding tool built it.

  • Missing access controls. Tables with no row level rules, so any signed-in user can read sensitive data that belongs to someone else.
  • Hardcoded secrets and exposed secrets. API keys written into the code or configuration files, where anyone who sees the repository or the browser bundle can use them.
  • Default and reused credentials left in seed data or test accounts that made it to production systems.
  • Server functions that do their work without checking who asked, which is how data leakage happens even when the screens look locked down.
  • Unchecked user input, the door to SQL injection risks and stored scripts, though Invicti saw far fewer SQL injection cases than secret and credential problems.
  • Vulnerable dependencies pulled in by a prompt and never updated.

Why it happens

Why does vibe coding introduce security risks?

Because vibe coding platforms optimize for the moment the app works on screen, and security is mostly about what happens off screen. Each prompt can change many files at once, nobody reviews the diff, and there are no tests to catch a rule that quietly got looser. Non developers building full stack apps have no reason to know what a row level policy is, and the AI agents writing the code will not ask.

None of that makes vibe coding a mistake. Vibe coding is the fastest way to find out whether an idea works. The security posture of apps built this way just has to be checked by someone before customers, payments or sensitive information depend on them. Secure code is a review step, not a prompt.

After launch

Which security practices keep a vibe coded app safe after launch?

A clean scan on launch day is a starting point. Vibe coding can introduce vulnerabilities at machine speed, so the checks have to run every time the code changes, not once.

  • Keep secrets separate from the codebase, with environment files listed in .gitignore so they never reach a repository.
  • Run automated security checks in a CI/CD pipeline, so problems are caught during development instead of in production.
  • Turn on multi-factor authentication for every admin account, including the Lovable, Supabase, hosting and domain accounts.
  • Use role-based permissions and data minimization. Collect only the sensitive data the app needs, and let each role see only what its job needs.
  • Encrypt sensitive data in transit and at rest, and publish a clear privacy policy that matches what the app actually stores, with GDPR in mind if you serve people in Europe.
  • Write a short incident response plan naming who rotates keys, who tells customers and who restores from backup.
  • Schedule regular security audits, because every new feature changes the security posture.

The security scan

How do you run a security scan on a Lovable app?

Start with Lovable's own security checks, then go past them. This is the order we follow.

  • Run the automatic and advanced security checks in Lovable and fix every Critical finding. Read the Warning and informational findings too, because some of them matter for your business even when the scanner ranks them low.
  • Test access controls as each real role. Sign in as a customer, a staff member and an admin, and try to read and change records that are not yours. This is the security check a scanner cannot do.
  • Search the code and configuration files for hardcoded secrets. Do not simply replace a key that was ever exposed. Rotate it with the provider, because a key that has been seen has to be treated as compromised.
  • Run code analysis on the repository and a dependency audit, and update vulnerable dependencies.
  • Review every server function for a check of who is calling it, and every form for how user input is handled.
  • Have a developer review the findings and sign off, because vibe coding speed is no substitute for review. AI tools such as Claude Code can speed up the code review, but a person owns the result.

You get the findings in writing whether or not you go ahead with us. Most teams find a short list of real issues and a longer list of practices to adopt, so the next feature does not reopen them.

Sources

Where do the figures and vendor details on this page come from?

Questions

What people ask about taking a Lovable app to production

Security first, because that's the question that matters most here.

Is our Lovable app secure?

Possibly, but nobody can tell from the screens. The gaps we find most often sit underneath them. Tables with no row-level policies, so a signed-in user can read rows that belong to someone else. API keys and other secrets written into the code instead of kept in a secrets store. Server functions that do their work without checking who asked. Each of those gets checked before anything else happens, and you get the list in writing whether or not you go ahead with us.

Can you take over an app someone else built in Lovable?

Yes, and that's the usual way this work arrives. The one in the story below was built by a previous vendor. We start by getting admin rights to the Lovable project, the code repository, the database and the domain, then read the code and run the checklist above against it. You get the findings in writing before you decide anything, and nothing the previous builder did has to be thrown away just because we didn't write it.

Do we have to stop using Lovable?

No. Lovable stays a good place to try an idea quickly. What changes is the route to your users. The production system lives in your own repository and accounts, and a change only reaches the people who use the app after it has been reviewed and the checks pass. Try ideas in Lovable if that's fastest, and bring what works into the real system the same careful way.

How long does it take?

It depends on what the review finds, so there's no fixed number for it. A build with row-level policies already in place and its secrets kept properly is a different job from one where every table is open. The review comes first, and the written scope that follows it lays out every piece of work in the order it gets done.

Do you rewrite the app from scratch?

Not by default. Most of what Lovable generates is ordinary React on the front and Supabase underneath, which any capable developer can read and work on. We keep what holds up, fix what doesn't, and rewrite only the parts that can't be made safe or maintainable. If the honest answer is that a rebuild costs less than the repairs, you'll hear that on the first call rather than halfway through.

What does moving off Lovable Cloud involve?

Lovable Cloud runs your database, user accounts, file storage and server functions on infrastructure under Lovable's account. Moving it means standing up a Supabase project in your company's name and bringing all of that across. The tables and their data, the user accounts, the stored files, the server functions and the secrets they use. The aim is that your users sign in the next morning with the same password and never notice the move.

Our freelancer or previous vendor built it in their account. Can you get it out?

Usually, and the first step is always the same. Get admin rights on everything it runs on, which is the Lovable project, the code repository, the database and the domain. Code can be exported or transferred, and a Supabase project can be moved to another organization. Where the account holder won't cooperate it gets harder but rarely impossible, because whoever controls the domain and the data can rebuild around them.

Can we keep prototyping in Lovable afterwards?

Yes, for new ideas. The production system lives in your own repository and accounts, and changes to it go through review and automated checks before they reach your users. Try the next screen wherever is fastest, then bring it into the real system the same careful way.

What does it cost?

It's scoped after we've looked at the code, so there's no standard figure. What moves it is how many features and workflows it covers, how many systems it talks to, how many records have to come across, and what the security review turns up. You get a written scope naming every piece of work before anything is signed.

Who maintains it afterwards?

Whoever you choose. The code is written and documented so any capable developer can pick it up, and every account it runs on is in your company's name with us invited in as administrators you can remove. An optional support plan is there if you want us to stay close. Nothing about the setup ties you to us.

What do you need from us to start?

Viewer rights in Lovable and on the code repository, a list of who uses it and for what, and twenty minutes with whoever knows which parts the company depends on. From that we can tell you what you have, what's at risk, and what the move involves.

Is vibe coding secure?

It can be, but not by default. Vibe coded apps tend to share the same security vulnerabilities, such as missing access rules, hardcoded secrets and default credentials, because the AI models repeat the same patterns. A security scan plus a human review of access controls, secrets and server functions closes most of them before real users arrive.

Does the security scan in Lovable make an app secure?

No scanner can, and Lovable says so. Its checks catch common problems such as tables without per-row rules, exposed keys and vulnerable dependencies, and they label each finding Critical, Warning or Info. Lovable's docs say the checks cannot guarantee an app is secure or replace a full security review, and that you are still responsible for your app's security.

What is your Lovable app doing for the business?

Book a strategy call, or send a short note about the app, who uses it, and what worries you about it.

No newsletter, no drip sequence. One reply from a person.