Skip to main content
Many vibe-coded apps start with Firebase because it’s easy to set up. Supabase gives you the same ease-of-use but on a PostgreSQL backend you can query with SQL, with Row Level Security that’s more transparent, and without vendor lock-in. This guide covers migrating Firestore (NoSQL) to Supabase (PostgreSQL) and Firebase Auth to Supabase Auth.
This is a data migration — it requires changes to your app’s code alongside the data move. Budget time for both the migration and testing.

What this guide covers

  • Exporting data from Firestore
  • Designing a PostgreSQL schema for your Firestore collections
  • Migrating data with the Supabase import tool
  • Swapping Firebase Auth for Supabase Auth
  • Updating your frontend code

Step 1 — Export Firestore data

In Firebase Console:
Or use the firestore-export-import npm package for JSON output:

Step 2 — Design your Supabase schema

Firestore is document-based; Supabase is relational. You’ll need to map collections to tables. Example Firestore structure:
Equivalent Supabase schema:
Run this schema in the Supabase SQL Editor.

Step 3 — Import your data

Convert your Firestore JSON export to CSV or SQL insert statements, then import to Supabase:
Then import in Supabase Dashboard → Table Editor → Import CSV.

Step 4 — Migrate Firebase Auth users

Firebase Auth users can’t be transferred directly, but Supabase has a Firebase Auth migration guide:
  1. Export Firebase Auth users:
  2. Use the Supabase Firebase migration script to import users with their UIDs preserved (so existing user references in your data stay valid).

Step 5 — Update your frontend code

Replace Firebase SDK calls with Supabase equivalents:

Step 6 — Deploy with Nometria

Once your code is updated and tested locally against Supabase:
  1. Connect your repo to Nometria via GitHub
  2. Add your Supabase credentials as environment variables
  3. Deploy

Deploy to AWS

How Nometria provisions your production infrastructure.

Post-migration checklist

  • All Firestore collections mapped to Supabase tables
  • Data imported and verified (row counts match)
  • Firebase Auth users migrated with UIDs preserved
  • Frontend code updated to use Supabase SDK
  • RLS policies set correctly
  • App tested end-to-end on Supabase
  • Firebase project billing paused or deleted