A modern TypeScript monorepo starter template using Turborepo, Bun, Biome, and NestJS.
- Bun - Fast all-in-one JavaScript runtime, package manager, and test runner
- Turborepo - High-performance monorepo build system
- Biome - Fast formatter and linter (replaces ESLint + Prettier)
- NestJS - Progressive Node.js framework for building server-side applications
- Next.js - React framework for web applications
- TypeScript - Type-safe JavaScript (ESNext target)
| App | Description | Port |
|---|---|---|
api |
NestJS backend API | 3000 |
web |
Next.js web application | 3000 |
docs |
Next.js documentation site | 3001 |
| Package | Description |
|---|---|
@repo/nest-lib |
Shared NestJS services and modules |
@repo/ui |
Shared React component library |
@repo/typescript-config |
Shared TypeScript configurations |
- Bun v1.3.0 or later
bun install# Run all apps in development mode
bun run dev
# Run specific app
bun run dev -- --filter=api
bun run dev -- --filter=web# Build all packages and apps
bun run build
# Build specific app
bun run build -- --filter=api# Run tests (uses Bun's built-in test runner)
cd apps/api && bun test
# Watch mode
cd apps/api && bun run test:watch
# E2E tests
cd apps/api && bun run test:e2e# Check for issues
bun run lint
# Auto-fix issues
bun run lint:fix
# Format code
bun run format# Clear Turborepo cache
bun run clean
# Nuclear clean (removes node_modules, dist, .next, cache files)
bun run clean:allturbobun/
├── apps/
│ ├── api/ # NestJS API
│ ├── docs/ # Next.js docs
│ └── web/ # Next.js web app
├── packages/
│ ├── nest-lib/ # Shared NestJS modules
│ ├── ui/ # Shared React components
│ └── typescript-config/
├── biome.json # Biome configuration
├── turbo.json # Turborepo configuration
└── package.json # Root workspace config
Configured with:
- Single quotes, no semicolons, no trailing commas
- Import sorting enabled
- Parameter decorators enabled (for NestJS)
- Auto-format on save (VS Code settings included)
- Target:
ESNext - Module:
nodenext - Strict mode enabled
- Decorator metadata enabled (for NestJS DI)
- Stream UI mode (classic colored output)
- Build caching with proper dependency ordering
dist/**outputs for NestJS packages
The .vscode/settings.json is configured for:
- Format on save with Biome
- Auto-organize imports on save
Install the Biome extension for the best experience.
- Create the package in
packages/orapps/ - Add a
package.jsonwith the appropriate name:- Apps: simple name (e.g.,
api,web) - Packages: scoped name (e.g.,
@repo/my-lib)
- Apps: simple name (e.g.,
- Add build/dev scripts as needed
- Run
bun installto link the workspace
MIT