Deployment Guide

Local Development

Install dependencies, configure .dev.vars, and start the dev server.

Quick Start

bash
pnpm install
cp .env.example .dev.vars
pnpm db:migrate:local
pnpm dev

Default URL: http://localhost:3000

About .dev.vars

.env.example is a field template; write actual local config to .dev.vars and never commit it.

FilePurpose
.env.exampleReference template, safe to commit
.dev.varsRead by Wrangler + Vite, do not commit

Important

.env.example may contain placeholder values. Replace with your own secrets before deploying.

Minimum Config

To explore the UI only, start with:

  • BETTER_AUTH_SECRET — openssl rand -base64 32
  • BETTER_AUTH_URL / SERVER_URL — http://localhost:3000
  • VITE_SITE_URL — http://localhost:3000

For login, payments, and email, add Google OAuth, Resend, Stripe, etc. See Secrets and Resend integration.

Common Commands

CommandDescription
pnpm devDev server (port 3000)
pnpm db:migrate:localLocal D1 migrations
pnpm testVitest unit tests
pnpm lintESLint
pnpm buildProduction build (no deploy)

Local D1

Migrations live in migrations/. After pulling code with new migrations:

bash
pnpm db:migrate:local

Inspect local tables:

bash
pnpm db:studio

Good to know

Local D1 data is isolated from production. Use pnpm db:migrate:remote for production — see Production Deploy.