Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Turborepo monorepo boilerplate with a Next.js app, shared React UI library, Tailwind CSS, and preconfigured ESLint and TypeScript settings.
Turborepo Boilerplate is a monorepo starter template powered by Turborepo that scaffolds a Next.js web application, a shared React component library, and centralized ESLint and TypeScript configurations. This boilerplate gives you a working multi-package repository structure out of the box so you can focus on writing application and library code instead of wiring up build tooling.
Turborepo Boilerplate is a GitHub-hosted monorepo template created by developer MahdiTa97 that uses Turborepo to manage two apps and packages under a single repository. As input, you clone the repository or run a create-turbo command; the output is a repository containing a Next.js app called web, a React component library called ui, shared @repo/eslint-config, shared @repo/typescript-config, and a Tailwind CSS setup that both apps and packages can use. The entire repository is written in 100% TypeScript, and it runs on any environment that supports Node.js and package managers like yarn or npm.
web app, ui package, and shared configuration packages, with the standard apps and packages directory layout.web app is a Next.js application styled with Tailwind CSS, ready for you to extend into a product, marketing site, or dashboard.ui package is a React component library built with Tailwind CSS, daisyui, and react-daisyui, shared by the Next.js apps in the monorepo.ui- prefix on its Tailwind classes so utility classes from the shared design system do not overwrite or conflict with application-level Tailwind styles.transpilePackages to consume the .tsx component files from the ui package directly, without requiring a separate build step for the library during development.@repo/eslint-config (including eslint-config-next and eslint-config-prettier) and @repo/typescript-config let you manage linting rules and TypeScript compiler options in one place.Turborepo Boilerplate is aimed at developers and teams who want to start a multi-package JavaScript or TypeScript project without manually assembling the Turborepo, Next.js, and Tailwind CSS configuration. It suits developers who are evaluating Turborepo as a monorepo tool, frontend teams who need a shared component library across multiple Next.js apps, and anyone who prefers a pre-configured Tailwind design system using daisyui components. The template is also useful for developers who want a reference implementation of the transpilePackages pattern for consuming internal packages directly from source.
ui package as a starting point for a component library that gets distributed with Tailwind styling and daisyui-based components.You can get started two ways: run npx create-turbo@latest -e with-tailwind to generate a new project from this example, or git clone https://github.com/MahdiTa97/turborepo-boilerplate followed by yarn install to use it directly. After cloning, you can rename the NPM organization scope @repo to your own scope by renaming folders in packages/*, searching and replacing repo with your chosen name, and re-running yarn install.
ui package uses a ui- prefix to avoid Tailwind class collisions between the component library and the consuming apps.@repo to your own name is a manual process, as the README notes: you must rename folders, search and replace the scope, and re-install dependencies.Run npx create-turbo@latest -e with-tailwind to generate a fresh project based on this example, or clone the repository directly with git clone https://github.com/MahdiTa97/turborepo-boilerplate and then run yarn install to set up dependencies.
ui- prefix do in the UI package?The ui package uses a ui- prefix on its Tailwind classes to ensure that Tailwind utility classes from the shared component library do not overwrite or clash with those used in the Next.js apps. This keeps the design system isolated while still letting both sides share the same Tailwind configuration.
Yes, but the process is manual. You need to rename the folders inside packages/* to replace repo with your desired scope, then search and replace repo throughout the codebase with the new scope, and finally re-run yarn install.
The repository includes a web Next.js app with Tailwind CSS, a ui React component library using Tailwind CSS, daisyui, and react-daisyui, plus @repo/eslint-config and @repo/typescript-config for shared linting and TypeScript settings.
Yes, each package and app is 100% TypeScript. TypeScript is used for static type checking, and shared TypeScript compiler options are defined in the @repo/typescript-config package.
