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.jsuseParams()
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
Lovable's Magic Components
Lovable's Magic Components
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
Hardcoded API Calls
Hardcoded API Calls
Lovable apps often have hardcoded references to their managed APIs:
/api/lovable/*endpoints- Internal service URLs
- Managed auth endpoints
Environment Variables
Environment Variables
Lovable-specific env vars won’t work:
VITE_LOVABLE_*variables- Managed database connection strings
- Platform-specific config
.env.local with correct valuesThe 1-Credit Escape
When to Use CLI vs Cloud Migration
- CLI Only (1 Credit)
- CLI + Cloud Migration (3 Credits)
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
- Next.js App Router codebase
- React Router converted to Next.js navigation
- TypeScript preserved
- Database (still on Lovable’s Supabase)
- Auth (still using Lovable’s managed auth)
- Storage (still on their buckets)
Real-World Example
Quick Command Reference
| Task | Command | Credits |
|---|---|---|
| Test single file | next-lovable convert file.tsx --dry-run | Free |
| Convert file | next-lovable convert file.tsx | 1 per file |
| Preview full migration | next-lovable migrate ./app --dry-run | Shows estimate |
| Full migration | next-lovable migrate ./app ./next-app | 1 credit |
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.
