Quickstart

From purchase → repo access → running locally.

Prerequisites

Before getting started, ensure you have:

  • Bun (recommended) and Node.js 18+
  • PostgreSQL (local or hosted)
  • Google Cloud project + OAuth credentials (primary sign-in)
  • Optional: Resend (magic links), Stripe/Polar (billing), Supabase Storage (file upload), OpenAI (AI chat)

1) Get the code

You will work in the tanstarter/ folder (that’s the starter kit).

2) Install and run

Clone the Repository

git clone https://github.com/your-org/your-starter-repo.git
cd your-starter-repo
cd tanstarter

Install Dependencies

bun install

Environment variables

Copy the example environment file and configure your variables:

cp .env.example .env

Minimum env to run auth + dashboard locally:

# App URLs
APP_URL=http://localhost:3000
VITE_APP_URL=http://localhost:3000

# Database
DATABASE_URL=postgresql://username:password@localhost:5432/database_name

# Auth
BETTER_AUTH_SECRET=your-32-char-secret-here
BETTER_AUTH_URL=http://localhost:3000

# Google OAuth (primary)
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...

# Email (optional: only needed for magic links + verification emails)
# RESEND_API_KEY=re_your-resend-api-key
# RESEND_FROM_ADDRESS="Your App <noreply@yourdomain.com>"

Database setup (Drizzle)

If you don’t have Postgres locally, a quick Docker option:

docker run --name tanstarter-postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=tanstarter -p 5432:5432 -d postgres:16

Push the schema to your database:

bun run db:push

Optional: view your DB in Drizzle Studio:

bun run db:studio

3) Start the dev server

bun run dev

Open http://localhost:3000.

4) Optional modules

These are not required for the first local run, but they’re “turn-key” once you add keys:

Next steps