docs·How to use Migrare

Documentation

Everything you need to know about using Migrare - from the web tool to the CLI to finishing your Supabase migration.

01
Export from Lovable
Download your project as a ZIP from Lovable's export menu.
02
Upload or drop
Drop the ZIP into migrare.creadev.org/app, or use the CLI with a local path.
03
Review scan report
Read the lock-in signals. Note which files have issues and what kind.
04
Run migration
Click migrate to apply transforms. Download the result ZIP.
05
Deploy
Unzip into your own repo. Set your Supabase env vars. Deploy anywhere.

Install once, run anywhere. The CLI processes everything locally - your code never leaves your machine.

npx migrare

Launch the interactive CLI wizard. It guides you through scanning a project and applying transforms step by step.

npx migrare scan ./my-app

Scan a local directory or zip file. Outputs a detailed lock-in report to the terminal.

npx migrare migrate ./my-app -o ./output

Run the full migration pipeline. Writes transformed files to ./output. Use --dry-run to preview without writing.

npx migrare ui

Start the local web interface at localhost:4242. Use this instead of the CLI for a visual migration workflow.

Migrare moves your hardcoded Supabase credentials to environment variables. Here's how to complete the setup in your new project.

01Get your Supabase credentials

Go to your Supabase dashboard → your project → Settings → API. Copy the Project URL and the anon public key (not the service_role key).

02Create .env file

In your migrated project root, create a .env file with VITE_SUPABASE_URL=https://your-project.supabase.co and VITE_SUPABASE_ANON_KEY=your-anon-key.

03Add .env to gitignore

Make sure .env is in your .gitignore so credentials aren't committed. The migrated project includes a .env.example with placeholder names.

04Run locally

Run npm install && npm run dev. Your app should connect to Supabase using the env vars. If you see auth errors, check your URL and key are correct.

05Deploy anywhere

Set the same environment variables in your deployment platform (Vercel, Netlify, Cloudflare Pages, your own server). Your code is now portable.

# Supabase credentials
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

# Optional: your own custom env vars
VITE_API_DOMAIN=https://api.yourdomain.com

Make sure .env is in your .gitignore - never commit credentials.

Connect your GitHub account to scan repos directly from migrare. You'll need a GitHub OAuth App and your Client Secret deployed to Cloudflare.

01Create a GitHub OAuth App

Go to github.com/settings/developers → OAuth Apps → New OAuth App. Set Homepage URL to https://migrare.creadev.org and Authorization callback URL to https://migrare.creadev.org/oauth-callback.

02Get your Client ID

Copy the Client ID from your OAuth App settings. It's used in the web UI code.

03Generate a Client Secret

In your OAuth App settings, generate a new client secret. Copy it immediately - you won't see it again.

04Add secret to Cloudflare

In your migrare Cloudflare Pages project → Settings → Variables, add MIGRARE_GITHUB_CLIENT_SECRET with your secret value. Click Save deployment.

05Connect in Migrare

Go to migrare.creadev.org/app → click GitHub → click Connect. Authorize on GitHub and you'll be redirected back with an authenticated session.

What does Migrare actually do?

Migrare scans your exported Lovable project for vendor lock-in patterns - proprietary build tooling, hardcoded credentials, platform-specific env vars, and auth coupling. It then applies surgical transforms to remove or fix these issues, giving you a clean, portable codebase you can self-host.

Is my code safe?

Yes. Migrare never touches your original repo. The web tool processes everything in memory on Cloudflare's edge - nothing is stored, logged, or persisted. For extra privacy, run the CLI locally where your code never leaves your machine.

What platforms are supported?

Lovable, Bolt.new, Replit, and v0 (Vercel) are fully supported. Base44 support is planned. The scanner framework is extensible so new platforms can be added as plugins.

Do I need an account?

No. Migrare is MIT-licensed open source. No auth, no signup, no data collection. Run it locally via CLI or use the hosted tool anonymously.

What if the scan finds errors?

The scan report lists every lock-in signal by file, line, severity, and suggested fix. Review the report before migrating. Some issues require manual review - Migrare will tell you when a transform can't be automated.

How do I finish the migration with Supabase?

After running Migrare, your Supabase credentials are moved to environment variables. Create a .env file in your new project with your Supabase URL and anon key from your Lovable project's Supabase dashboard. The migrated code reads from VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.