A comprehensive pnpm workspace with organized directory structure for scalable development.
├── apps/ # Main applications (web, mobile, desktop, CLI)
├── packages/ # Publishable packages and libraries
├── libs/ # Internal libraries and shared code
├── configs/ # Shared configuration files
├── docs/ # Project documentation
├── templates/ # Project templates and boilerplates
├── examples/ # Example applications and demos
├── services/ # Backend services and microservices
├── components/ # UI components and component libraries
├── utils/ # Utility functions and helpers
├── types/ # Shared TypeScript type definitions
├── schemas/ # Data schemas and validation definitions
├── tests/ # Shared test utilities and fixtures
├── scripts/ # Automation and build scripts
├── plugins/ # Custom plugins and extensions
└── themes/ # UI themes and styling packages
-
Install dependencies:
pnpm install
-
Build all packages:
pnpm build
-
Run tests:
pnpm test -
Start development:
pnpm dev
pnpm build- Build all packages (powered by Turbo)pnpm test- Run tests in all packages (powered by Turbo)pnpm lint- Lint all packages (powered by Turbo)pnpm dev- Start development mode (powered by Turbo)pnpm clean- Clean all packages (powered by Turbo)pnpm type-check- Type check all packages (powered by Turbo)pnpm install:all- Install all dependenciespnpm update:all- Update all dependencies
To add a new package to any workspace directory:
- Navigate to the appropriate directory (e.g.,
apps/,packages/, etc.) - Create your package directory
- Initialize with
pnpm init - The package will automatically be included in the workspace
The workspace is configured in pnpm-workspace.yaml with all directory patterns
included.
- Node.js >= 18.0.0
- pnpm >= 8.0.0