Advice on monorepos
Answered
Tan posted this in #help-forum
TanOP
Hi all,
I recently came across next-forge, you probably heard about it, and after reading the docs I have to say that looks pretty hot:
- I can reuse the code in other apps
- Has really cool structure
- Also I like the observability features and the security packages
My use case:
- we use multirepo approach: 1 NextJS project, 1 Repo
- we have a single API service (Monlyth) used by a mobile app
This is how I would structure the monorepo project:
MY MONOREPO:
- website => the website of the company
- docs => the docs of the company
- api => used by mobile application
- app => 1 next js app
- /(analytics) => group for analytics from the DB only customers and admins can access
- /(admin) => group for handling all the DB stuff, only admin (CMS like)
- /(3Dexperienceapp) => group interactive app for running 3d experince
- /(modalapp) => app that can be integrated on other websites with iframe
- open-auth => centralised authentication for all apps
- widget => lit web component
- scanapp => capacitor.js, run on mobile
- serverapp => created in .NET
- unity3dapp => uses the api
- packages => shared library
- db
- ...
It's probably a lot but I have some questions:
- can I put other projects in monorepo, like .NET projects, Unity 3D projects?
- What if the monorepo explodes in size, how can I manage that?
- Can I have multiple frontends inside my monorepo?
- When do I know when it's right time to split the solution in a next js app? For instance analytics and admin I wanted to put them in 2 different apps initially: 1(analytics) is just viewing the analytics, the 2(admin) is to edit all the data form the DB like a CMS.
I would love to hear your take on this.
Best regards.
I recently came across next-forge, you probably heard about it, and after reading the docs I have to say that looks pretty hot:
- I can reuse the code in other apps
- Has really cool structure
- Also I like the observability features and the security packages
My use case:
- we use multirepo approach: 1 NextJS project, 1 Repo
- we have a single API service (Monlyth) used by a mobile app
This is how I would structure the monorepo project:
MY MONOREPO:
- website => the website of the company
- docs => the docs of the company
- api => used by mobile application
- app => 1 next js app
- /(analytics) => group for analytics from the DB only customers and admins can access
- /(admin) => group for handling all the DB stuff, only admin (CMS like)
- /(3Dexperienceapp) => group interactive app for running 3d experince
- /(modalapp) => app that can be integrated on other websites with iframe
- open-auth => centralised authentication for all apps
- widget => lit web component
- scanapp => capacitor.js, run on mobile
- serverapp => created in .NET
- unity3dapp => uses the api
- packages => shared library
- db
- ...
It's probably a lot but I have some questions:
- can I put other projects in monorepo, like .NET projects, Unity 3D projects?
- What if the monorepo explodes in size, how can I manage that?
- Can I have multiple frontends inside my monorepo?
- When do I know when it's right time to split the solution in a next js app? For instance analytics and admin I wanted to put them in 2 different apps initially: 1(analytics) is just viewing the analytics, the 2(admin) is to edit all the data form the DB like a CMS.
I would love to hear your take on this.
Best regards.
Answered by Yi Lon Ma
- Yes you can but then using turborepo for them won't give you an advantage as turborepo is primarily for JS apps
- monorepos surely are big in size but I've seen many monorepos(at work and on github) which are being maintained from years and is pretty okay to manage. You can check out [cal.com's repo](https://github.com/calcom/cal.com/)
- Yes
- you can do it right away
- monorepos surely are big in size but I've seen many monorepos(at work and on github) which are being maintained from years and is pretty okay to manage. You can check out [cal.com's repo](https://github.com/calcom/cal.com/)
- Yes
- you can do it right away
2 Replies
@Tan Hi all,
I recently came across **next-forge**, you probably heard about it, and after reading the docs I have to say that looks pretty hot:
- I can reuse the code in other apps
- Has really cool structure
- Also I like the observability features and the security packages
My use case:
- we use multirepo approach: 1 NextJS project, 1 Repo
- we have a single API service (Monlyth) used by a mobile app
This is how I would structure the monorepo project:
MY MONOREPO:
- website => the website of the company
- docs => the docs of the company
- api => used by mobile application
- app => 1 next js app
- /(analytics) => group for analytics from the DB only customers and admins can access
- /(admin) => group for handling all the DB stuff, only admin (CMS like)
- /(3Dexperienceapp) => group interactive app for running 3d experince
- /(modalapp) => app that can be integrated on other websites with iframe
- open-auth => centralised authentication for all apps
- widget => lit web component
- scanapp => capacitor.js, run on mobile
- serverapp => created in .NET
- unity3dapp => uses the api
- packages => shared library
- db
- ...
It's probably a lot but I have some questions:
- can I put other projects in monorepo, like .NET projects, Unity 3D projects?
- What if the monorepo explodes in size, how can I manage that?
- Can I have multiple frontends inside my monorepo?
- When do I know when it's right time to split the solution in a next js app? For instance **analytics **and **admin ** I wanted to put them in 2 different apps initially: 1(analytics) is just viewing the analytics, the 2(admin) is to edit all the data form the DB like a CMS.
I would love to hear your take on this.
Best regards.
- Yes you can but then using turborepo for them won't give you an advantage as turborepo is primarily for JS apps
- monorepos surely are big in size but I've seen many monorepos(at work and on github) which are being maintained from years and is pretty okay to manage. You can check out [cal.com's repo](https://github.com/calcom/cal.com/)
- Yes
- you can do it right away
- monorepos surely are big in size but I've seen many monorepos(at work and on github) which are being maintained from years and is pretty okay to manage. You can check out [cal.com's repo](https://github.com/calcom/cal.com/)
- Yes
- you can do it right away
Answer
TanOP
Thanks!!