Database

Pick your database and start with schemas/tables and safe migration workflows.

Last updated December 18, 2025

At a glance

What you get
  • Schema starter
  • Migrations workflow
  • Connection-string based config
You'll configure
  • DATABASE_URL
  • Provider-specific credentials
  • Migration commands

Quickstart

1
Set DATABASE_URL

Add your database connection string to .env.local (e.g., from Neon or Supabase dashboard).

2
Run migrations

Generate and apply schema changes with drizzle-kit (npx drizzle-kit generate && npx drizzle-kit push).

3
Restart the dev server

Restart npm run dev so the database connection is loaded.

4
Verify database connection

Sign up a test user and confirm auth/session data is stored correctly in the database.

Providers

Pick an option below. Each provider has a short guide so you can implement without digging through docs.

Neon Postgres
Available
Expand

Default in the current scaffold. Serverless Postgres + Drizzle ORM.

Supabase Postgres
Available
Expand

Managed Postgres with Supabase dashboard and tooling.

MongoDB
Coming soon
Expand

Document database option (planned) with Mongoose schemas/plugins.

Schema & migrations
Available
Expand

How to keep schema changes tracked and deployable.

Code

Copy/paste-friendly code blocks. Designed to get you working quickly without digging through long docs.

.env.local (DATABASE_URL)

Use Neon or Supabase Postgres connection strings.

DATABASE_URL="postgresql://postgres:YOUR_PASSWORD@db.yourproject.supabase.co:5432/postgres"
Run migrations (Drizzle)

Generate and apply schema changes.

$ npx drizzle-kit generate
$ npx drizzle-kit push