Quick Start

I have designed this guide to walk you through every step of the setup process. From preparing your local machine to deploying your first admin user, this page covers the essential foundation of SaaS Box.

Prerequisites

Ensure your machine is equipped with these core tools before you begin.

v20.0+Node.js

The fundamental runtime required to execute the Next.js 16 server and build scripts.

RecommendedPNPM

I use PNPM for workspace management. To install it globally, run:

npm install -g pnpm
StandardGit

Essential for version control and pulling future updates from the private SaaS Box repository.

1. Access & Installation

SaaS Box is a premium boilerplate. You can only clone the repository after having purchased a license via Gumroad . Once you have access to the private repository, clone the project and install the dependencies.

Terminal
# Clone your private repository
git clone https://github.com/your-username/saas-box.git
# Enter the project directory
cd saas-box
# Install dependencies using PNPM
pnpm install

2. Configure Environment

I have included an .env.example file containing all the necessary keys for Neon, Polar, Better-Auth, and Cloudflare R2.

cp .env.example .env

Initial Setup Checklist

  • Get your DATABASE_URL from your Neon Tech project dashboard.
  • Generate a unique BETTER_AUTH_SECRET by running npx @better-auth/cli secret.
  • Fill in your POLAR_ACCESS_TOKEN from your Polar.sh settings to enable billing.

3. Database Setup (Drizzle)

I use Drizzle ORM for its speed and type safety. To get your database ready, you need to sync the schema. I recommend the "push" method for rapid development.

# Sync your TypeScript schema with your Neon database
pnpm drizzle-kit push

Managing Your Data

Run pnpm drizzle-kit studio at any time to open a local GUI and browse or edit your database rows directly.

4. Start the Application

Everything is set. You can now boot the Next.js 16 development server.

pnpm dev
Local URL

Access your app at http://localhost:3000.

Auth Portal

Navigate to /auth to register your first user.

5. Gaining Admin Rights

I have included a dedicated Admin Dashboard to manage users and view analytics. Because this is your first run, you need to elevate your account role manually.

STEP 1

Create a new account via the /auth page in your browser.

STEP 2

In your terminal, run pnpm drizzle-kit studio.

STEP 3

Locate your record in the user table and change your role from user to admin.

Once saved, refresh the app. The Admin Dashboard will be accessible in your sidebar.

Deep Dives

Now that you are up and running, I recommend exploring these sections to fully master your SaaS.