Fireship · @fireship
Monorepos - How the Pros Scale Huge Software Projects // Turborepo vs Nx
Uploaded December 13, 2021 · Length 9:07
Summary
A tutorial on monorepos, comparing Turborepo and Nx, and how to scale huge software projects like Google's.
- monorepos
- turborepo
- nx
- software development
- scalability
- google monorepo
- dependency management
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
a software company like google maintains
- 0:02
a lot of code like seriously a lot like
- 0:04
over 2 billion lines of code and nearly
- 0:06
100 terabytes of data to go along with
- 0:08
it it's a scale that's hard to even
- 0:10
comprehend like all the stars in the
- 0:11
universe or all the universes in the
- 0:13
multiverse and you have thousands of
- 0:14
engineers around the world working on it
- 0:16
simultaneously but get this they store
- 0:18
all their code in a single monolithic
- 0:20
repository and they've been doing it
- 0:22
since the very beginning today google's
- 0:24
monorepo is likely the largest code base
- 0:26
in the world but it takes an
- 0:27
extraordinary effort to scale they have
- 0:29
their own homegrown version control
- 0:30
system and a highly advanced build tool
- 0:32
called bazel which goes by the much
- 0:33
cooler name of blaze internally in
- 0:35
today's video you'll learn everything
- 0:37
you ever wanted to know about mono repos
- 0:39
and how you the humble javascript
- 0:41
developer can build a high performance
- 0:42
mono repo in your garage if you're new
- 0:44
here like and subscribe we're so close
- 0:45
to 1 million and if you hit the button
- 0:47
right now we might even make it there by
- 0:48
christmas you may have heard some
- 0:50
exciting news last week that vercell
- 0:51
acquired a company called turbo repo
- 0:53
it's a build tool written in go that
- 0:55
makes it really easy to manage multiple
- 0:57
apps and packages in a single git
- 0:59
repository but first let's answer the
- 1:01
question of why would i want to use a
- 1:03
mono repo there are many reasons but at
- 1:05
the highest level it gives you
- 1:06
visibility of your company's entire code
- 1:08
base without the need to track down and
- 1:10
clone a bunch of different repos in
- 1:12
addition it provides consistency because
- 1:14
you can share things like your eslint
- 1:16
config a ui library of web components
- 1:18
for your design system utility libraries
- 1:20
documentation and so on the real power
- 1:23
though comes in the form of dependency
- 1:24
management imagine somebody makes a
- 1:26
breaking change to a shared library all
- 1:28
affected applications will know
- 1:30
instantly and monorepo tools can
- 1:31
actually help you visualize the entire
- 1:33
dependency graph of your software when
- 1:35
it comes to third party dependencies a
- 1:37
mono repo can dedupe packages that are
- 1:39
used in multiple apps a mono repo is
- 1:41
also ideal for continuous integration
- 1:43
and automation because your code is
- 1:45
already unified by default making it
- 1:47
much easier to build and test everything
- 1:49
together but there is one big problem
- 1:51
with monorepos and that's the fact that
- 1:53
they're big as the monorepo becomes
- 1:55
larger there are more things to test
- 1:57
more things to build and a lot more
- 1:58
artifacts to store as a result vs code


