← Docs/Recipes
Recipe

Turborepo Setup

Scaffold a monorepo with shared packages, parallel pipelines, and remote caching in under five minutes.

Prerequisites

  • Node.js 18+ and pnpm 8+ installed globally
  • Vercel account for remote caching (optional)
  • Basic familiarity with package.json workspaces

Step 1 — Bootstrap

pnpm dlx create-turbo@latest

Choose the “basic” template. This gives you apps/web, apps/docs, and a shared packages/ui.

Step 2 — Configure pipeline

Open turbo.json. Define build, lint, and dev tasks with dependsOn so shared packages build first.

Step 3 — Remote cache

npx turbo login
npx turbo link

Link to your Vercel team. CI builds will share cache artifacts — no more redundant work across machines.

Step 4 — Run

pnpm dev

Turborepo starts all apps in parallel. Shared packages rebuild on change automatically.

Pro tip

Add --filter to scope commands to a single app. Example: pnpm dev --filter=web.