Skip to content

Local Setup

Prerequisites

  • Node.js >= 20.0.0
  • pnpm >= 10.30.3
  • Docker Desktop
  • Wrangler CLI (npm install -g wrangler)
  • A Supabase project (or local Supabase via supabase start)

Clone and install

expressiveCode.terminalWindowFallbackTitle
git clone https://github.com/archetypal-ai/Chairman-Infrastructure.git
cd Chairman-Infrastructure
pnpm install

Environment setup

Copy the example env file and fill in your secrets:

expressiveCode.terminalWindowFallbackTitle
cp packages/api-gateway/.dev.vars.example packages/api-gateway/.dev.vars

Required variables:

SUPABASE_URL=https://xxxx.supabase.co
SUPABASE_SERVICE_ROLE_KEY=eyJ...
UPSTASH_REDIS_REST_URL=https://xxxx.upstash.io
UPSTASH_REDIS_REST_TOKEN=xxxx
ANTHROPIC_API_KEY=sk-ant-xxxx
AUTH_SECRET=your-local-secret

Start the API gateway

expressiveCode.terminalWindowFallbackTitle
pnpm dev
# Starts Wrangler dev server on http://localhost:8787

Start the dashboard

expressiveCode.terminalWindowFallbackTitle
pnpm dev:dashboard
# Starts Vite dev server on http://localhost:5173

Start a docs site

expressiveCode.terminalWindowFallbackTitle
cd packages/govern-docs
pnpm dev
# Starts Astro dev server on http://localhost:4321

Database migrations

expressiveCode.terminalWindowFallbackTitle
pnpm db:migrate

TypeScript checks

expressiveCode.terminalWindowFallbackTitle
pnpm typecheck
# Must report zero errors