advanced
Monorepos
Coordinate many packages with workspace linking, task graphs, affected builds, caching, ownership, and release boundaries.
Monorepo interviews test package boundaries, task graphs, affected execution, and deterministic caching—not folder count. Subtopics: npm/pnpm/yarn workspaces, Turborepo, Nx, dependency graphs, build caching.
On interviews: explain when workspaces suffice versus when Turborepo or Nx adds value; how cache keys must include env and lockfile inputs.
Common pitfalls: hidden cross-package imports; caching nondeterministic tasks; orchestration before clear ownership.
The trade-off is coordination power versus tool complexity and boundary discipline.
Checklist:
- Start with explicit package boundaries.
- Model task dependencies topologically.
- Declare cache inputs and outputs completely.
- Add orchestration only when workspaces hurt.