Complete Setup Guide

SaaS Starter Kit Setup

Follow this comprehensive guide to set up your SaaS application from scratch to production-ready.

Prerequisites

Required

Node.js 18+ installed
PostgreSQL database (local or cloud)
Git for version control

Optional (for full features)

Email provider account (Resend, etc.)
Stripe account for billing
OAuth app credentials (Google, GitHub)
Guided Setup Wizard
The easiest way to get started. Our wizard handles everything automatically.

1Clone Repository

git clone https://github.com/Abellybaba/saas-better-auth-nextjs-polar-starterkit.git my-saas-app cd my-saas-app yarn install

2Basic Environment Setup

Create a basic .env file with your database URL:

# Copy the example file cp .env.example .env # Edit .env and add your database URL POSTGRES_DATABASE_URL="postgresql://username:password@localhost:5432/your_database" BETTER_AUTH_SECRET="your-32-character-random-string" BETTER_AUTH_URL="http://localhost:3000"

3Launch Setup Wizard

yarn dev # Navigate to http://localhost:3000/setup
The setup wizard will guide you through database setup, admin account creation, and email configuration with a beautiful step-by-step interface.

Setup Wizard Steps

Database Setup

Verify connection, run migrations, seed initial data

Admin Account

Create your first admin user with secure credentials

Email Configuration

Choose provider, configure settings, enable analytics

Complete Setup

Review configuration and access your SaaS dashboard

Start Setup Wizard
Database Setup Options

Local PostgreSQL Installation

macOS (Homebrew)

brew install postgresql brew services start postgresql createdb my_saas_app

Ubuntu/Debian

sudo apt-get install postgresql postgresql-contrib sudo -u postgres createdb my_saas_app
Next Steps After Setup

Configure Email System

Set up email providers and templates

Set Up Billing

Configure Stripe for subscriptions

Customize Branding

Update colors, logos, and app name

Deploy to Production

Deploy to Vercel, Railway, or Docker