DEV Community

Saugat Rai
Saugat Rai

Posted on

Explain like I'm five what is monorepo

Top comments (2)

Collapse
 
rhymes profile image
rhymes

Maybe this can help

You need an organization system for your legos. We can get you a lot of little bins and you can put each of your lego sets into its own bin. Then, when you want to build the red race car, you pull out the red race car bin and make it. If you want to build the orange plane, you can get out that bin and build it. You can keep the instruction sets for how to build each in its bin. The race car instructions with the race car legos and the plane instructions with the plane legos.

Some day, you're going to want to start combining the legos between the different sets to create your own projects. Maybe that's because you're bored of the car and the plane and want to build a flying car instead or maybe that's because you use Mom's 3D printer to make some new pieces that you want to attach to both the plane and the car. Whatever the case, you now have a choice. You can still keep the legos in their own bin and just know that when you want to build your flying car, you're going to have to get out the bin for the plane and car and put them together. And where do you keep the drawings for how to build your flying car? Maybe we need a 3rd bin for that. As you get more and more lego sets (birthdays, allowance, etc.), you need a lot of bins.

At some point, you might decide it's easier to have one bin and organize the legos within the big bin in a way that makes it easy to assemble any of the lego sets; or any of your own creations. You can even keep all the instruction manuals and your own drawings in that big bin. This one big, organized bin is a "monorepo". It makes it easy to have all the legos you need to build what you want, but it also means that your brother might mess up your organization system or lose some legos (break the build). Since you're all sharing the same bin of legos, you have to have rules and be nice about how you play with them, how you put them back, what you do if you lose or break a piece, etc.

Collapse
 
raisaugat profile image
Saugat Rai

The legos indeed helped. :) Thanks for the reply.