ShipKit.one
Database

Supabase

Connect Supabase PostgreSQL.

Overview

Supabase is a Postgres-based backend platform. shipkit can use its Postgres connection directly.

Quick start

1) Create a project

  1. Sign up on Supabase.
  2. Create a project in the Supabase dashboard.
  3. Generate and copy the database password.

2) Get the database URL

  1. Open your project and click Connect.
  2. Switch to ORMs → Drizzle.
  3. Copy the DATABASE_URL and replace [YOUR-PASSWORD].

Example:

postgresql://postgres.xxxxxx:your_password@aws-1-ap-northeast-1.pooler.supabase.com:6543/postgres

3) Test the connection (optional)

If you have psql installed:

psql "postgresql://postgres.xxxxxx:your_password@aws-1-ap-northeast-1.pooler.supabase.com:6543/postgres"

4) Configure environment variables

DATABASE_URL=your_supabase_database_url
DB_PROVIDER=supabase

5) Apply schema

pnpm db:push

Or use migrations:

pnpm db:generate
pnpm db:migrate

6) Manage data

Use the Supabase dashboard or run locally:

pnpm db:studio

Customize

Modify schema

Schema lives in src/lib/db/schema.ts. After changes, run migrations again.

Adjust connection logic

Connection logic is in src/lib/db/index.ts. Update it if you need custom pool settings.

References

On this page