Quick Setup Guide

Get your SaaS project up and running in minutes with these simple steps.

Clone and Install

Get started by cloning the repository and installing dependencies:

git clone {url} my-saas-app
cd my-saas-app
pnpm install

Environment Setup

Create a .env file in the root directory with the following variables:

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# Stripe Configuration
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your-publishable-key
STRIPE_SECRET_KEY=your-secret-key
STRIPE_WEBHOOK_SECRET=your-webhook-secret
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_COMPANY_NAME="Your Company"
NEXT_PUBLIC_CONTACT_EMAIL=support@example.com
# Optional: Analytics & Monitoring
NEXT_PUBLIC_POSTHOG_KEY=your-posthog-key
NEXT_PUBLIC_POSTHOG_HOST=your-posthog-host
NEXT_PUBLIC_SENTRY_DSN=your-sentry-dsn

Database Setup

Your Supabase project comes with a pre-configured schema in the supabase/seed.sql file. This includes:

  • Core tables (users, customers, products, prices)
  • Row Level Security (RLS) policies
  • Default products and pricing tiers

To set up your database, run the SQL commands from the seed.sql file in your Supabase SQL Editor:

  1. Open your Supabase project dashboard
  2. Navigate to the SQL Editor
  3. Copy the contents of supabase/seed.sql
  4. Paste and execute the SQL commands

Start Development

Run the development server:

pnpm dev

Your app should now be running at http://localhost:3000

Next Steps