A modern monorepo template built with Next.js, Turborepo, and pnpm.
English | 简体中文
- Framework: Next.js
- Monorepo: Turborepo
- Package Manager: pnpm
- UI Components: Radix UI + Tailwind CSS
- Linting: Biome
- Storybook: Component documentation and testing
next-tp/
├── apps/
│ ├── web/ # Next.js web application
│ └── storybook/ # Storybook for component documentation
├── packages/
│ ├── ui/ # Shared UI components
│ └── tsconfig/ # Shared TypeScript configurations
└── package.json
- Node.js >= 22.x (recommended to use Volta for version management)
- pnpm >= 10.x
pnpm installcp apps/web/.env.example apps/web/.env.localEdit apps/web/.env.local and configure the required environment variables.
# Start all apps
pnpm dev
# Start only web app
pnpm --filter=web dev
# Start only storybook
pnpm --filter=storybook devpnpm build| Command | Description |
|---|---|
pnpm dev |
Start all apps in development mode |
pnpm build |
Build all apps for production |
pnpm lint |
Run Biome linter |
pnpm format |
Format code with Biome |
pnpm typecheck |
Run TypeScript type checking |
pnpm clean |
Clean all node_modules |
-
Environment Variables: Always copy
.env.exampleto.env.localbefore starting the web app. Never commit.env.localto version control. -
Playwright Browsers: If running Storybook tests for the first time, you need to install Playwright browsers:
pnpm exec playwright install -
Node Version: This project uses Node.js 22.x. If you're using Volta, it will automatically switch to the correct version.
MIT