Lesson 0001 · ~10 minutes
One skill: place “one repo, many projects” on the repo strategy spectrum and pick a monorepo only when the hard problem is multi-project consistency + coordinated change — not “one giant app,” and not “git folders without tooling.”
After the quiz, you can defend “monorepo yes / no” for a set of related projects — and reject both “monolith in disguise” and “polyrepo with copy-pasted configs forever” without installing moon yet.
A monorepo is a single repository containing multiple distinct projects, with well-defined relationships between them. Nx’s definition is the cleanest public framing for this track: apps, libraries, and tools can share a stack or not; each project can still build, test, and deploy on its own.
Three confusions to kill early:
Your mission is multi-project maintenance. Monorepos earn their keep when several of these hurt in a polyrepo world:
Google’s paper lists the classic advantages in larger form: unified versioning, code sharing, simplified dependencies, atomic changes, large-scale refactor, collaboration, flexible ownership, visibility.
Monorepos are not free. Expect to pay in:
Choose monorepo when related projects benefit from one truth + coordinated change, and you will fund the tooling. Choose polyrepo when isolation, separate access, or truly independent release/ownership dominate — and accept coordination cost.
One repo per project. Max isolation. Shared standards and cross-cutting changes are process + automation debt.
Many projects in one git tree, little monorepo tooling. Fine as a bridge; dangerous as an end state at scale.
One repo, project graph, shared tasks, toolchain, affected/cache. Your target shape for multi-project standardization.
One deployable app (architecture). Can live in poly- or monorepo — different axis. Don’t confuse with monorepo.
Package manager workspaces (pnpm/npm/Yarn) sit in the middle: they link local packages. They are not a full monorepo build system. Tools like moon add the orchestration layer (tasks, graph, toolchain, cache) — that is later lessons.
Equal-length choices. Pick, then read the feedback. No moon install yet.
“We’ll put the whole product in one monorepo, so it becomes one monolith we ship together.” What’s wrong?
Which situation is the strongest monorepo fit?
You merge five repos into one git root and keep each package’s own ad-hoc scripts. CI runs all tests on every PR. Best diagnosis?
When is polyrepo usually the better default?
Recommended primary: Nx — What is a Monorepo? (~10–15 min). Tight definitions: monorepo vs monolith, benefits, why collocation fails, tool layers.
Depth primary (skim the advantages/costs): Potvin & Levenberg — Why Google Stores Billions of Lines of Code in a Single Repository (CACM). Use it to pressure-test “why” and “what it costs,” not to copy Piper.
moon docs wait until we wire a workspace — but bookmark moon: Workspace for the next step.