An introduction to mono repos

An introduction to mono repos

One of the good characteristics of a software or a project is maintainability and making your project maintainable makes your organization able to adapt or integrate new technologies which leads to innovation. This will also allow your software engineers to easily make changes to your code base by easily understanding its structure and how everything works since everything is organized.

What is a mono repo?

A mono repo is a single git repository that holds the code base for multiple

  1. Applications
  2. Configurations
  3. UI Libraries
  4. Utility Libraries
  5. Toolings

Advantages

  1. Visibility - since most of your codes live inside the same git repo, you will be able to see other people's code, reuse them and avoid repeating the same business logic.
  2. Atomic Changes - having the ability to make a change to a component and have the change applied across all of the parts that depend on it.
  3. Mobility - developers from another team can contribute to another team's code base.
  4. Dependencies - managing dependencies is tough if you have multiple projects. Mono repo allows you to easily update and apply security patches to the dependencies throughout the project.

Disadvantage

If there are advantages, there are also disadvantages.

  1. Build Time - Since most of the code base lives inside the same git repository, build agents or server needs more time for building and deploying each project in the repository.
  2. Code Access - All of the members who have access to the repo will have access to view all the code. There’s no way to regulate some specific parts of the application.
  3. Git Perf - Since the whole code is in one place, and since a lot of developers commit and work together over the same repo, there are a lot of commits that are tracked by Git

Available mono repo tools in the wild

  1. TurboRepo - HOT!!! Turborepo is a high-performance build system for JavaScript and TypeScript codebases. I will make an article for this later. Hyped out with this project.
  2. Lerna - Lerna is a tool used to manage JS projects with multiple packages. It is built on Yarn.
  3. Yarn - Yarn is a JS dependency management tool that also supports monorepos through workspaces.
  4. NX — NX is a set of extensible dev tools for monorepos.
  5. RushJS — RushJS is another tool that should support the full lifecycle of monorepos.
  6. Bolt - Super-powered JavaScript project management

Conclusion

Monorepos is just a tool that has its own advantages as well as disadvantages. In fact, this approach has definitely made the life of developers easy.

I think if you take into account the size of your team, their strength, their weaknesses, and the project itself, to determine if the mono repo is the right choice for you.

That's about it. Please do like, comment and share my content.

要查看或添加评论,请登录

John Dave Decano的更多文章

社区洞察

其他会员也浏览了