Skip to main content

The Gateway Drug

Convert your Lovable app to Next.js

A smart CLI tool that automatically converts your React Router applications to Next.js 14+ using the new App Router. Escape Lovable’s ecosystem and own your code.

What You’re Buying

Not a service. A tool. You pay once, you own the conversion. Convert FROM Lovable TO Next.js. No monthly fees, no vendor lock-in.

What Exactly Gets Converted

React Router → Next.js

  • useNavigate()useRouter()
  • <Link to=""><Link href="">
  • useLocation()usePathname() + useSearchParams()
  • useParams() → Next.js useParams()

React Hooks & State

  • useState, useEffect, custom hooks preserved
  • Context providers maintained
  • Automatic ‘use client’ directive detection

Styling Systems

  • Tailwind CSS classes preserved
  • CSS Modules support
  • Styled-components detection

Components

  • Functional components converted
  • Props interfaces maintained
  • TypeScript types preserved

What Breaks

These require manual intervention after conversion
Lovable injects proprietary components that don’t exist outside their platform:
  • Custom UI libraries with Lovable-specific props
  • Pre-built authentication components
  • Managed form components
Fix: Replace with standard React components or shadcn/ui
Lovable apps often have hardcoded references to their managed APIs:
  • /api/lovable/* endpoints
  • Internal service URLs
  • Managed auth endpoints
Fix: Update to your own API endpoints or Supabase
Lovable-specific env vars won’t work:
  • VITE_LOVABLE_* variables
  • Managed database connection strings
  • Platform-specific config
Fix: Create your own .env.local with correct values

The 1-Credit Escape

1

Install the CLI

2

Test for free

Single file conversions are free. No account needed.
3

Convert your files

Each file consumes 1 conversion credit.
4

Full project migration

Full migrations require authentication and 1 migration credit.

When to Use CLI vs Cloud Migration

Use when:
  • You just want the code
  • You’re fine staying on Lovable’s backend for now
  • You have your own database solution
  • You want to test the conversion first
What you get:
  • Next.js App Router codebase
  • React Router converted to Next.js navigation
  • TypeScript preserved
What stays the same:
  • Database (still on Lovable’s Supabase)
  • Auth (still using Lovable’s managed auth)
  • Storage (still on their buckets)

Real-World Example

Quick Command Reference

Next Steps

Install CLI

Get the tool installed in 2 minutes

Quick Start

Convert your first file

Full Migration

Migrate an entire project
Need to migrate your backend too? Check out Cloud Migration for the complete escape plan.