モノレポ(多数のプロジェクト/サービスを1つのリポジトリで管理)とポリレポ(プロジェクトごとに独立したリポジトリ)は、複数プロジェクトのコード体系を組織するための2つの戦略です。各戦略はコラボレーション、ツーリング、スケーリングに大きな影響を与えるトレードオフを持つため、重要なアーキテクチャの決定に情報をもたらします。
モノレポ — すべてを1つのリポジトリで
Many projects/services/libraries in a SINGLE repository:
✓ SHARED code/libraries easy to use and refactor (one place, atomic changes)
✓ ATOMIC commits across projects (change an API and all its consumers together)
✓ Unified tooling, versioning, CI; consistent standards; easy cross-project visibility
✓ Simplified dependency management (one version of shared code)
✗ Repo can get HUGE (needs scaling tooling — sparse checkout, build caching)
✗ Needs sophisticated build/CI tooling (Nx, Turborepo, Bazel) to be efficient
✗ Broad access; CI must be smart (only build what changed)
→ Used by Google, Meta, etc. (with heavy tooling investment).
