Monorepo (कई projects/services के लिए एक repository) और polyrepo (प्रति project एक अलग repository) कई projects में code को व्यवस्थित करने के लिए दो strategies हैं। प्रत्येक के महत्वपूर्ण trade-offs हैं जो collaboration, tooling, और scaling को प्रभावित करते हैं — इन्हें समझना महत्वपूर्ण architectural निर्णयों को सूचित करता है।
Monorepo — सब कुछ के लिए एक repo
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).
