Monorepo structure with Turborepo + Yarn workspaces, separating apps and packages
turborepo-boilerplate — Next.js Starter Template
By MahdiTa97
A Next.js monorepo starter template built on Turborepo and Yarn workspaces, featuring a ready-to-use shared UI package, daisyUI theming, shared Tailwind/ESLint/TypeScript configurations, and a CI pipeline for lint, type-check, and build.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Ready-to-use shared UI package @repo/ui, including daisyUI theming and components such as Card, Container, Navbar, and HeroLogin
Tailwind configuration centralized in @repo/tailwind-config, so theme changes apply to all applications
ESLint and TypeScript configurations provided as shared presets that applications extend as needed
GitHub Actions runs lint, type-check, and build on every push and PR
Dependabot is enabled to maintain dependency updates
Template Details
This is a monorepo starter template for Next.js applications, aimed at eliminating the repetitive configuration involved in sharing a design system across a monorepo. Built on Turborepo and Yarn workspaces, it extends Vercel's official create-turbo example with a functional shared UI package, a single source of truth for Tailwind configuration, unified ESLint and TypeScript presets, and a three-step CI pipeline covering lint, type-check, and build.
The repository is organized into apps and packages: apps/web is a Next.js application using the App Router, while packages contains ui (shared React components and daisyUI theming), tailwind-config (the sole configuration source for themes and plugins), eslint-config (two presets: next.js and library), and typescript-config (three tsconfig presets: base, nextjs, and react-library). Turbo runs scripts across apps/* and packages/* and caches the results.
The shared UI package @repo/ui is consumed directly from source; applications use transpilePackages to let Next.js compile its .tsx files, and the package's CSS is compiled separately to dist/index.css. Tailwind's content configuration must scan both the package's own source and the daisyUI and react-daisyui sources in node_modules; otherwise, the relevant class names will not generate styles. The template includes Card, Container, Navbar, and HeroLogin components, as well as Button and Theme components re-exported from react-daisyui.
Usage constraints: Node.js 20+ and Yarn 1.x are required; themes are modified centrally in packages/tailwind-config/tailwind.config.ts; when adding a new component library, its source paths must be added to the UI package's Tailwind content list; class names in the UI package are unprefixed by default, and if a second UI package is added later and isolation is needed, a prefix must be set consistently and class names updated accordingly.
Is it right for your project?
Use Cases
- When multiple Next.js applications need to share the same design system and theme
- When you want to manage lint, TypeScript, and Tailwind configurations centrally instead of duplicating them across applications
- When you need a working shared UI package as a starting point for a Turborepo monorepo
- When you want CI to include lint, type checking, and build processes by default
Suitable For
- Frontend teams using Next.js and React and planning a monorepo structure
- Multi-application projects that need a shared component library and unified theme configuration
- Developers who prefer Yarn 1.x and Turborepo workflows
- Projects that want to freely use, modify, and commercialize under the MIT license
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Requires Node.js 20+ and Yarn 1.x; the repository pins the Yarn version via the packageManager field
- 2
After cloning, run yarn install, then yarn dev; the web app runs at http://localhost:3000 by default
- 3
When adding a new app, copy apps/web's tsconfig.json, next.config.js, and tailwind.config.ts to hook into the shared configurations
- 4
When introducing a new component library into the UI package, add its source glob to the content list in packages/ui/tailwind.config.ts
- 5
Themes are modified in packages/tailwind-config/tailwind.config.ts under daisyui.themes
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version available in the public repository under the MIT license; the free scope applies to that version's code and does not imply that external services or third-party assets are free.
Must comply with when using
- You are free to use, modify, commercialize, and distribute the code of this version.
- When distributing copies or substantial portions of the code, retain the original copyright notice and the full MIT license notice.
- The code is provided as-is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- The runtime requires Node.js 20 or later and Yarn 1.x; the repository pins the Yarn version via the packageManager field, and this environment must be met before installation and startup.
- When introducing a new component library into the UI package, you must add that library's source paths to the content list in packages/ui/tailwind.config.ts; otherwise, its class names will not generate styles and components will render unstyled.
- Class names in the UI package are unprefixed by default; if a second UI package is added later and style isolation is needed, you must set a prefix consistently and update all class names under src/, while variants such as group-hover: remain unprefixed.
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; the code's MIT license alone is not sufficient to determine their status.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
Requires **Node.js 20+** and **Yarn 1.x** (a repo-managed `packageManager` field pins this).
Original README
If you add a component library to the UI package, add its glob here too — otherwise its classes compile to nothing and the component renders unstyled.
Original README
https://github.com/MahdiTa97/turborepo-boilerplate/blob/main/LICENSEhttps://github.com/MahdiTa97/turborepo-boilerplate/blob/main/README.mdIf you later add a second UI package and need isolation, set a prefix once:
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 92 / 100
- Technologies
- Next.js · React
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-10-01
- Screenshot last checked
- 2026-10-02
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: cc55f91ba597965563eff00966185630758d25e4ab5b35b8a7a5eacf4abf5516
2026-10-02T09:21:32.903Z
Source file / repository<div align="center">
# turborepo-boilerplate
**A production-ready monorepo starter for Next.js apps that share a design system.**
[](https://github.com/MahdiTa97/turborepo-boilerplate/stargazers)
[](https://github.com/MahdiTa97/turborepo-boilerplate/network/members)
[](./LICENSE)
[](https://github.com/MahdiTa97/turborepo-boilerplate/actions/workflows/ci.yml)
[](https://github.com/MahdiTa97/turborepo-boilerplate/commits/main)
</div>
---
Most monorepo starters give you a folder structure and call it a day. This one gives you
the boring parts **already solved**: shared UI with isolated Tailwind styles, one place to
change lint rules, one place to change TS config, and a build cache that makes the second
app you add almost free.
It's a superset of Vercel's `create-turbo` example — same Turborepo + Yarn workspace
foundation, plus a working `ui` package with daisyUI and Vercel's ESLint style guide wired in.
## Why use this over `create-turbo`
| | `create-turbo` | This starter |
| ----------------------------- | --------------- | ----------------------------------------------------------- |
| Shared UI package | stub | working, with daisyUI + 5 components |
| Tailwind config for a package | not set up | shared preset via `@repo/tailwind-config` |
| Lint config | default Next.js | [Vercel style guide](https://github.com/vercel/style-guide) |
| TS config | copied per app | shared presets, extended per app |
| CI | none | lint + type-check + build |
| Dependabot | manual | enabled |
## Stack
Next.js 15 · React 18 · TypeScript · [Turborepo](https://turbo.build/repo) · Yarn
workspaces · Tailwind CSS 3 · [daisyUI](https://daisyui.com/) · ESLint 8 ·
[Prettier](https://prettier.io/)
## Quick start
```sh
git clone https://github.com/MahdiTa97/turborepo-boilerplate.git
cd turborepo-boilerplate
yarn install
yarn dev
```
`web` is served on [http://localhost:3000](http://localhost:3000).
> Requires **Node.js 20+** and **Yarn 1.x** (a repo-managed `packageManager` field pins this).
## Repository layout
```
.
├── apps/
│ └── web/ # Next.js app (add more apps here)
│ └── src/app/ # App Router
└── packages/
├── ui/ # Shared React components + daisyUI theme
├── tailwind-config/ # Single source of truth for theme & plugins
├── eslint-config/ # next.js + library lint presets
└── typescript-config/ # base / nextjs / react-library tsconfigs
```
Turbo runs every script across `apps/*` and `packages/*` and caches the results.
## Scripts
Run from the repo root:
| Command | What it does |
| ----------------- | --------------------------------------------------------- |
| `yarn dev` | Start every app in watch mode (persistent, uncached) |
| `yarn build` | Build all packages then apps, respecting dependency order |
| `yarn lint` | ESLint across every workspace |
| `yarn type-check` | `tsc --noEmit` across every workspace |
| `yarn format` | Prettier + Tailwind class sorting |
| `yarn clean` | Remove build artifacts |
## Adding a second app
Apps are workspaces — there's no registry to update.
```sh
mkdir apps/admin && cd apps/admin
yarn create next-app . --typescript --tailwind --app --eslint
```
Then wire up the shared pieces by copying `apps/web/tsconfig.json`, `next.config.js` and
`tailwind.config.ts`. Because both apps share `@repo/ui` and `@repo/tailwind-config`,
Turborepo builds `@repo/ui` once and both apps consume the same cache entry.
## How the shared UI package works
`@repo/ui` is consumed **directly from source** — no build step between editing a component
and seeing it in the app:
```json
// packages/ui/package.json
"exports": {
".": "./src/index.tsx",
"./styles.css": "./dist/index.css"
}
```
This is what makes it instant:
1. Apps enable `transpilePackages: ["@repo/ui"]` in `next.config.js`.
2. Next.js compiles the `.tsx` files as part of the app build.
3. The package's CSS is compiled separately to `dist/index.css`, so Tailwind classes from
`packages/ui` are always in the compiled output.
### Where Tailwind's `content` globs come from
Tailwind only generates CSS for classes it can see in `content`. `packages/ui` therefore
scans its own source **and** the daisyUI / react-daisyUI source in `node_modules`:
```ts
// packages/ui/tailwind.config.ts
content: [
'./src/**/*.tsx',
'../../node_modules/daisyui/dist/**/*.js',
'../../node_modules/react-daisyui/dist/**/*.js',
],
```
If you add a component library to the UI package, add its glob here too — otherwise its
classes compile to nothing and the component renders unstyled.
### Styles are not prefixed
Classes in `@repo/ui` are written without a `ui-` prefix. The config is shared with the
apps, so a prefix would have to be applied consistently everywhere to be safe — and with a
single shared package it buys nothing.
If you later add a second UI package and need isolation, set a prefix once:
```ts
// packages/ui/tailwind.config.ts
const config = {
prefix: "ui-", // then update every class in src/ to match
/* … */
};
```
Remember `group-hover:` stays unprefixed — Tailwind prefixes the utility, not the variant.
## Theming
Change the theme in `packages/tailwind-config/tailwind.config.ts` and every app updates.
```ts
export default {
theme: {
extend: {
/* … */
},
},
plugins: [require("daisyui")],
daisyui: {
themes: ["emerald"], // any daisyUI theme
},
};
```
daisyUI's full theme list is in their [themes documentation](https://daisyui.com/themes/).
## Included components
| Component | Description |
| ----------------- | --------------------------------- |
| `Card` | Link card with hover transition |
| `Container` | Centered responsive container |
| `Navbar` | daisyUI navbar with dropdown menu |
| `HeroLogin` | Split hero + sign-in form layout |
| `Button`, `Theme` | Re-exported from `react-daisyui` |
Import from the package root:
```tsx
import { Card, Container, Navbar, Button } from "@repo/ui";
```
## Adding a lint rule
`@repo/eslint-config` exposes two presets — extend the right one:
| Preset | For |
| -------------------------------- | ------------------------ |
| `@repo/eslint-config/next.js` | Next.js apps |
| `@repo/eslint-config/library.js` | Plain TS/React libraries |
```js
// apps/web/.eslintrc.js
module.exports = { extends: ["@repo/eslint-config/next.js"] };
```
Both extend `@vercel/style-guide`, so you get consistent, opinionated rules out of the box.
## Adding a TypeScript preset
```jsonc
// apps/web/tsconfig.json
{
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": { "plugins": [{ "name": "next" }] }
}
```
Available presets: `base.json`, `nextjs.json`, `react-library.json`.
## CI
Every push and pull request runs lint, type-check and build:
```yaml
# .github/workflows/ci.yml
- run: yarn lint
- run: yarn type-check
- run: yarn build
```
Dependabot keeps dependencies current automatically.
## Requirements
- Node.js **20+**
- Yarn **1.x** (`corepack enable` if needed)
## License
[MIT](./LICENSE) — use it freely, including commercially.
## Contributing
Issues and pull requests are welcome. If you're adding a feature, please open an issue first
so we can agree on the direction — this repo is deliberately small and opinionated.
## Acknowledgements
- [Turborepo](https://turbo.build/repo) and the `create-turbo` example
- [daisyUI](https://daisyui.com/) and [react-daisyui](https://github.com/daisyui/react-daisyui)
- [Vercel style guide](https://github.com/vercel/style-guide)
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
