The goal of this boilerplate is to have repo setup for new projects in Nx workspaces without hassle of required configurations for each new project.
We have housed our projects inside apps
folder and all reusable components and configs inside libs
folder.
Since this repo is a boilerplate for using Shadcn with Next JS projects in Nx workspaces. You can get started with your projects fairly quickly. You can fork and re-use this repo for your projects. Doing so you may want to change some dictionary for your projects such as the project name etc. So, go ahead and do so.
Clone or Fork the repo git@github.com:arifshariati/nx-nextjs-shadcn-boilerplate.git
Run bellow commands to install dependencies.
npm i
npm run dev
is currently attached to sample-project
. You can add your own scripts in package.json
// spins sample-project on local
npm run dev
Entire Shadcn components have been added.
Shadcn
components are housed inside libs/ui/components/shadcn/src/lib
folder. For adding Shadcn components you can use regular component installation commands available on Shadcn website. Let's say we want to have Shadcn Button component,
npx shadcn-ui@latest add button
When you are ready to build your projects on top of it, you may want to edit some configs and dictrionary such as project name etc.
If you want to improve this repo, you are most welcome to do so. Raise your PR against main
branch and i will review it.