They're much easier to discover and see what you can do. And it's a plugin for VS code, called NX Console.
So to start off, I'm just going to create an NX workspace. I'm going to say, create npx, create NX workspace, and then the organization name. This could be whatever organization. And again, you're going to have all your applications and your libraries in one place. So name that appropriately.
And then it's going to ask you, oh, what do you want to put the first application there? What kind of application do you want it to be? And I'm going to choose Next.js, because it's awesome. This is going to be, let's just say, my marketing website, or something that's going to be my first application.
Now don't get scared about this thing. I'm going to run all through these, and then I'm going to show you what I made. So these commands are basically just, I'm going to create another application. I'm going to do nxg, which is short for generate. I'm going to use the Next.js plugin to create another app called Uber for Star, because I don't know what I'm making, it's just a demo here. And then I'm going to use the Next.js plugin again to add a page, which is a Next.js concept, to that Uber 4, and I'm going to call it this dashboard.
Then I'm going to create a shared library, which is going to be shared components, which both the marketing site and the Uber 4 Star are going to use. Then I'm going to add some components to that library. Then I'm going to use our storybook plugin to configure storybook for that shared components library to get sort of a design system up and running. And then I'm just going to use NxServe to serve my Uber 4 app. And let me show you what kind of that gives me.
So this is sort of a splash page that you're going to get on here. You'll note we added that dashboard page, so I've got that dashboard page. It's empty now, but it's basically, it's all set up for you. We've got storybook all set up for you. And this is great, storybook has like a ton of things you can add. It's sandbox development for each of the components, as well as like, you can add documentation and a whole design system here. Let me show you some of the code real quick. We've got, you know, here's our workspace. And like I said, there's sort of a split of our products into apps and libs. And apps is your applications, libs is your shared libraries.
Comments