Overview
Supabase provides the authentication, database, and serverless functions infrastructure for your subscription application. This guide walks you through creating a new Supabase project and obtaining the necessary credentials.Create a Supabase Project
Sign up or log in to Supabase
Go to Supabase and create an account or log in to your existing account.
Create a new project
Click on New Project and fill in the following details:
- Project name: Choose a descriptive name for your subscription app
- Database password: Create a strong password (save this - you’ll need it later)
- Region: Select the region closest to your users
- Pricing plan: Choose the Free tier to start
Project provisioning typically takes 2-3 minutes. Wait for the project status to show as “Active” before proceeding.
Get your API credentials
Once your project is active, navigate to Settings → API.Copy the following values - you’ll need them for your
.env.local file:- Project URL: This is your
NEXT_PUBLIC_SUPABASE_URL - Anon/Public Key: This is your
NEXT_PUBLIC_SUPABASE_ANON_KEY - Service Role Key: This is your
SUPABASE_SERVICE_ROLE_KEY(used for webhook functions)
Get your database connection string
Navigate to Settings → Database.Scroll down to the Connection String section and select the URI tab.Copy the connection string and replace
[YOUR-PASSWORD] with the database password you created in Step 2.This is your DATABASE_URL:Environment Variables
Add these values to your.env.local file:
Next Steps
Google OAuth
Configure Google authentication for user sign-in
Database Setup
Set up your database schema with Drizzle
