This is a Turborepo monorepo starter template that pairs a Next.js web application with a Nextra documentation site and a shared shadcn/ui component package, all run through the Bun runtime. It is a boilerplate for teams that want a preconfigured, type-safe monorepo with testing, linting, Storybook, and CI already in place.
What is Turborepo Shadcn Nextjs?
Turborepo Shadcn Nextjs is a monorepo starter built on Turborepo, combining a Next.js web app, a Nextra documentation site, a shared shadcn/ui component library, and a Storybook app into one codebase. It uses Bun as the package manager and runtime, Biome for linting and formatting, Vitest for unit tests, and Playwright for end-to-end tests. The template was created by Gordon Mickel and is published under the MIT license.
The repository contains five workspaces: @repo/web (Next.js app), @repo/docs (Nextra 3 alpha docs site), @repo/ui (shared shadcn/ui components), @repo/utils (shared React utilities), and @repo/tsconfig (shared TypeScript configs). Every app and package is written entirely in TypeScript.
Key Features
The template bundles a complete toolchain and several ready-to-run workspaces. The main capabilities are:
- Turborepo monorepo — Efficient build system and caching across all apps and packages; new workspaces are scaffolded with
bun turbo gen workspace. - Shared shadcn/ui package — The
@repo/uipackage is preconfigured with shadcn/ui; runbun ui:add:componentand pass the component name to add components, mirroring the shadcn/ui CLI. - Next.js web app —
@repo/webis a Next.js application that deploys to Vercel without extra configuration. - Nextra documentation site —
@repo/docsuses Nextra 3 alpha for markdown-driven documentation with a developer-friendly workflow. - Bun-powered workflows — All scripts use Bun, including
bun devfor development,bun buildfor building, andbun dev:uifor Turborepo's experimental UI. - Testing stack — Vitest handles unit tests with coverage reports (
bun test:cov), and Playwright runs end-to-end tests (bun test:e2e). - Storybook integration — Storybook is configured to find stories in
apps/storybook,apps/web, andpackages/ui, with addons for links, essentials, onboarding, interactions, themes, and styling. - Preconfigured CI — A GitHub Actions workflow runs setup, install, build, unit tests, e2e tests, and lint on every push or pull request to the main branch.
Who is it for?
This starter suits developers who want a working monorepo skeleton with a design system and CI already connected. It fits these roles:
- Startup engineers — Scaffold a product website and documentation site in one repo without manually wiring up a shared design system.
- Frontend infrastructure teams — Standardize on a shared shadcn/ui component library across Next.js applications, with Storybook for isolated component review.
- Open-source maintainers — Use the included Dependabot config, auto-merge workflow for patch updates, and automated contributors list to reduce maintenance overhead.
What can you do with Turborepo Shadcn Nextjs?
With the preconfigured workspaces, you can go from clone to deployed web and docs apps quickly. Typical uses include:
- Ship a marketing site plus docs together — Put the public site in
apps/weband the documentation inapps/docs, both consuming the same@repo/uicomponents. - Develop UI components in isolation — Use the included Storybook instance to iterate on components from both the web app and the shared UI package before integration.
- Automate dependency updates — Enable the Dependabot configuration and auto-merge workflow to keep dependencies current with minimal manual effort.
How does it work?
Start by cloning the repository, running bun install, and then bun dev to launch all workspaces. To extend the monorepo, use bun turbo gen workspace to create a new app or package, or add --copy to duplicate an existing one. The included GitHub Actions workflow validates builds, tests, and linting automatically on every push.
Pricing
Free — the template is open source under the MIT license, and all included tools (Turborepo, Bun, Next.js, Vitest, Playwright, Storybook, Biome) are free to use or open source.
Alternatives
- Turborepo's official starter — A minimal monorepo base from Vercel without a preconfigured shared shadcn/ui library or Storybook setup.
FAQ
Is this template free to use?
Yes, this repository is published under the MIT license, so you can freely clone, modify, and use it in commercial projects. The underlying tools and libraries are also open source.
How do I add new shadcn/ui components?
Run bun ui:add:component from the repo root and pass the component name. This command works like the shadcn/ui CLI and adds the component source directly into the @repo/ui package.
Can I deploy the included apps?
Yes, the web and docs apps deploy to Vercel without additional configuration, and the Storybook app is automatically published to GitHub Pages via the included storybook-deploy.yml workflow.
What tools are preconfigured for testing?
Vitest is set up for unit tests, with coverage reports available via bun test:cov, and Playwright handles end-to-end tests via bun test:e2e. The CI workflow runs both automatically.
Does it support TypeScript?
Every app and package is written in TypeScript, and the monorepo includes a shared @repo/tsconfig package for consistent compiler settings across workspaces.





