Setup Supabase
Step-by-step guide to set up Supabase for CodeBaseHub
Create a Supabase Project
- Go to Supabase and sign in
- Click New Project and fill in the project details
- Create a strong password and save it (you'll need it for database credentials)
- Wait for the project to be created
Get Your Database Credentials
Once your project is created, you'll see the dashboard:

Step 1: Click Connect Button
In the top right of the dashboard, click the Connect button.
Step 2: Open ORMs Tab
A modal will open. Click on the ORMs tab.
Step 3: Select Drizzle
From the list, select Drizzle as your ORM.
Step 4: Copy Database URL
You'll see a connection string like this:
postgresql://postgres:[YOUR-PASSWORD]@db.xxxxxxxxxxxxx.supabase.co:5432/postgresReplace [YOUR-PASSWORD] with the password you created when generating the project.
Add to Your .env File
Copy the complete connection string and add it to your .env file in the server project:
DATABASE_URL=postgresql://postgres:your-actual-password@db.xxxxxxxxxxxxx.supabase.co:5432/postgres
DIRECT_URL=postgresql://postgres:your-actual-password@db.xxxxxxxxxxxxx.supabase.co:5432/postgresNext Steps
Once your database credentials are set up in apps/server/.env, run these commands in order:
pnpm db:pushThis pushes your database schema to Supabase.
pnpm db:generateThis generates TypeScript types from your database schema.
See the Installation Guide for more details.
Was this page helpful?