Software Development

How to Keep Your Unfinished Side Projects in One Place

The Philosophy Behind Monorepos

How to Keep Your Unfinished Side Projects in One Place
AI Generated Image <source>

Before we start, be sure to write a comment of how many unfinished side projects you have for research purposes. (For me it’s 6, try to beat that.😏)

If your number is high like mine, then you are in for a massive treat!

What if I told you there is a scalable way to store your side projects in a single repository and even have them share common resources?

Well that’s where monorepos (A.K.A. Monolithic Repositories) come in.

Today we will dive into the philosophy behind monorepos, their use cases, and how it can be used to stop your side projects from escaping!

So without further ado… Let’s dive right in!


What is a Monorepo?

If we take the basic definition, a monorepo is:

A version-controlled repository that holds a larger number of projects.

This means you can create a monorepo version-controlling your “Projects” folder. (E.g. git init inside the projects folder)

My Projects Folder with some side projects.
My Projects Folder with some side projects.

Monorepos are often used by large companies to store a large number of independent projects in a single repository.

Now the main problem with this approach is that it’s not scalable at first glance.

However, there are many tools out there like turborepo, or nx, that helps you scale a monorepo easily even with hundreds of projects.

In the next section, I will give a basic insight into setting up turborepo with Next.js.

Feel free to skip over this section if it’s not relevant for you.

Basic Turborepo Setup (Next.js Only)

According to Turborepo themselves:

Turborepo is a high-performance build system for JavaScript and TypeScript codebases. It is designed for scaling monorepos and also makes workflows in single-package workspaces faster, too.

This means using turborepo with a single app may even be faster than a normal repository with a single app!

And the great news is that it’s not difficult to get started.

There may be a small adjusting period, but it only took me a few days to get familiar with turborepo and how I can use it to scale monorepos with ease.

I highly recommend watching this demo from Lee Robinson of the Vercel team. He explains the setup process very well:

Following this video, I would also highly recommend reading the docs to create the ultimate monorepo setup with turborepo.

Use Cases

1. Storing Side Projects

Contrary to popular belief, monorepos are not just good for massive companies that have many interrelated independent projects.

In fact, when using monorepo scaling services like turborepo or nx, this process becomes very viable even for everyday side project storage.

This way, you will be faced with your unfinished side projects every time you open up your code editor and feel guilty.

This reminder works very well for me, especially since I can trust that my ancient side projects can exist without getting in the way or affecting performance of new side projects.

2. Enterprise SaaS Companies

And of course, monorepos are not only useful, but essential, for massive enterprise companies.

Google, for example, have the largest monorepo which stores billions of lines of code for all their software. E.g. Google Ads, Google Drive…

And this benefits companies like Google because they can easily oversee codebase changes to individual services.

They can also delegate teams that work on certain services, e.g. a Google Ads Developer team, which is great for organization.


If you enjoyed this article, please make sure to Subscribe, Clap, Comment and Connect with me today! 🌐

References