Clone the repository
Install dependencies
From the repo root, install all workspace dependencies:Configure environment variables
Copy the example env files for each service:Root .env
Create a .env file at the repo root for shared variables that apply across all services:
Backend apps/backend/.env
Web apps/web/.env
AI Agents apps/ai-agents/.env
Set up the database
Create the database:e2e@example.com / TestPassword123!) and sample CRM data:
Set up GitHub OAuth
- Go to github.com/settings/developers
- Click New OAuth App
- Fill in:
- Application name:
Zuko (local) - Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3001/auth/callback/github
- Application name:
- Copy the Client ID and generate a Client Secret
- Paste them into
apps/backend/.envasGITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET
Start the app
Recommended — start backend + frontend together:Start the AI agents service
In a separate terminal:The AI agents service is only needed if you want to use the agentic chat
features. The core CRM (contacts, companies, deals) works without it.
Verify your setup
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 withe2e@example.com / TestPassword123! after seeding, or use Sign in with GitHub.
All commands reference
Troubleshooting
PostgreSQL connection error
PostgreSQL connection error
Ensure PostgreSQL is running:Test the connection:Check
DATABASE_URL format: postgres://user:password@host:port/dbnamePrisma client errors
Prisma client errors
Clear the cached client and regenerate:
bash rm -rf node_modules/.prisma/ bun nx run @zuko/models:prisma:generate Auth / CORS errors
Auth / CORS errors
- Ensure
TRUSTED_ORIGINSinapps/backend/.envincludes bothhttp://localhost:3000andhttp://localhost:3001- Clear browser cookies and retry - Confirm the GitHub OAuth callback URL is exactlyhttp://localhost:3001/auth/callback/github
Frontend can't connect to backend
Frontend can't connect to backend
- Confirm
NEXT_PUBLIC_BACKEND_URL=http://localhost:3001inapps/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
Bun install fails or lock file issues
bash rm bun.lockb bun install --force Port already in use
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
AI agents service won't start
- Ensure
OPENAI_API_KEYis set inapps/ai-agents/.env - Ensure
AGENT_TOKENmatches the value inapps/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
Next steps
- Explore the Concepts section to understand the architecture
- Read the Guides to learn how to use agentic chat with CRM data
- Add the Zuko MCP server to your AI coding agent for context-aware setup help