Database Setup

NeoSaaS uses Supabase as its database solution.

Before running the project, you need to ensure your database is properly configured.

Configuring database

1
Go to your Supabase Dashboard
https://supabase.com/dashboard
2
Navigate to SQL Editor

This is where you can run SQL scripts to create tables, functions, and more.

3
Run the SQL file

The file provided in the /supabase/migrations/001_create_tables.sql path.

This file includes the full schema for NeoSaaS — tables for users, subscriptions, customers, and other core features. Once executed, your database will be ready to store user accounts, subscriptions, and product data.

4
Add Supabase keys to your `.env` file

Go to Supabase → Settings → API Keys to get your anon and service_role keys. Navigate to Supabase → Settings → Data API to find your supabase_url.

.env
 # Change this lines with your actual keys

# Your Supabase keys
NEXT_PUBLIC_SUPABASE_URL="your_supabase_url"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your_supabase_anon_key"

SUPABASE_URL="your_supabae_url"
SUPABASE_SERVICE_ROLE_KEY="your_supabase_service_role_key"

# Your website url without "/" in the end
NEXT_PUBLIC_APP_URL="http://localhost:3000"

# Your Stripe keys. Don't forget to use live keys on production
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."

Congrats!:

That's it! Your database connection is ready!