Next Starter Logo

Get Started

Clone, configure, and run your dev server in under 5 minutes.

Watch the walkthrough video above for a full demo of the setup process, or follow the steps below.

Prerequisites

1. Clone and Install

git clone <your-repo-url> my-app
cd my-app
pnpm install

2. Set Up Environment

cp .env.example .env

Most defaults in .env.example work for local development. You only need to fill in a few values to get running.

Generate the auth secret

pnpm dlx @better-auth/cli secret

Paste the output into BETTER_AUTH_SECRET in your .env file.

Add Google OAuth keys

Go to the Google Cloud Console, create an OAuth 2.0 client, and paste the values:

GOOGLE_CLIENT_ID="your-client-id"
GOOGLE_CLIENT_SECRET="your-client-secret"

Minimum required config

The database URL, app URLs, and other defaults are pre-configured for local development. Configure the remaining services later:

ServiceWhat it powersGuide
StripeSubscription billingBilling
SMTP2GoTransactional emailEmail
Cloudflare R2File uploads and avatarsFile Uploads
reCAPTCHA v3Bot protection (optional)reCAPTCHA

Each service has a dedicated guide with a video walkthrough.

3. Start the Database

docker-compose up -d

Starts PostgreSQL on port 5432 with credentials matching the default DATABASE_URL.

4. Run Migrations

pnpm prisma migrate dev

Creates the user, session, account, verification, and subscription tables.

To reset the database at any time:

docker-compose down -v && docker-compose up -d && pnpm prisma migrate dev

5. Start the Dev Server

pnpm dev

Open http://localhost:3000.

What You Should See

RoutePage
/Marketing landing page
/auth/registerRegistration
/auth/sign-inSign in
/dashboardUser dashboard (requires sign in)

Create an account at /auth/register. To make yourself an admin, update the role field in the user table to "admin".

Next Steps

On this page