Skip to content

Bitgune/monorepo

Repository files navigation

Turborepo Next.js starter

This is a starter Turborepo with Next.js and shadcn/ui pre-configured.

Usage

Install dependencies:

cd monorepo
npm install

Build

To build all apps and packages, run the following command:

npm run build

Develop

To develop all apps and packages, run the following command:

npm run dev

Develop a specific app

To develop a specific app, run the following command:

npm run dev <app-name>

The available apps are shop and web.

Add ui components

Use the pre-made script:

npm run ui:add <component-name>

This works just like the add command in the shadcn/ui CLI.

Add a new app

Turborepo offer a simple command to add a new app:

npx turbo gen workspace --name <app-name>

This will create a new empty app in the apps directory.

If you want, you can copy an existing app with:

npx turbo gen workspace --name <app-name> --copy

Note

Remember to run npm install after copying an app.

What's inside?

This monorepo includes the following packages/apps:

Apps and Packages

  • shop: a Next.js app with Tailwind CSS
  • web: another Next.js app with Tailwind CSS
  • @monorepo/ui: a stub React component library shared by both web and shop applications (🚀 powered by shadcn/ui)
  • @monorepo/eslint-config: eslint configurations (includes prettier configuration as well)

Utilities

This monorepo has some additional tools already setup for you:

Remote Caching

Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:

cd monorepo
npx turbo login

This will authenticate the Turborepo CLI with your Vercel account.

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:

npx turbo link

Useful Links

Learn more about the power of Turborepo:

Learn more about shadcn/ui:

About

Monorepo starter with Turborepo and shadcn/ui pre-configured.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published