Docs

Architecture · 11.06

Codebase Shape & the Boundary Rails

The monorepo layout across apps and packages, and the dependency-free boundary checker that fails CI on illegal cross-layer imports.

Codebase

Ten packages, each with one job

PackageResponsibility
apps/apiThe runtime: engine, domain-bounded services, routes, adapters, the bootstrap composition root.
apps/webThe dashboard: canvas, chat, apps, Brain, settings.
packages/coreShared types — the workflow graph, the view tree, capabilities — plus constants and pure logic. Deliberately browser-safe: no node:crypto or other Node-only imports.
packages/dbSQLite schema and migrations (Drizzle).
packages/integrationsConnector manifests and templated HTTP connectors.
packages/cliThe launcher / embedder entry point.
packages/appThe App primitive's shared logic — datastore, lifecycle, packager, surface store — used by both the API and the web dashboard.
packages/app-client, packages/runtime, packages/sdkInternal shared packages, each private: true — not published externally today. See The Internal Packages.

Modularity enforced by CI, not just convention

A dependency-free boundary checker runs as part of pnpm lint and fails the build outright on an illegal cross-layer import — a rule enforced by tooling, not just a convention written in a README that erodes the moment someone's in a hurry. A companion file-size budget rail blocks new god-files from forming in the first place, the same discipline that motivated splitting the engine's cognitive loop and node executors out from the core WorkflowEngine file behind typed host facades rather than letting one file keep absorbing every new responsibility indefinitely.

Continue