It uses Turborepo to manage the monorepo. And contains:
.github
└─ workflows
└─ CI with pnpm cache setup
.vscode
└─ Recommended extensions and settings for VSCode users
apps
├─ landing
| ├─ Next.js 14
| ├─ Radix UI
| └─ Tailwind CSS
└─ dashboard
├─ Next.js 14
├─ Radix UI
└─ Tailwind CSS
packages
├─ design-system
| └─ Reusable components for the apps
| ├─ Radix UI
| └─ Tailwind CSS
└─ utils
└─ Utility functions
configs
├─ eslint
├─ github
├─ prettier
├─ tailwind
└─ typescript
To get it running, follow the steps below:
pnpm install
pnpm dev
pnpm build
To add a new package, simply run pnpm turbo gen init
in the monorepo root. This will prompt you for a package name as well as if you want to install any dependencies to the new package (of course you can also do this yourself later).
The generator sets up the package.json
, tsconfig.json
and a index.ts
, as well as configures all the necessary configurations for tooling around your package such as formatting, linting and typechecking. When the package is created, you're ready to go build out the package.
Let's deploy the Next.js application to Vercel. If you have ever deployed a Turborepo app there, the steps are quite straightforward. You can also read the official Turborepo guide on deploying to Vercel.
- Create a new project on Vercel, select the
apps/landing
orapps/dashboard
folder as the root directory and apply the following build settings:
The install command filters out the expo package and saves a few second (and cache size) of dependency installation. The build command makes us build the application using Turbo.
- Done! Your app should successfully deploy.
MIT License
© 2023 Wahyu Kurniawan