Turborepo monorepo management. Use when working with workspaces, build pipelines, caching, or monorepo-wide operations.
projectx/
├── apps/ # Applications
│ ├── auth/ # NestJS auth service
│ ├── order/ # NestJS order service
│ ├── product/ # NestJS product service
│ ├── storybook/ # Component documentation
│ └── web/ # React Router frontend
├── packages/ # Shared packages
│ ├── core/ # @projectx/core - NestJS shared modules
│ ├── db/ # @projectx/db - Prisma client
│ ├── email/ # @projectx/email - Email templates
│ ├── models/ # @projectx/models - TypeScript types
│ ├── payment/ # @projectx/payment - Stripe
│ ├── ui/ # @projectx/ui - React components
│ └── workflows/ # @projectx/workflows - Temporal
├── turbo.json # Turborepo config
├── pnpm-workspace.yaml # Workspace definition
└── package.json # Root package
// turbo.json
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": [".env"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**", "build/**"]
},
"dev": {
"cache": false,
"persistent": true
},
"test": {
"dependsOn": ["build"],
"inputs": ["src/**", "test/**"]
},
"lint": {
"dependsOn": ["^build"]
}
}
}
# Run all apps in development
pnpm dev
# Run specific app
pnpm dev:web
pnpm dev:auth
pnpm dev:order
pnpm dev:product
# Run Storybook
pnpm storybook
# Build all packages and apps
pnpm build
# Build specific targets
pnpm build:web
pnpm build:ui
pnpm build:auth
# Build with turbo filter
turbo run build --filter=web
turbo run build --filter=@projectx/ui
# Run all tests
pnpm test
# Test specific package
pnpm --filter web test
pnpm --filter @projectx/ui test
# Build a package and its dependencies
turbo run build --filter=web...
# Build dependents of a package
turbo run build --filter=...@projectx/ui
# Build everything except one package
turbo run build --filter=!storybook
# Build changed packages since main
turbo run build --filter=[main]
In package.json:
{
"dependencies": {
"@projectx/ui": "workspace:*",
"@projectx/db": "workspace:*",
"@projectx/models": "workspace:*"
}
}
mkdir -p packages/new-package/src
{
"name": "@projectx/new-package",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"scripts": {
"build": "tsup src/index.ts --format esm --dts",
"dev": "tsup src/index.ts --format esm --dts --watch"
}
}
{
"dependencies": {
"@projectx/new-package": "workspace:*"
}
}
mkdir -p apps/new-app/src
Initialize with NestJS or React Router template
Add to turbo.json if needed for custom pipelines
Turbo caches build outputs locally in node_modules/.cache/turbo.
# Clear local cache
turbo run build --force
# View cache status
turbo run build --dry-run
# Login to Vercel for remote caching
turbo login
# Link to project
turbo link
View the task dependency graph:
turbo run build --graph
// turbo.json
{
"globalEnv": ["DATABASE_URL", "STRIPE_SECRET_KEY"],
"globalDependencies": [".env"]
}
{
"tasks": {
"build": {
"env": ["NODE_ENV"]
}
}
}
workspace:* for internal deps@projectx/ scope for all packages# Clean and reinstall (cross-platform)
npx rimraf node_modules pnpm-lock.yaml
pnpm install
# See what turbo will build
turbo run build --dry-run
# Force rebuild without cache
turbo run build --force
# Regenerate TypeScript build info
pnpm build:core
pnpm build:ui
pnpm build
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer