
Commit to something big: all about monorepos
The Stack Overflow Podcast
Mono- vs Poly-Repo Structures in Companies
The debate between mono and poly repo structures is not a religious one among developers, but rather a matter of being flexible and open to different solutions. Many companies, even large ones, have multiple mono repo structures where related business areas and entities collaborate. Some parts of the mono repo may even be published as packages and consumed by other mono repos or poly repos. It is not a one-size-fits-all approach and depends on the specific needs and relationships between codebases. In terms of security and compliance, having everything in one place may seem easier, but maintenance can be challenging, especially with a large number of packages. Tooling and guardrails need to be in place to manage dependencies and ensure maintainability. Custom-linting rules and tagging systems can be used to define package dependencies and restrictions. Code merging platforms like GitHub and GitLab can help with code reviews and approvals, but enforcing view restrictions may be more difficult.