Why not Simple folders?

Why cant I just store services (backend, frontend etc) in various top level folders?

You can, and you should if your

  1. Services are highly decoupled (dont share any code)
  2. Services don’t depend on each other.

For eg - A codebase which has a Golang service and a JS service

Screenshot 2024-03-16 at 2.54.08 AM.png

Why monorepos?

  1. Shared Code Reuse
  2. Enhanced Collaboration
  3. Optimized Builds and CI/CD: Tools like TurboRepo offer smart caching and task execution strategies that can significantly reduce build and testing times.
  4. Centralized Tooling and Configuration: Managing build tools, linters, formatters, and other configurations is simpler in a monorepo because you can have a single set of tools for the entire project.

Screenshot 2024-03-16 at 2.55.59 AM.png