Documentation

Quickstart

From purchase to a running local environment in under 15 minutes. From there to deployed: another 10.

Prerequisites

You need these installed before you start. All free.

Node.js 20+
Check: node --version
pnpm 9+
npm i -g pnpm
Supabase CLI
brew install supabase/tap/supabase

You'll also need accounts with Supabase (free tier works), Stripe (test mode), and Vercel (free tier). None of these require billing information to start.

Step 1 — Purchase

01
Buy on Polar → receive GitHub invite

Purchase a Solo or Team licence at already.wait-what.shop/#pricing. Polar (Merchant of Record) processes the payment and handles tax globally.

Within 1–2 minutes you'll receive an email from GitHub with a repository invite to the private Already repository. Accept it.

Step 2 — Clone

02
Use this template on GitHub

Go to the repository on GitHub and click "Use this template" → "Create a new repository". This gives you a clean copy with no shared history — your own repo from commit one.

Then clone your new repo locally:

git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME
cd YOUR_REPO_NAME
pnpm install

Step 3 — Run setup

03
pnpm setup

The setup script validates your env vars, runs database migrations, and bootstraps your Stripe products. It's interactive — it'll tell you what's missing.

cp .env.example .env.local
# Edit .env.local — add your Supabase and Stripe keys
pnpm setup

For billing, run the Stripe bootstrapper after setup:

pnpm setup:stripe

This creates your Stripe products and prices (idempotent — safe to re-run) and writes the price IDs back to .env.local.

First run without cloud accounts? Already runs fully locally without a Supabase or Stripe account. Run supabase start for a local Postgres + Auth stack, and use Stripe test mode keys (no live account needed).

Step 4 — Local dev

04
pnpm dev

One command starts everything: Next.js, the local Supabase stack, the Stripe CLI webhook listener, and the email preview server.

pnpm dev

Then open:

  • localhost:3000 — your app
  • localhost:54323 — Supabase Studio (local DB)
  • localhost:3001 — React Email preview

Step 5 — Deploy

05
vercel deploy

Already's vercel.json is pre-configured. Connect your repo to a Vercel project and add the production env vars from your .env.local.

vercel deploy --prod

CI/CD is pre-wired via GitHub Actions. Every PR gets a Vercel preview deploy. Playwright E2E tests run against the preview.

Required env vars

All vars are documented in .env.example with inline comments. The minimum set for local dev:

# Supabase (local: run supabase start)
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
DATABASE_URL=
DATABASE_URL_DIRECT=

# Stripe (test mode keys from dashboard)
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=

# Resend (dev mode — emails logged, not sent)
RESEND_API_KEY=

Useful commands

pnpm dev              # start everything
pnpm db:seed          # seed local DB with demo data
pnpm db:studio        # open Drizzle Studio (local DB UI)
pnpm reset            # drop DB → migrate → seed (~5s)
pnpm email            # React Email preview server
pnpm test             # Vitest unit + integration tests
pnpm test:e2e         # Playwright E2E tests
pnpm already doctor   # health check: env, DB, Stripe, deps

What's in the repo

Already ships 16 modules. Each has its own docs inside the repo at docs/modules/. Here's the map:

  • Authlib/auth/, app/(auth)/
  • Billinglib/billing/, config/billing.ts, app/(billing)/
  • Multi-tenant orgslib/queries/, db/schema/orgs.ts
  • Messagingmessaging/, lib/messaging/
  • Background jobslib/jobs/, app/api/cron/
  • AI integrationlib/ai/, per-org credits ledger in db/schema/
  • Feature flagslib/flags/, config/flags.ts
  • Adminapp/(admin)/, impersonation + audit log
  • Securitylib/security/, suspicious activity + rate limiting
  • i18nlib/i18n/, messages/ (en/de/es)

Full module reference docs are inside the repo at docs/, readable by Claude Code and Cursor out of the box.