From clone to signed-in dashboard in about five minutes. You need Node.js 20+, pnpm, and a Postgres database — either Docker locally or a free hosted one (Neon, Supabase).
1. Install
pnpm install2. Configure the environment
cp .env.example .envOpen .env and set at minimum BETTER_AUTH_SECRET (generate one with openssl rand -base64 32). Every variable is documented in .env.example and validated at startup by src/lib/env.ts — a missing required value fails fast with a readable error instead of breaking at runtime.
3. Start a database
With Docker:
docker compose up -dThe default DATABASE_URL in .env.example matches this container (Postgres 16 + pgvector). Using Neon or Supabase instead: paste your connection string into DATABASE_URL — nothing else changes.
4. Apply the schema
pnpm db:migrate5. Run
pnpm devOpen localhost:3000, create an account at /sign-up, and you'll land on the protected dashboard with a 50-credit signup bonus — enough to try the chat and RAG examples once your AI Gateway key is set.
Optional keys
Everything below is optional — the app runs without them and degrades gracefully:
AI_GATEWAY_API_KEY— chat + RAG locally (on Vercel, OIDC covers this).STRIPE_SECRET_KEY/IYZICO_API_KEY— credit purchases.RESEND_API_KEY— real email delivery; without it, magic-link and verification emails are logged to the console.ADMIN_EMAILS— unlocks/dashboard/admin.