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.
# ── Database ──────────────────────────────────────────────────# PostgreSQL connection string (can be omitted if set in root .env)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# GitHub OAuth — create app at https://github.com/settings/developers# Homepage URL: http://localhost:3000# Authorization callback URL: http://localhost:3001/auth/callback/githubGITHUB_CLIENT_ID=your-github-client-idGITHUB_CLIENT_SECRET=your-github-client-secret# ── URLs ──────────────────────────────────────────────────────BACKEND_URL=http://localhost:3001FRONTEND_URL=http://localhost:3000# List of allowed CORS origins (comma-separated)TRUSTED_ORIGINS=http://localhost:3000,http://localhost:3001# ── AI ────────────────────────────────────────────────────────OPENAI_API_KEY=sk-...# ── Agents ────────────────────────────────────────────────────# Shared secret token used by the ai-agents service to call /api/agents/*AGENT_TOKEN=your-agent-token# ── Auth options ──────────────────────────────────────────────# Enable email/password login in addition to GitHub OAuthBETTER_AUTH_INCLUDE_EMAILS_AUTH=true# LangSmith tracing (optional but useful for debugging agents)LANGSMITH_TRACING=falseLANGSMITH_API_KEY=LANGSMITH_PROJECT=zuko
# PostgreSQL (used for LangGraph checkpoint storage)# Can be omitted if set in root .envDATABASE_URL=postgres://postgres:password@localhost:5432/zuko_dev# OpenAI (can be omitted if set in root .env)OPENAI_API_KEY=sk-...OPENAI_MODEL=gpt-4.1# Backend connection — must match AGENT_TOKEN in backend .envBACKEND_URL=http://localhost:3001AGENT_TOKEN=your-agent-token# Optional tracingLANGSMITH_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