Hypercube

Running on Supabase

Use a Supabase project as the application database.

Supabase works well as the application database. Best as a dedicated project: Hypercube creates its own hypercube schema on first boot, and the auth tables (user, session, account, verification) in public.

Setup

  1. Create a project on supabase.com.

  2. Open Connect and copy the Transaction Pooler connection string:

    postgresql://postgres.<project-ref>:<password>@aws-1-<region>.pooler.supabase.com:6543/postgres
  3. Set it as DATABASE_URL wherever the console runs — locally in apps/console/.env.local, or as an environment variable on your host.

An empty project is all it takes; migrations run on first boot.

Which connection string

Supabase offers three:

  • Transaction Pooler (*.pooler.supabase.com, port 6543) — use this. Many clients share a few backend connections, which is what serverless needs.
  • Session Pooler (port 5432) — every connected client holds a slot until it disconnects, capped at the pool's pool_size; concurrent serverless instances exhaust it (EMAXCONNSESSION). Fine for a single long-lived server.
  • Direct (db.<project-ref>.supabase.co) — IPv6-only, unreachable from many hosts and networks; connections fail with ENOTFOUND.

The same rules apply to Supabase databases you connect as dynamic resources.

On this page