Why non-technical founders migrate
Three patterns show up in 2026 migration conversations:
- Investor diligence.Lead investors at Series A ask “can we see this running off Lovable?” There is no good answer except “yes, here's the repo.” See the Replit Agent case study for the same dynamic on another platform.
- Price changes.Credit billing that drifts, surcharges, or a platform pricing announcement that changes the app's unit economics. The Bluefinch — Base44 agency escape to Next.js is a worked example at agency scale.
- Hiring. The first engineer you hire wants a repo, a test suite, and standard tooling. Migration is the prerequisite for hiring senior Next.js developers who stay.
Should you migrate at all?
Migration is not automatically the right move, and doing it early costs less than doing it late only if you were going to do it. Read the row that describes you rather than the column you like.
| Signal | Stay on Lovable | Migrate to Next.js |
|---|---|---|
| Codebase size | Small enough that you can still describe the whole app in one prompt | Large enough that changes have started regressing each other |
| Credit spend | Predictable, and below what a developer’s time would cost | Concentrated in debug loops on one stubborn feature |
| Team | Founder only, no engineering hire planned | You are hiring engineers who expect a repo, a test suite, and a PR flow |
| Stage | Prototype, validating whether anyone wants it | Post-revenue, or in diligence for a round |
| Users | No paying users yet | Paying users whose sessions and data must survive the move |
Three signals on the right is a migration. One is not. The expensive mistake is migrating for the reason in the last row alone — paying users make the cutover harder, not more urgent.
The escape plan, end-to-end
The 4-week plan. Agency multi-app retainers scale the same structure across more weeks.
Week 0 — audit and architecture
- Export the Lovable project; clone it to a fresh Next.js repo on GitHub.
- Map every Lovable-specific dependency to a target (Supabase Auth, Stripe, Resend, Vercel Cron).
- Produce the architecture diagram, env var reference, and cutover plan.
- Provision Vercel, Supabase production + staging, domain in DNS provider.
Week 1 — data and auth
- Export Supabase schema to migrations (Supabase CLI), apply to staging.
- Write and test RLS policies on every table (pgTAP in CI).
- Stand up Supabase Auth or Clerk; design the re-verification email flow.
- Start dual-write from Lovable's Supabase to the new Supabase project.
Week 2 — integrations and deploy
- Rewire Stripe: server-side keys, signed webhook, idempotent handler, reconciliation cron.
- Wire Resend: SPF, DKIM, DMARC, transactional templates.
- Port every external integration (analytics, CRM, file storage).
- Vercel preview deploys; test every unhappy path.
Week 3 — cutover
- Final data sync: seven days of dual-write reviewed, any discrepancies resolved.
- Cutover window: schedule at the lowest-traffic time. Typical downtime: 5–15 minutes.
- DNS flip to Vercel. Re-verification emails sent to all active users.
- Monitor for 48 hours. Fix edge-case issues as they surface.
Week 4 — handoff
- Decommission Lovable deployment after a two-week overlap period.
- Handoff doc: architecture, env vars, runbooks, prioritised backlog.
- Transfer ownership of Vercel project, Supabase project, domain, Stripe webhook.
- Two weeks of post-cutover support begin; on-call windows documented.
Can an AI prompt convert a Lovable app to Next.js on its own?
A conversion prompt converts the components but not the four things that make the app work — which is why prompt-only conversions pass a build and fail at auth. The UI layer is the part a model is genuinely good at: Lovable generates React and Tailwind, Next.js consumes React and Tailwind, and the translation is mostly mechanical. Everything that made the running app a working product lives outside the components, in state the prompt cannot see. The step order that keeps the app working, with what a prompt can and can’t do at each step and the Lovable, Next.js and Supabase docs behind it, is on the convert a Lovable app to Next.js yourself checklist.
Which four subsystems does a conversion prompt reliably miss?
- Data and migrations.The schema exists in the database, not in the repo. A converted project inherits tables with no migration history, arbitrary IDs created through a dashboard, and no seed script — so the first environment you stand up after the conversion has no defensible way to reach the same shape.
- The URL map.Routing moves from the builder’s own conventions to Next.js file-system routes. The prompt will produce routes that work; it will not produce routes that match the ones Google has already indexed and users have already bookmarked, and nothing in the build will tell you they changed.
- Session handling. If the project stays on Supabase, Supabase keeps issuing and signing the tokens, so accounts survive. What the prompt misses is where the converted app reads them: Server Components and Route Handlers need a cookie-based client, which Supabase documents as
@supabase/ssr, and aproxy.tsthat refreshes expired tokens, or users are signed out when their token expires. Move to another auth provider instead and every session ends at cutover unless the migration plans a re-verification path in advance. - Webhook and OAuth redirect targets.Stripe webhook endpoints, OAuth authorised redirect URIs, and any scheduled jobs all point at the old host. These live in third-party dashboards, not in your codebase, so no amount of code conversion touches them — and each one fails only in production, on real money or real logins.
Notice what those four have in common: none of them is in the source the prompt reads. A conversion prompt is a code translator working from code, and all four failures live in database state, in search indexes, in session cookies, and in other companies’ dashboards.
What does the output look like when it has silently dropped RLS?
Exactly like success, which is the problem. Row-level security policies are database objects, not application code, so a converted repo that never mentions them still compiles, still runs, and still returns data. The tell is that it returns moredata than it should: a list endpoint that used to show a user their own rows now shows everyone’s, and because the UI renders a list either way, the screen looks populated rather than broken. Check it by querying as two different users and comparing row counts — not by reading the diff, where nothing about it appears.
What breaks first after a prompt-only conversion ships?
Auth, then billing, then the build — in that order, and the order is the useful part. The build is the thing the conversion was optimised to satisfy, so it passes first and stays passing. Auth breaks at the first login attempt, within minutes, because session validation is immediate and universal. Billing breaks later and more quietly: webhooks fire on Stripe’s schedule, not yours, so a subscription that fails to activate surfaces hours or days after cutover, by which time the deploy no longer looks like the suspect. Teams that plan for “the build will tell us” discover the inverse.
How do you tell a converted repo from a hand-ported one six months later?
Look at the history rather than the code. A converted repo has a shallow migration folder or none at all, commits clustered into one or two enormous “port” changesets, no redirect map, and environment variables that appear fully formed with no commit that introduced them. A hand-ported repo has migrations dated across the port window, a redirect table someone had to write by hand, and commits that show subsystems moving one at a time. The code can look identical; the history cannot be faked after the fact, which is why diligence reads it.
What actually breaks in the port
The component-level changes are small and repetitive, and they are the part most guides stop at. They matter less than the four subsystems above, but they are what fills the first two days.
- Environment variables. Vite exposes them through
import.meta.env; Next.js usesprocess.env, withNEXT_PUBLIC_marking anything the browser is allowed to see. The rename is mechanical; the prefix is a security decision, so read each one rather than sweeping. - Routing. React Router route definitions become App Router files and folders, and
<Link>comes fromnext/link. This is where URLs quietly change — map them deliberately. - Client boundaries. Every component that uses state, effects, or browser APIs needs an explicit
"use client"directive. Missing one fails at build; adding it everywhere works and throws away the reason to be on the App Router. - Supabase stays.The database does not move. Point the new app at the same project and every user, row, and OAuth link comes with it — which is also the moment to audit the RLS policies nobody has looked at since they were generated.
If the goal is to keep the ranking as well as the app, the redirect map is the artefact that decides it: every old URL either resolves to the same path or 301s to its replacement, and anything that does neither is a page you have chosen to lose. When you would rather not own this end-to-end, the fixed-fee Lovable to Next.js migration runs the port, the data move, and the cutover as one engagement.
The four decisions that matter most
| Decision | Default we recommend | When to deviate |
|---|---|---|
| Auth provider | Supabase Auth | Clerk if you need multi-tenant orgs out of the box |
| Cutover window | Saturday, 04:00 local time | Weekday if your users are B2B with weekday usage |
| Dual-write duration | 7 days | 14 days for regulated industries (fintech, healthtech) |
| Keep editing Lovable during migration | No — freeze at week 0 | Only critical bug fixes, mirrored manually |
What founders most commonly get wrong
- Trying to migrate and ship new features simultaneously. Freeze Lovable edits at week 0. Exceptions (critical bug fixes) must be mirrored to the new codebase the same day.
- Underestimating auth migration. Passwordless re-verification is the lowest-friction cutover pattern, but it requires email deliverability to be rock-solid by cutover day. Start email deliverability setup in week 0.
- Forgetting OAuth redirect URLs. Every OAuth provider (Google, GitHub, etc.) has a list of authorised redirect URIs. Update these in week 2 at the latest; changes can take up to an hour to propagate.
- Not running a reconciliation diff. The seven-day dual-write period is the safety net. Compare rows nightly; fix translation bugs before cutover.
What the migration does not include
- UI redesigns. We port the Lovable UI as-is. Redesign is a separate engagement.
- New features. Anything outside the current app scope is quoted separately.
- Long-term engineering staffing. Two weeks of post-cutover support are included; beyond that, move to Ongoing Maintenance or hire in-house.
How to start
Book the free rescue diagnostic. We'll look at the Lovable project on the call, confirm scope, and provide a written cutover plan and fixed-fee quote inside 24 hours. If you already know Platform Escape is the right scope, skip to the App Migration service page and start the engagement from there.