Monorepo :
- Soo monorepo used in application that have many sub applications involved
- It basically keeps all the microservices in one repo itself
- keeping them independent but also gives them an option to share certain resource multiple application need decreasing code duplication
How are Monorepos created and managed ??
- So we keep all repos in one folder and then use a management tool
- that tool is provided by nx or turborepo etc
- pnpm is used widely here to create the structure
Standard Architecture Of Monorepo

- Mainly There will be 2 folders
- apps : contain all the application the company is working with
- packages : contain the shared resources
- shared code : configs ,lints ,compilers
- shared ui
Concepts involved in Monorepo are :
- Task ordering : decides which code compiles first ..usefull when there is dependency of one application on another
- caching
- parallelism
- incremental ci
Turborepo provides all the functionality by default. we can also create manually as well
npx create-turbo@latest my-monorepo
//command to initialize monorepo using turborepo
Understanding File Structure Of Monorepo
- The heart of the project which will be created is turbo.json it is the management tool we talked about earlier . (dont touch)