Architecture
Overview
Monorepo layout, workspace graph, and Turborepo pipeline.
The root monorepo. pnpm workspaces with Turborepo orchestration, two apps and six packages.
Directory Structure
packages:
- "apps/*"
- "packages/*"Internal packages reference each other with "workspace:*" in package.json. pnpm resolves these to the local workspace copy at install time, so changes are picked up immediately without publishing.
turbo.json
pnpm-workspace.yaml
package.json
tsconfig.json
Dependency Graph
Solid arrows are runtime dependencies. Dashed arrows are dev/tooling dependencies (every package uses the shared ESLint and TypeScript configs). The cli package is independent and published to npm separately. core depends on ui for design system primitives.
Turborepo Pipeline
{
"$schema": "https://turbo.build/schema.json",
"ui": "tui",
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".next/**", "!.next/cache/**"]
},
"lint": {
"dependsOn": ["^lint"]
},
"check-types": {
"dependsOn": ["^check-types"]
},
"dev": {
"cache": false,
"persistent": true
},
"clean": {
"cache": false
}
}
}| Task | Behavior |
|---|---|
build | Builds dependencies first (^build), caches .next output |
dev | Parallel dev servers, no caching |
lint | Lints dependency packages first, cacheable |
check-types | Type-checks dependency packages first, cacheable |
clean | Removes build artifacts, not cached |
Root Files
| File | Purpose |
|---|---|
turbo.json | Task pipeline, caching rules |
pnpm-workspace.yaml | Workspace declarations |
package.json | Root scripts, devDependencies, engine constraints |
tsconfig.json | TypeScript project references |
eslint.config.mjs | Root ESLint flat config |
release-please-config.json | Versioning and changelog automation |
.release-please-manifest.json | Current version for each tracked package |