Monorepo (అনేక ప్రాజెక్ట్ల/సేవల కోసం ఒక రిపోజిటరీ) మరియు polyrepo (ప్రতి ప్రాజెక్టుకు ప్రత్యేక రిపోజిటరీ) అనేవి బహుళ ప్రాజెక్ట్ల అంతటా కోడ్ను నిర్వహించడానికి రెండు స్ట్రాటేజీలు. ప్రతిదానికి సహযోగం, సాధనాలు మరియు స్కేలింగ్ను ప్రభావితం చేసే ముఖ్యమైన ట్రేడ్-ఆఫ్లు ఉన్నాయి — వాటిని అర్థం చేసుకోవడం ముఖ్యమైన ఆర్కిటెక్చరల్ నిర్ణయాలను తెలియజేస్తుంది.
Monorepo — ప్రతిదానికి ఒక రిపో
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).
