Skip to main content

What Happened

Traceo started on Supabase — auth, database, and everything bundled together. When the team pulled auth into BetterAuth (Block 3), Supabase went from “platform” to “hosted PostgreSQL with extra steps.” The database was the only thing keeping it in the stack. Block 7 completed the migration by replacing the Supabase Terraform module with a Neon module. The result is a cleaner, more capable database layer that costs less and integrates better with the Railway + Vercel deployment target.

Why This Matters

Supabase bundles its value into the auth + database combination. Once you extract auth, you’re paying for:
  • A PostgreSQL host with a dashboard
  • A pooler (PgBouncer)
  • API keys and JWT secrets you no longer use
Neon gives you the same PostgreSQL + pooler combination plus database branching — the ability to create an instant, copy-on-write clone of your production database for migrations. This makes zero-downtime schema changes achievable without a separate migration environment.

The Two-Phase Migration

Auth migrations should be treated as two-phase work: Phase 1 (Block 3): App code migrated — auth calls, JWT handling, sessions. Supabase still holds the database. Phase 2 (Block 7): Infrastructure migrated — Terraform, environment configs, documentation. Neon replaces Supabase for database hosting. The gap between the phases is acceptable but should be tracked. An infra layer that describes a different system than the one running is technical debt that compounds with every new team member.

Decision Principle

If your Supabase usage is 90%+ database (not auth, not storage, not realtime), Neon is probably a better fit. The migration cost is one Terraform module swap.