Create a .env file at the repo root for shared variables that apply across all services:
# ── Database ──────────────────────────────────────────────────DATABASE_URL=postgres://postgres:password@localhost:5432/zuko_dev# ── Auth ──────────────────────────────────────────────────────# Random secret for Better Auth session signing (min 32 chars)BETTER_AUTH_SECRET=your-secret-here# ── AI ────────────────────────────────────────────────────────OPENAI_API_KEY=sk-...# ── Agents ────────────────────────────────────────────────────# Shared secret token — must match AGENT_TOKEN in each service .envAGENT_TOKEN=your-agent-token
NX automatically loads the root .env for all workspace commands. Set shared
variables here once instead of repeating them in each service’s .env.
# PostgreSQL (used for LangGraph checkpoint storage)DATABASE_URL=postgres://postgres:password@localhost:5432/zuko_devOPENAI_API_KEY=sk-...OPENAI_MODEL=gpt-4.1BACKEND_URL=http://localhost:3001AGENT_TOKEN=your-agent-tokenLANGSMITH_TRACING=falseLANGSMITH_API_KEY=
AGENT_TOKEN must be the same value in both apps/backend/.env and
apps/ai-agents/.env. It authenticates the agents service when calling
backend endpoints.
Open http://localhost:3000 — you should see the Zuko login page.Click Sign in with GitHub and authorize the OAuth app. You’ll land on the CRM dashboard.Email/password auth is enabled by default in the config above. Log in with e2e@example.com / TestPassword123! after seeding, or use Sign in with GitHub.
# Install dependenciesbun install# Databasebun nx run @zuko/models:prisma:generate # Generate Prisma clientbun nx run @zuko/models:prisma:migrate -- --name init # Run migrationsbun nx run @zuko/models:seed # Seed test databun nx run @zuko/models:prisma:studio # Open DB browser (port 5555)bun nx run @zuko/models:prisma:reset # Reset DB (destructive!)# Developmentbun nx run @zuko/web:dev # Start frontend + backendbun nx run @zuko/backend:serve # Start backend onlybun nx run @zuko/ai-agents:dev # Start AI agents (port 8080)bun nx run @zuko/meeting-bot:dev # Start meeting bot (port 8000)# Testsbun nx run @zuko/backend:test # Backend unit testsbun nx run @zuko/web:test # Web unit testsbun nx affected -t test # Test only affected projects# E2E testsNODE_ENV=test bunx nx run web-e2e:e2e # Run E2E testsNODE_ENV=test bunx nx run web-e2e:e2e --ui # E2E with UI mode# Buildbun nx run @zuko/backend:buildbun nx run @zuko/web:buildbun nx run @zuko/ai-agents:build# Utilitiesbun nx graph # Visualize project dependency graphbun nx show project @zuko/backend # Show available targetsbun nx affected -t lint # Lint affected projects
Clear the cached client and regenerate: bash rm -rf node_modules/.prisma/ bun nx run @zuko/models:prisma:generate
Auth / CORS errors
Ensure TRUSTED_ORIGINS in apps/backend/.env includes both
http://localhost:3000 and http://localhost:3001 - Clear browser cookies
and retry - Confirm the GitHub OAuth callback URL is exactly
http://localhost:3001/auth/callback/github
Frontend can't connect to backend
Confirm NEXT_PUBLIC_BACKEND_URL=http://localhost:3001 in apps/web/.env -
Make sure the backend started without errors before opening the frontend -
Check the backend terminal for startup errors
Bun install fails or lock file issues
bash rm bun.lockb bun install --force
Port already in use
Find and kill the process on the conflicting port: bash lsof -ti:3001 | xargs kill -9
AI agents service won't start
Ensure OPENAI_API_KEY is set in apps/ai-agents/.env
Ensure AGENT_TOKEN matches the value in apps/backend/.env
The first start may be slow (downloading LangGraph CLI dependencies)
If port 8080 is in use, kill it: lsof -ti:8080 | xargs kill -9