Having dealt with non monorepo development in 2 previous jobs, I cannot stress how much more productive working with a monorepo is. The hardest part is getting a monorepo organized and working. So thanks Jack for putting this video together demonstrating how to do this with NX. Great content as usual!
Thanks for bringing this to my attention, coming over from the .NET world it has always felt like there was some kind of solution equivelent missing. Going to have a more in depth play with this and present it the team!
We started with lerna monorepos for our next.js and react projects. For a while it was fine, but it quickly became a nightmare. All the deps linking, hmr, typescript etc. are really difficult to get right. Now we are moving our project to Nx. Thanks for this awesome video, helped us a lot in our decision making.
Same situation for my last project. I was tasked with creating and maintaining a monorepo. Decided on TypeScript / React, Lerna, and Rollup to assist with CommonJS (for Node) and ES module (for bundlers) builds. As you mentioned, Lerna was amazing until we started adding additional repos / sub-modules and the symlinks started becoming broken and unstable. How many times did you have to run `lerna clean && lerna bootstrap` to fix all the symlinks? Lol... Switched to NX and it couldn't be easier!
Started checking your videos a few weeks ago and can't stop seeing them! Would like to see a transformation of a repo to a monorepo using Nx. Seems it could be quite cool to transform some monoliths to monorepos
Hey Jack, Thank you for sharing this fantastic video. I have a question, we want to implement Mono-repo for our project, but we also wish to implement Module-federation in this Mono-repo project. Based on your experience, will it be a good decision?
It really depends on your requirements. I'm pretty conservative when it comes to my architectures. For example, it should be a regular repo until you get more than one application and those applications need to share code, then make it a mono-repo. It should just be regular NPM sharing of code until you have an overwhelming need to use a runtime dependency structure and then you should use Module Federation (or some other technology). Requirements should drive tech choices, not the other way around.
First of all, thank you so much 🙏. Now can you please make one video on how to structure Nx workspace for a large enterprise application. Like domain specific lib , feature lib and shared lib. Each module scoping. How to structure for big applications. Will be great for architecture wise. Thank you 😊
We'll see how this one does. That would be a long video which takes a lot to produce. It sounds great, but I want to make sure there would be an audience for it.
@@jherr sure sir definitely. If someone want to achieve monorepo and good micro frontend architecture, I think Nx is a great platform. I will be waiting. Thank so much. Learned a lot from your channel.
@@sourishdutta9600 If you do write about it, do me a solid and link to this video, and maybe together we can get Nx to connect with us and help get the word out. I'm down with the enterprise architecture thing, I'd LOVE to talk about that, I'd LOVE to do the work to get Module Federation working in Nx and show that off. But doing all that then getting a couple hundred views is kinda... ugh.
If you liked the canned project setups from NX then I would definitely still use it. If I was looking for something less opinionated I would go for Turborepo.
If I have one react project written using react-create-app and another project with vue2 which are in two different git's, is it possible to migrate to NX monorepo? Your video explains how to create new projects, but not an existing one
Never thought this would have been so much easier to work with compared to Lerna monorepo. Great content as always Jack. Although seems like you missed something about the thing you mentioned as a single version policy through different apps using the same dependencies. Wanna see that in action for sure.
@jack : Can you please make one more descriptive video about NX, covering react application with different/distinct modules....telling us whats difference between lib and component....when to use lib and when to use component....
Don't the Nx Console for Visual Studio... amazing. And you can also show how to "protect" you libraries from deep imports using lint and tsconfig. And finally `nx graph` is amazing to show you library dependences.
When I create React components, I like giving the files names that correspond with the component names. Is it possible to configure NX to name React files this way?
Sorry, I was a bit lazy :) I found the answer to this in the docs. Just supply --pascalCaseDirectory true and/or --pascalCaseFiles true when generating components
This is super nice, but it forces you to the use there library only (unless there is a way to decouple stuff). I would suggest that you check out typescript project references.
Why is it so bad to use their library? Any project you build is going to depend on many other tools and toolsets to get things done. So, why is this one a sticking point?
Hey Jack - I love the videos, thanks for all your time and effort that you put into them! Do you have any experience building a monorepo with rush? I am curious how NX won you over.
Love your channel and how you are able to demonstrate and explain concepts. I've learned so much by watching and your videos. Regarding mono repos with Nx, how would you compare that to using yarn workspaces, or packages? It seems Nx does so much more for you, but I'm new to this...
Probably. Would definitely like to do one on Module Federation if we can get that set up. Angular would be interesting, I haven't done Angular in a dogs age. Also, oooo... Like a project that has both react and react-native apps using a shared set of components? Or at least shared API logic? I've wanted to see that IRL forever. Your thoughts?
@@jherr I think maybe a fullstack react(next.js) - express would be a good showcase of the NX, because without a monorepo, is hard to manage shared code between front and back!
@@denilsoncosta9837 I like that, and I actually got exactly that question ("How do I share types between the front end and back end?") just recently. So that would be good. Thank you for the inspiration! And for being a viewer.
I feel extremely uncomfortable being dependent on a single company for 40 plugins just to make my monorepo work. Especially when many of those are community maintained. They also seem to have no mention of docker.
I'm not affiliated with NX, but I'm not as concerned. It's just the build and dependency mechanics. I wouldn't be depending on them for APIs. If I decided to jump ship I'd just have to pull out the dependencies and do the wiring myself. Which, the last time I did it, was about 2-3 hours worth of work and another maybe eight hours over the first couple months.
not affiliated either but there is a maintained plugin for docker (nx.dev/nx-community) and I can vouch that the docker side works fine without the plugin (which I haven't tried). there's always some risk when a company is involved of course, but that's also the case for most OSS afaik. the gh does show constantly increased development (github.com/nrwl/nx/graphs/contributors) which is promising for its future (🤞).
Having dealt with non monorepo development in 2 previous jobs, I cannot stress how much more productive working with a monorepo is. The hardest part is getting a monorepo organized and working. So thanks Jack for putting this video together demonstrating how to do this with NX. Great content as usual!
Glad to you see your Nx video Jack. It's probably my favorite piece of tooling these days, with a very lively slack.
Thanks for posting this. Seems way easier to use than Rush. Going to be trying this out and hopefully standing up some work projects with it!
Thanks for bringing this to my attention, coming over from the .NET world it has always felt like there was some kind of solution equivelent missing. Going to have a more in depth play with this and present it the team!
We started with lerna monorepos for our next.js and react projects. For a while it was fine, but it quickly became a nightmare. All the deps linking, hmr, typescript etc. are really difficult to get right. Now we are moving our project to Nx. Thanks for this awesome video, helped us a lot in our decision making.
Same situation for my last project. I was tasked with creating and maintaining a monorepo. Decided on TypeScript / React, Lerna, and Rollup to assist with CommonJS (for Node) and ES module (for bundlers) builds. As you mentioned, Lerna was amazing until we started adding additional repos / sub-modules and the symlinks started becoming broken and unstable. How many times did you have to run `lerna clean && lerna bootstrap` to fix all the symlinks? Lol... Switched to NX and it couldn't be easier!
Jack, I just want to say Thank you, all your contents are awesome and useful, I love them and look forward to each one. Keep up the great work!
its amazing how Jack can put so much great content in less than 10 minutes! thanks man, i really love your channel!
Started checking your videos a few weeks ago and can't stop seeing them! Would like to see a transformation of a repo to a monorepo using Nx. Seems it could be quite cool to transform some monoliths to monorepos
Used this to help learn NX! Thank you
Hey Jack, Thank you for sharing this fantastic video.
I have a question, we want to implement Mono-repo for our project, but we also wish to implement Module-federation in this Mono-repo project.
Based on your experience, will it be a good decision?
It really depends on your requirements. I'm pretty conservative when it comes to my architectures. For example, it should be a regular repo until you get more than one application and those applications need to share code, then make it a mono-repo. It should just be regular NPM sharing of code until you have an overwhelming need to use a runtime dependency structure and then you should use Module Federation (or some other technology). Requirements should drive tech choices, not the other way around.
First of all, thank you so much 🙏. Now can you please make one video on how to structure Nx workspace for a large enterprise application. Like domain specific lib , feature lib and shared lib. Each module scoping. How to structure for big applications. Will be great for architecture wise. Thank you 😊
We'll see how this one does. That would be a long video which takes a lot to produce. It sounds great, but I want to make sure there would be an audience for it.
@@jherr sure sir definitely. If someone want to achieve monorepo and good micro frontend architecture, I think Nx is a great platform. I will be waiting. Thank so much. Learned a lot from your channel.
@@sourishdutta9600 If you do write about it, do me a solid and link to this video, and maybe together we can get Nx to connect with us and help get the word out. I'm down with the enterprise architecture thing, I'd LOVE to talk about that, I'd LOVE to do the work to get Module Federation working in Nx and show that off. But doing all that then getting a couple hundred views is kinda... ugh.
@@jherr I have not done yet. I will surely do sir. I got your point 😊 thank you so much.
manfred steyer has some talks/books showing microfrontends with Nx. mostly for angular I think.
thank you for this nice tutorial Jack .....really really nice
5:48 how do you select the text so easily? Do you press something on the keyboard? Or is it an option that can be enabled on MacOS?
NX! Fantastic idea! Thanks for the video. Angular and Nx are very good couple by the way ;)
Hi Jack, would you still recommend using NX in 2022 for monorepos? Would you recommend other libraries instead?
If you liked the canned project setups from NX then I would definitely still use it. If I was looking for something less opinionated I would go for Turborepo.
@@jherr thank you! I'll try turborepo too, plus it seems to be the recommended tool for monorepos in Vercel docs. Thanks so much for your great work!
thanks for great content can you please tell extension u r using to highlight branch name
Mulțumim!
If I have one react project written using react-create-app and another project with vue2 which are in two different git's, is it possible to migrate to NX monorepo? Your video explains how to create new projects, but not an existing one
Never thought this would have been so much easier to work with compared to Lerna monorepo. Great content as always Jack. Although seems like you missed something about the thing you mentioned as a single version policy through different apps using the same dependencies. Wanna see that in action for sure.
Great walkthrough!
Would you recommend a package-based or integrated mono-repo?
@jack : Can you please make one more descriptive video about NX, covering react application with different/distinct modules....telling us whats difference between lib and component....when to use lib and when to use component....
Thanks for another great video!
Very nice video, thanks!
Thank you for the informative videos.
Super cool! Thank you!
Don't the Nx Console for Visual Studio... amazing.
And you can also show how to "protect" you libraries from deep imports using lint and tsconfig.
And finally `nx graph` is amazing to show you library dependences.
high quality genuine content
When I create React components, I like giving the files names that correspond with the component names. Is it possible to configure NX to name React files this way?
Sorry, I was a bit lazy :) I found the answer to this in the docs. Just supply --pascalCaseDirectory true and/or --pascalCaseFiles true when generating components
Thank you Jack, i learnt a lot from ur videos.
Great video Jack! 👍
At work, we use Lerna and gulp (legacy)
really great content!
Awesome Vid, No BS on TS
Thanks for putting such amazing content!
This is super nice, but it forces you to the use there library only (unless there is a way to decouple stuff).
I would suggest that you check out typescript project references.
Why is it so bad to use their library? Any project you build is going to depend on many other tools and toolsets to get things done. So, why is this one a sticking point?
You have a new subscriber. Keep up the quality videos.
Hey Jack - I love the videos, thanks for all your time and effort that you put into them! Do you have any experience building a monorepo with rush? I am curious how NX won you over.
I hand rolled my own lerna repo a few months back. I tried rush a while ago but it didn't grab me. What do you like about it?
very helpful!!!!!!
love your channel.
waiting for big project using react ts :)
Very nice demonstration! Subscribing!
Could we see a monorepo setup with Turborepo?
Nx is awesome
thank you, great video
awesome!!!
Love your channel and how you are able to demonstrate and explain concepts. I've learned so much by watching and your videos. Regarding mono repos with Nx, how would you compare that to using yarn workspaces, or packages? It seems Nx does so much more for you, but I'm new to this...
AFAIK NX sits on top of that to provide additional tooling.
Genius👌👌
Can't thank you enough 🙏
Are there full tutorials on Monorepo ?
Awesome!
full nx tutorial?
YT likes comments and I love your content. 😀 Win win!
will you bring more videos about NX?
Probably. Would definitely like to do one on Module Federation if we can get that set up. Angular would be interesting, I haven't done Angular in a dogs age. Also, oooo... Like a project that has both react and react-native apps using a shared set of components? Or at least shared API logic? I've wanted to see that IRL forever.
Your thoughts?
@@jherr I think maybe a fullstack react(next.js) - express would be a good showcase of the NX, because without a monorepo, is hard to manage shared code between front and back!
@@denilsoncosta9837 I like that, and I actually got exactly that question ("How do I share types between the front end and back end?") just recently. So that would be good. Thank you for the inspiration! And for being a viewer.
@@jherr Always here!
@@jherr +1 for the react-native + react!!
thanks
I love it. :D
Wow, what is thattt? so cool
I feel extremely uncomfortable being dependent on a single company for 40 plugins just to make my monorepo work. Especially when many of those are community maintained. They also seem to have no mention of docker.
I'm not affiliated with NX, but I'm not as concerned. It's just the build and dependency mechanics. I wouldn't be depending on them for APIs. If I decided to jump ship I'd just have to pull out the dependencies and do the wiring myself. Which, the last time I did it, was about 2-3 hours worth of work and another maybe eight hours over the first couple months.
not affiliated either but there is a maintained plugin for docker (nx.dev/nx-community) and I can vouch that the docker side works fine without the plugin (which I haven't tried). there's always some risk when a company is involved of course, but that's also the case for most OSS afaik. the gh does show constantly increased development (github.com/nrwl/nx/graphs/contributors) which is promising for its future (🤞).
Where is deploy part ? Why all urs video NX multiple apps not talking about deploy apps
There are lots of different ways/services to deploy apps. Plus, I kinda rely on folks to read the deployment docs for their platform/service.
Great video, thanks 😊