A production-ready monorepo starter with a NestJS API and a Next.js Web app, powered by pnpm workspaces and Turborepo.
| Layer | Technology |
|---|---|
| Package manager | pnpm with workspaces & catalog |
| Task runner | Turborepo |
| API | NestJS |
| Web | Next.js (App Router) |
| Styling | Tailwind CSS v4 |
| Linter & Formatter | Biome |
| Testing | Jest + ts-jest |
| Language | TypeScript |
monorepo/
├── apps/
│ ├── api/ # NestJS REST API
│ └── web/ # Next.js frontend (App Router)
├── packages/
│ └── config/ # Shared configs (TypeScript, Biome, Jest)
├── turbo.json
├── pnpm-workspace.yaml
└── package.json
# Clone the repository
git clone <your-repo-url>
cd monorepo
# Install all dependencies
pnpm installStart all apps in parallel (Turborepo will build shared packages first):
pnpm turbo start:devOr start each app individually:
# API only (http://localhost:3000)
pnpm --filter api start:dev
# Web only (http://localhost:3000)
pnpm --filter web start:devRun any of these from the root of the monorepo:
| Command | Description |
|---|---|
pnpm turbo start:dev |
Start all apps in dev/watch mode |
pnpm turbo build |
Build all packages and apps |
pnpm turbo lint |
Lint all packages |
pnpm turbo test |
Run all test suites |
pnpm turbo test:cov |
Run tests with coverage |
Shared configuration package consumed by all apps via workspace:*.
| Export | Description |
|---|---|
config/typescript |
Base tsconfig.json |
config/biome |
Base biome.json |
config/jest |
Base jest.config |
Copy .env.example to .env in each app and fill in the required values:
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.envShared dependency versions are centralized in pnpm-workspace.yaml under the catalog: key. To use a catalogued version in a package, set the version to "catalog:":
{
"devDependencies": {
"typescript": "catalog:"
}
}This project follows Conventional Commits. Please ensure your commit messages follow the pattern:
<type>(<scope>): <description>
Types: feat, fix, chore, docs, refactor, test, ci
Scopes: api, web, config, root