• Home
  • Guides
  • From Lovable or Bolt Prototype to Production: What Has to Change

From Lovable or Bolt Prototype to Production: What Has to Change

Your AI-built prototype works. Here is what has to change before real users and payments: auth, database rules, secrets, testing, monitoring and backups.

AI app builders have changed how products start. A founder can describe an idea in the morning and click through a working app by the afternoon. That is real progress, and for testing an idea it is often the right way to begin.

The trouble starts when the prototype gets traction. Real users sign up, someone asks to pay, and a customer's data now sits in a database. A demo only has to work when you show it. A production app has to keep working when people misuse it, when traffic spikes, and when something breaks at 2 a.m.

This guide covers what tools like Lovable, Bolt, v0, Replit and Cursor (now Grok Build) are good at, the specific gaps between a generated prototype and a production app, a checklist you can work through, and how to decide whether to keep the code or rebuild parts of it.

What AI app builders are good at

Each tool describes itself a little differently. Based on their own sites and docs, as of December 2026:

  • Lovable builds full apps from chat. By default it uses its own built-in backend, which runs on Supabase's open-source foundation (source), or it can use a Supabase project you own as the backend instead, covering a Postgres database, sign-up and login through Supabase Auth, file storage and serverless Edge Functions (source). It also offers two-way sync with GitHub: changes made in Lovable sync to your repository, and changes pushed to the active branch sync back (source). Its FAQ says the apps, code and content you create are yours (source).
  • Bolt lists hosting with custom domains, databases, and user management and authentication through Bolt Cloud (source).
  • v0 describes itself as an AI agent that helps anyone create real code and full-stack apps, with one-click deployment on Vercel or the option to open a pull request for review (source).
  • Replit Agent builds apps, websites and agents through chat and connects to Replit's built-in database and user authentication (source).
  • Cursor, now renamed Grok Build after its acquisition by SpaceX, is aimed at developers rather than non-technical founders. It is a desktop coding app (IDE) with AI agent sessions, and the rename announcement says the core app experience is unchanged (source).

What they share: they are fast at screens, flows and standard features, and they remove most of the setup work. That makes them very good for clickable prototypes, internal tools, investor demos and early user tests.

What they cannot do for you is decide what "safe enough" means for your users and your data. That part is still a human job, and the vendors say so. Lovable's own security page states: "You are still responsible for your app's security" (source).

Where the gap to production usually is

1. Authentication and access control

Most generated apps have login. Fewer have authorization: rules about what each logged-in user is allowed to see and change. The usual problems:

  • Pages hidden in the UI but data still reachable through the API.
  • No roles, or roles checked only in the browser.
  • Admin features protected by a hidden URL rather than a permission check.

The test is simple: log in as user A and try to read or edit user B's records by changing an ID in a request. If it works, the app is not ready.

2. Database security (Supabase Row Level Security)

Many AI-built apps talk to Supabase directly from the browser. That is a supported pattern, but it moves your security into the database. Supabase's guidance is to "Enable RLS on every table in an exposed schema" (source). Its publishable (anon) key is safe to put in a web page only because "it only reaches what Row Level Security allows" (source).

So the real question is not "is RLS on?" but "are the policies correct?" A policy that lets any authenticated user read every row is technically RLS, and still a leak.

This is not a theoretical risk. CVE-2025-48757 describes "an insufficient database Row-Level Security policy in Lovable through 2025-04-15" that allowed unauthenticated attackers to read or write database tables of generated sites; the NVD entry notes that Lovable disputes it, on the grounds that each customer is responsible for protecting their own app's data (source). The researcher's write-up says a scan of 1,645 projects from Lovable's showcase found 303 vulnerable endpoints across 170 projects, and that it only checked homepages, not logged-in areas (source). Lovable has since added security checks that flag issues such as tables without per-row rules, while stating the checks "can't guarantee that your app is secure or replace a full security review" (source).

Whichever side of the dispute you take, the lesson is the same: someone has to read every policy against how the app is actually used.

3. Secrets handling

Part of every web app runs in the visitor's browser, so anything bundled into that code is public. Lovable's docs say API keys and other secrets must never go into that code (source). Lovable apps created before 13 May 2026 use React and Vite, while newer ones use TanStack Start (source). Either way, watch the VITE_ prefix: Vite warns that these variables are bundled into client-side code and "should not contain sensitive information such as API keys" (source), and TanStack Start's docs say sensitive variables should be server-only, with no VITE_ prefix (source).

Supabase's secret (service_role) key is the one to watch most closely: it bypasses every Row Level Security policy, and Supabase says never to put it in a browser, a shipped app or source control (source). Search the repository and its history for keys, move them to server-side functions or a secrets store, and rotate anything that was ever exposed.

4. Input validation

Generated forms often validate in the browser and nowhere else. OWASP's guidance is to "Validate on the server even when the browser checks the same fields", because client-side validation can be bypassed (source). Check lengths, types and allowed values on the server or in database constraints, and treat file uploads with extra care.

5. Payments and Stripe webhooks

A checkout button is easy. Reliable payment handling is not. The production version needs a webhook handler that follows Stripe's rules:

  • Verify the signature on every event using the Stripe-Signature header and your signing secret. Without verification, an attacker could send fake events to trigger actions like fulfilling orders or granting access (source).
  • Handle duplicates. Endpoints "might occasionally receive the same event more than once", so log processed event IDs (source).
  • Do not depend on order. Stripe does not guarantee events arrive in the order they were generated (source).
  • Return a 2xx quickly, before slow logic, or the delivery may time out and be retried (source).

Most important: payment status should only ever be written by your server after a verified event, never by the browser. The CVE researcher reports inserting a record with payment status set to paid on a vulnerable site, bypassing Stripe (source).

