Engineering Overview
Engineering Overview
Section titled “Engineering Overview”Cosella is a pnpm workspace monorepo managed by Turborepo.
Package graph
Section titled “Package graph”apps/ dashboard – React web app (sales rep daily driver) admin – React web app (org management) desktop – Electron overlay (real-time assist during calls) marketing – Astro static site docs – Astro + Starlight (this site)
packages/ ui – Radix-based component library tokens – Design tokens (CSS @theme + JS constants) domain – Zod schemas + inferred TypeScript types api-client – openapi-fetch typed client + TanStack Query hooks realtime – WebSocket client with exponential-backoff reconnect auth – Auth context stub (to be wired to backend) permissions – Pure permission functions (role-based) testing – MSW server + handlers + fixturesDependency direction
Section titled “Dependency direction”apps → packages (one-way only)packages/ui → packages/tokenspackages/api-client → packages/domainpackages/realtime → packages/domainpackages/auth → packages/domainpackages/permissions → packages/domainpackages/testing → packages/domainEnforced at lint time by eslint-plugin-boundaries.
Key decisions
Section titled “Key decisions”See the ADR index for recorded architectural decisions.