Blazity/next-enterprise

Suggestion: Monorepo

lveillard opened this issue · 3 comments

First of all, great job!

Would be amazing to have this as a boilerplate (or an equivalent) adapted to a monorepo.

Tailwind configuration, absolute paths… there are a lot of things that require hours of configuration. Mixing the good picks of this boilerplate with a monorepo structure.

Hi, thanks!

That was actually a first plan, using a Turborepo and splitting all configuration, UI packages, and stuff like that into separate packages/apps. But I ditched that idea since I figured that not all projects require monorepo and many will find that confusing/with overly increased complexity.

Monorepo would make a lot of sense if we decided to add a backend server to it, then we could create a package for shared types/interfaces etc. But for most projects I think, having monorepo where there is only a single app would be more tiring than helpful.

I prefer taking the easier route when it comes to technology, but I am truly open to suggestions regarding this because I spent lots of time thinking whether to include this or not, so if you have some pros/cons that I skipped I would love to discuss them 🖖🏻

Things like library configs can get very complicated when you work with monorepos (specially tailwind and storybook... where's the right place to put them?), but IMHO they make you split the code better.

As your product grows, so does the number of reusable and utility code you have to share between the different parts. Addressing that since the beginning instead of having to refactor later is a good practice IMHO.

It would also make this repo template easier to use for library authors like me, since we often need monorepos.

Anyway I appreciate the effort you've put in this project and It will be a good reference for me :)