Apps
apps/backend: NestJS API for auth, chat, and the sales domain (contacts, companies, deals).apps/ai-agents: Agent runtime service. Hosts the LLM agent and exposes tools that call the backend/api/agents/*endpoints (machine-to-machine viaAGENT_TOKEN).apps/web: Next.js frontend that provides the web UI and chat experience.apps/backend-e2e: Backend end-to-end tests.apps/web-e2e: Playwright-based E2E tests for the web app.
Libraries
libs/core: Shared core utilities.libs/models: Prisma schema and client, including migrations and seed logic.libs/sales: CRM domain logic for contacts, companies, and deals.libs/ui-kit: Shared UI components used by the web app.
Data flow
- The web app calls the backend (NestJS) for auth, chat, and CRM operations.
- The backend uses Prisma (from
libs/models) to read and write to PostgreSQL. - AI chat endpoints can incorporate CRM context from
libs/sales. The backend can also delegate tool execution to the ai-agents service via/api/agents/*. - UI components from
libs/ui-kitrender CRM entities and chat interfaces in the web app.
Testing and tooling
- E2E tests live in
apps/web-e2eand use Playwright with Nx. - Beads (
.beads/) is used for issue tracking, so issues stay in the repo. - Nx provides task orchestration (
nx run,nx affected) for builds, tests, and linting.