Skip to content

A Turborepo starter template with Next.js, Nextra, and a shared pre-configured shadcn/ui package, powered by Bun and Biome

License

Notifications You must be signed in to change notification settings

gmickel/turborepo-shadcn-nextjs

Repository files navigation

A Turborepo starter template with Next.js, Nextra, and a shared pre-configured shadcn/ui package, powered by Bun and Biome 🚀

Static Badge

Note

This repo uses bun as the package manager. 📦

How to use 🛠️

Clone the repository:

git clone https://github.com/gmickel/turborepo-shadcn-nextjs.git

Install dependencies:

cd turborepo-shadcn-nextjs
bun install

Add UI components ✨

Use the pre-made script:

bun ui:add:component <component-name>

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

What's inside? 🔍

This Turborepo includes the following:

Apps and Packages 📂

  • @repo/docs: a placeholder documentation site powered by Nextra 3 alpha 📚
  • @repo/web: the main Next.js web application 🌐
  • @repo/ui: core React components and design system shared by both web and docs applications (🚀 powered by shadcn/ui)
  • @repo/utils: shared React utilities 🛠️
  • @repo/tsconfig: shared tsconfig.jsons used throughout the monorepo 🛡️

Each package and app is 100% TypeScript. 💪

Utilities 🧰

This Turborepo has some additional tools already set up for you:

  • TypeScript for static type checking ✅
  • Biome for code linting, formatting, and fixing 🌿
  • Changesets for managing versioning, changelogs, and publishing 📝

Useful commands 🤖

  • bun build - Build all apps and packages
  • bun dev - Develop all apps and packages
  • bun dev:ui - Develop all apps and packages and display the output in Turbo's new experimental UI
  • bun lint - Lint and format all packages
  • bun lint:fix - Lint, format, and fix all packages
  • bun changeset - Generate a changeset 🚧 - WIP
  • bun clean - Clean up all node_modules and dist folders (runs each package's clean script)
  • bun ui:add:component - Add a shadcn/ui component to the @repo/ui package

Add a new app or package 📦

Turborepo offers a simple command to add new apps or packages to the monorepo. To add a new app, run the following command:

bun turbo gen workspace [--name <app-name>]

You will be prompted to choose the name and workspace type (app or package) to use.

You can copy an existing app or package with:

bun turbo gen workspace [--name <app-name>] --copy

You will be prompted to choose the name and workspace type (app or package) of the new app and which app or package to copy.

Note

Remember to run bun install after copying an app. ⚠️

Versioning and Publishing packages 📦

🚧 WIP

For more information, refer to the official Changesets documentation.

Useful Links and Thanks 🙏

Learn more about Turborepo:

Learn more about Next.js:

Learn more about Nextra:

Learn more about shadcn/ui:

Learn more about Bun:

Learn more about Biome:

Learn more about Changesets:

About

A Turborepo starter template with Next.js, Nextra, and a shared pre-configured shadcn/ui package, powered by Bun and Biome

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published