Skip to content

0002. Monorepo: pnpm workspaces + Turborepo

  • Status: Accepted
  • Date: 2026-11-26
  • Phase: 1

One git repo holds ~20 framework packages, the sample games, the MCP server, the platform apps and the infrastructure. We need fast installs, strict dependency boundaries, cached task running and simple config that an AI can read and edit.

  • pnpm workspaces for packages (strict node_modules, so undeclared dependencies fail fast; workspace:* links).
  • Turborepo for task orchestration and local caching (build, test, lint, typecheck, docs).
  • Changesets for versioning and changelogs of the published framework packages.
  • Node.js active LTS pinned in .nvmrc and packageManager (Corepack).
Option Pros Cons
Nx Powerful graph, generators, module-boundary lint rules Heavier config and concepts; plugin layer to learn
moonrepo Fast, language-agnostic Smaller ecosystem, less familiar to AI tools
npm/Yarn workspaces only Zero extra tools No task caching; npm’s hoisting hides missing dependencies
Bun workspaces Very fast Runtime/tooling still less predictable for library publishing

Turborepo is thin; if we outgrow it, Nx can adopt the same pnpm workspace. Package boundaries (e.g. games must not import PixiJS directly) are enforced by a lint rule plus a dependency-cruiser check.