Skip to main content

Supabase Setup

Before we begin the migration, you need a Supabase project ready to receive your data. Here’s how to set it up.

Step 1: Create Your Supabase Account

1

Sign up at supabase.com

Go to supabase.com and create an account.Recommendation: Use the same email as your Lovable account for easier tracking.
2

Verify your account

Check your email and click the verification link.
3

Set up billing

Choose your plan:
  • Free Tier: Good for testing (500MB database, 1GB storage)
  • Pro ($25/month): Production-ready (8GB database, 100GB storage)
  • Team/Enterprise: Contact Supabase for larger needs

Step 2: Create a New Project

1

Click 'New Project'

From your Supabase dashboard, click the “New Project” button.
2

Configure your project

Organization: Your company or personal orgProject Name: Choose something descriptive
  • Good: myapp-production
  • Good: crm-migrated
  • Avoid: test, new-project
Database Password:
  • Generate a strong password
  • Save it in your password manager
  • You’ll need this for direct database access
Region:
  • Choose closest to your users
  • Consider data residency requirements
  • Common choices: US East (N. Virginia), EU (Frankfurt), Asia (Singapore)
3

Wait for provisioning

Supabase will create your project. This takes 2-3 minutes.You’ll see a loading screen—don’t close it.

Step 3: Gather Connection Information

Once your project is created, we need these details:

Project URL

Location: Project Settings → APIFormat: https://[project-ref].supabase.coExample: https://abc123def456.supabase.coWe need this for: API calls, storage access

Anon/Public Key

Location: Project Settings → API → Project API KeysFormat: eyJhbGciOiJIUzI1NiIs...We need this for: Client-side authentication

Service Role Key

Location: Project Settings → API → Project API Keys⚠️ Keep this secret! Never expose in client code.We need this for: Admin operations during migration

Database Password

You created this during project setup.We need this for: Direct PostgreSQL access
Share securely: Send these credentials via encrypted channel (1Password, secure email, or scheduled call). Never post in public channels.

Step 4: Configure Your Project

Enable Required Extensions

Go to Database → Extensions and enable these (if your app uses them):
  • uuid-ossp - UUID generation (most apps need this)
  • pgcrypto - Cryptographic functions
  • pg_trgm - Trigram matching for search
  • postgis - Geographic data
  • pgvector - Vector similarity search
  • pg_stat_statements - Query performance

Set Up Authentication Providers

If you use social login:
1

Go to Authentication → Providers

Enable the providers your app uses (Google, GitHub, Apple, etc.)
2

Configure OAuth Apps

For each provider:
  • Create OAuth app in provider console
  • Add callback URL: https://[project-ref].supabase.co/auth/v1/callback
  • Copy Client ID and Secret to Supabase
3

Test the flow

We’ll verify OAuth works during migration testing.

Configure Storage (Optional)

If you want specific storage settings:
1

Go to Storage → Policies

Default policies are created automatically, but you can customize.
2

Set up CORS (if needed)

For client-side uploads from specific domains.
3

Configure CDN

Supabase provides CDN by default. Contact them for custom domains.

Step 5: Prepare for Migration

  • Supabase account created
  • New project provisioned
  • Region selected (close to users)
  • Required extensions enabled
  • Auth providers configured (if using OAuth)
  • Service role key secured
  • Database password saved
  • Project URL documented

Security Checklist

Before sharing credentials with us:
1

Enable Row Level Security

We’ll set this up during migration, but verify it’s available.Go to Database → Tables and check that new tables will have RLS.
2

Review API Keys

  • Anon key: Safe for client-side code
  • Service role key: NEVER in client code, only server-side
3

Set up backup policy

Supabase automatically backs up Pro+ projects.Go to Database → Backups to verify schedule.
4

Enable MFA for your account

Protect your Supabase dashboard access.Go to Account Settings → Security.

What Happens Next

Once you’ve completed setup:
  1. Send us your credentials (securely)
  2. We’ll schedule the migration (usually within 48 hours)
  3. We’ll run a test migration on a subset of data
  4. You’ll review the results and approve
  5. We’ll execute the full migration
  6. You’ll update your app with new connection strings
  7. We’ll monitor for 48 hours to ensure stability

Post-Migration Connection Details

After migration, you’ll need to update your app with these values:
# Your new Supabase project details
NEXT_PUBLIC_SUPABASE_URL=https://[your-project-ref].supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGci...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGci...

# Direct database connection (if needed)
DATABASE_URL=postgresql://postgres:[password]@db.[project-ref].supabase.co:5432/postgres
Questions about setup? Contact us at support@nextlovable.com or check Supabase’s documentation.