🧠Knowledge Series #32: What’s a monorepo?
Everything you need to know with insights from Figma, Spotify, Airtable and more
🔒The Knowledge Series helps you plug the gaps in your tech knowledge so that you feel more confident when chatting to colleagues. Clearly explained in plain English. One topic at a time. So far, the collection includes APIs, front end development, mobile apps, headless architecture and payments explained - with more topics added every week.Â
If you’re a free subscriber and you’d like to upgrade to unlock them you can do so below. Or you can learn more about what you get with paid access here.
Hi product people 👋,
Code repos are essentially buckets for storing all of your product’s code, but there are different approaches to storing code which can have a knock on effect on your team’s ability to share components, deal with tech debt and ultimately ship releases to customers.
In this Knowledge Series, we’re going to focus specifically on one of the approaches to code repositories known as mono repositories, or monorepos.Â
Using examples from companies like Figma, Airtable, Spotify and others, you’ll understand what monorepos are, how they differ from multi-repos and why they matter to engineers and non-engineers alike so that the next time an engineer talks about potentially migrating to a monorepo, you’ll understand what’s being discussed.
Coming up:
What’s a mono repo?
The differences between mono repos, code repositories and component libraries
Why mono repos exist and the benefits of using them for product teams
How companies like Figma, Airtable, Uber, GitHub use monorepos plus examples of companies who don’t use mono reposÂ
How to set up a mono repo in your company and symptoms to look out for
What’s a monorepo?
First, let’s start with some simple definitions. Every product’s code is stored in a repository, or repo.Â
A code repository is a bit like the file systems we have on desktop operating systems with folders, subfolders and files. In the context of a code repo, a project will include a variety of different things including source code, documentation and other files (we’ll look into this in more detail later).
Without a code repo, it would ultimately be very difficult for engineers to collaborate with each other and most engineering teams will use tools like GitHub, GitLab or BitBucket to host their code.
If you want a deep dive on Git and GitHub, check out one of the previous Knowledge Series on that topic.
OK, so what’s a monorepo?
A monorepo (or monolithic repository) is a single version control repository that contains the code for multiple projects, libraries, or components. This contrasts with the more traditional approach of having separate repositories for each project or application.
In a monorepo, instead of having separate Git repositories for your website, mobile app, backend services, shared libraries, etc., all of that code lives together in one unified codebase.
Companies that use mono repos include: