proyecto26/projectx · Archived

turborepo

Turborepo monorepo management. Use when working with workspaces, build pipelines, caching, or monorepo-wide operations.

First seen Jan 25, 2026

Installation

$ npx skills add proyecto26/projectx --skill turborepo

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from proyecto26/projectx.

npx skills add proyecto26/projectx

Browse all from proyecto26/projectx

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 83
License LICENSE
Default branch develop
Open issues 1
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Grep, Glob, Edit, Write, Bash(pnpm:*), Bash(turbo:*)

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 5,287 B
  • docs SUMMARY.md 136 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 5 installs

SKILL.md

Turborepo Monorepo Guide

Project Structure

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 Configuration

// 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"]
    }
  }
}

Common Commands

Development

# 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

Building

# 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

Testing

# Run all tests
pnpm test

# Test specific package
pnpm --filter web test
pnpm --filter @projectx/ui test

Filtering

# 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]

Package Dependencies

Internal Package References

In package.json:

{
  "dependencies": {
    "@projectx/ui": "workspace:*",
    "@projectx/db": "workspace:*",
    "@projectx/models": "workspace:*"
  }
}

Creating a New Package

  1. Create directory:
mkdir -p packages/new-package/src
  1. Initialize package.json:
{
  "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"
  }
}
  1. Add to workspace consumer:
{
  "dependencies": {
    "@projectx/new-package": "workspace:*"
  }
}

Creating a New App

  1. Create directory:
mkdir -p apps/new-app/src
  1. Initialize with NestJS or React Router template
  1. Add to turbo.json if needed for custom pipelines

Caching

Local Caching

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

Remote Caching (Optional)

# Login to Vercel for remote caching
turbo login

# Link to project
turbo link

Task Graph

View the task dependency graph:

turbo run build --graph

Environment Variables

Global Environment

// turbo.json
{
  "globalEnv": ["DATABASE_URL", "STRIPE_SECRET_KEY"],
  "globalDependencies": [".env"]
}

Task-Specific Environment

{
  "tasks": {
    "build": {
      "env": ["NODE_ENV"]
    }
  }
}

Best Practices

  1. Use workspace protocol - Always use workspace:* for internal deps
  2. Keep packages focused - Each package should have a single responsibility
  3. Minimize dependencies - Don't create unnecessary inter-package dependencies
  4. Use turbo filters - Run commands only where needed
  5. Cache outputs - Configure outputs correctly in turbo.json
  6. Share configs - Use shared tsconfig, eslint configs
  7. Consistent naming - Use @projectx/ scope for all packages

Troubleshooting

Dependency Issues

# Clean and reinstall (cross-platform)
npx rimraf node_modules pnpm-lock.yaml
pnpm install

Build Order Issues

# See what turbo will build
turbo run build --dry-run

# Force rebuild without cache
turbo run build --force

Type Issues

# Regenerate TypeScript build info
pnpm build:core
pnpm build:ui
pnpm build