6. Testing

Prototypes are tested by clicking around. Production needs tests that run on every change, so a fix in one place does not quietly break another. You do not need full coverage on day one. Start with:

  • The sign-up, login and payment flows end to end.
  • Access control tests: user A cannot see user B's data.
  • Tests for the business rules that would cost you money if they broke.

7. Error monitoring and logging

If users hit errors today, would you know? Add error tracking for both the browser and the server, structured logs for important actions, and alerts for failures in payments and sign-ups. This is usually a day of work and saves weeks of guessing later.

8. Performance

Generated code often fetches more data than it needs, loads whole tables into the browser, or makes one request per row. It works with ten test records and slows down with ten thousand. Add pagination, database indexes for the queries you actually run, and caching where it makes sense, then test with realistic data volumes.

9. Backups and recovery

Know exactly what happens if data is deleted by mistake. On Supabase, Pro, Team and Enterprise projects are backed up daily, with 7, 14 and up to 30 days of backups available respectively, and point-in-time recovery is a paid add-on (source). Free-plan projects are advised to export their data regularly (source). Then actually test a restore. A backup you have never restored is a hope, not a plan.

10. Code structure

AI builders tend to grow apps by adding code, not by reorganising it. After a few hundred prompts you can end up with very large components, duplicated logic and business rules scattered through the UI. Production code needs clear separation between screens, business logic and data access, consistent naming, and a structure a new developer can follow.

11. Ownership of the code and accounts

Make sure the business, not one person's personal login, owns everything: the code repository, the database project, hosting, domains, Stripe, and email services. Lovable, for example, can sync to a repository in your own GitHub account or organisation, private by default (source), and paid plans can download the whole project as a zip (source). Its FAQ also notes that a database export does not include stored files, Edge Function code or secrets (source), so plan those separately if you ever move.

Production-readiness checklist

Use this as a working list. Anything marked "No" before launch is a known risk you are choosing to accept.

AreaWhat "ready" looks likeReady?
AuthorizationEvery read and write is checked on the server or by database rules, not just hidden in the UI
Row Level SecurityRLS enabled on every exposed table, each policy reviewed against real use cases
SecretsNo secret keys in client code or git history; exposed keys rotated
Input validationServer-side checks on all inputs and uploads
PaymentsWebhook signatures verified, duplicates handled, payment status set only by the server
TestingAutomated tests for sign-up, login, payments and access control
MonitoringError tracking and alerts for front end and back end
PerformancePagination and indexes in place; tested with realistic data
BackupsAutomated backups confirmed and a restore tested
Code structureClear separation of UI, logic and data; no giant files
OwnershipRepository, database, hosting, domain and payment accounts owned by the business
EnvironmentsSeparate development and production databases and keys

Keep or rebuild?

This is the question most founders ask, and the honest answer is usually "keep most of it, rebuild some of it".

Keep the code if:

  • The data model makes sense and matches how the business works.
  • The code is in a repository you control and builds cleanly outside the AI tool.
  • The gaps are the fixable kind: missing policies, tests, monitoring and validation.

Rebuild parts of it if:

  • Important business logic, such as pricing or permissions, lives only in the browser.
  • The data model is wrong, so every new feature needs a workaround.
  • Changing one screen regularly breaks another, and nobody can explain why.
  • You need something the platform does not support well, such as complex background jobs or strict compliance requirements.

A common middle path: keep the UI, which is often the best part of a generated app, and rewrite or harden the backend, database rules and payment handling. Start with a short code and security review so the decision is based on what is actually in the repository, not on how the demo feels.

Next steps

If your prototype is getting real users and you want it reviewed and hardened, Pine Technologies can help in two ways:

  • Prototype to production: we review your AI-built app, fix the security and reliability gaps, and get it ready for launch. Projects start from $10,000, and dedicated teams from $5,000 a month.
  • Hire full-stack developers: add a pre-vetted full-stack developer to your team for $1,500 to $3,500 a month, all-in. You get a shortlist within 48 hours, a free test task, a 2-week free replacement guarantee and month-to-month terms with no long-term contract.

If you are still at the idea stage and want the MVP built properly from the start, see our MVP development service.

Frequently Asked Questions

Can a Lovable or Bolt app go to production as it is?

Sometimes, but rarely without changes. The generated app usually proves the idea well, but before real users, personal data or payments it needs a review of access control, database rules, secrets, input validation, payment handling, testing, error monitoring and backups. Lovable's own security documentation says its checks cannot guarantee an app is secure or replace a full security review.

What is the most common security gap in AI-built apps?

Database access rules. Apps that talk to Supabase straight from the browser rely on Row Level Security to decide who can read and write each row. If a table has no policy, or a policy that is too loose, anyone with the app's public key can reach that data. A 2025 CVE, which Lovable disputes, described exactly this problem in Lovable-generated sites.

Should I keep my AI-generated code or rebuild it?

Keep it if the data model is sound, the code is in a repository you control, and the problems are fixable gaps such as missing policies, tests and monitoring. Rebuild the affected parts if the data model is wrong, business logic lives only in the browser, or every change breaks something else. Most projects end up somewhere in between: keep the screens, harden or rewrite the backend.

How much does it cost to take an AI prototype to production?

It depends on how much has to change. With Pine Technologies, a dedicated full-stack developer costs $1,500 to $3,500 a month, a dedicated team starts at $5,000 a month, and fixed-scope projects start at $10,000. A short review of the codebase is the fastest way to know which of those you need.

Join Our Growing Team

We're looking for talented engineers, designers, and marketers who want to work on exciting global projects. Remote & onsite roles available.

Work with global clients
Remote-friendly culture
Career growth

Ready to make an impact?

Browse open positions and apply in under 2 minutes.

View Open Positions