Skip to main content

Day 1

Zero to running-locally in ~2 hours.

Prerequisites​

  • macOS or Linux (Windows via WSL2)
  • Node.js 20+ (nvm install 20)
  • npm — the repo has a package-lock.json and no pnpm lockfile. Use npm, not pnpm or yarn.
  • Docker Desktop
  • Access to: GitHub org, Vercel team, Supabase project, ClickHouse Cloud, Inngest app, 1Password vault

Access checklist​

Before touching code, confirm you have:

  • GitHub access to ScaledByDesign/launchpad-v2
  • Vercel team membership (Developer or higher)
  • Supabase project membership (Developer)
  • ClickHouse Cloud access
  • Inngest app access
  • 1Password shared vault with .env.development entries
  • Current engineering support channel

If any box is unchecked, ask in Slack before continuing.

Local setup​

git clone git@github.com:ScaledByDesign/launchpad-v2.git
cd launchpad-v2
npm ci
cp .env.example .env.local
# Fill in .env.local from the shared credential store
npm run dev # Next.js

Open http://localhost:3000. You should see the login page. If you can't log in, check SUPABASE_URL in .env.local.

Credential vaults fail closed

If CREDENTIAL_ENCRYPTION_KEY is unset locally, every connector appears uncredentialed rather than erroring. That is expected local behavior — not a bug to chase.

Useful local commands:

npm run typecheck # tsc --noEmit — run before every commit
npm run build # required for any route/RSC/boundary change
npm run test:unit
npm run test:isolation # tenancy isolation — never disable a failing case
npm run test:all # canonical full test suite

Repo tour (30 min)​

Read, in this order:

  1. The repository and nearest folder guides (AGENTS.md) for the area you will change.
  2. This Developer docs overview and Code map.
  3. src/lib/auth-scope.ts — resolveQueryScope(), the fail-closed tenancy chokepoint every marketing query passes through.
  4. src/lib/rbac.ts — the single source of truth for roles, permissions, and grants.
  5. src/lib/marketing/queries.ts — the ClickHouse query layer.
  6. The Inngest folder guide (src/inngest/AGENTS.md), then src/inngest/marketing-functions.ts — the current sync model and the jobs that implement it.

That's the spine. Every src/ folder has its own folder guide (AGENTS.md) with folder-level traps — read the one for whatever you're about to touch.

What NOT to do on day 1​

  • Don't run migrations against the prod Supabase project.
  • Don't run backfills against prod.
  • Don't disable an isolation test to make it pass.

Now do this​

Move on to First PR.