Personal pnpm + Turborepo layout I reuse when spinning up new projects. Not a template for public distribution—fork or copy and adjust names and apps as you like.
- Node ≥ 22
- pnpm 11.15.0 (
packageManagerin rootpackage.json)
pnpm install| Area | Description |
|---|---|
apps/web |
Next.js app |
packages/ui |
Shared React components |
@repo/config |
Oxlint + Oxfmt presets (details) |
@repo/ts-config |
Shared tsconfig bases |
TypeScript 7 is installed at the workspace root and used by package check-types scripts. Lint/format use shared Oxlint/Oxfmt presets (root configs + nested package configs).
apps/web pins a Next.js 16.3 canary and enables experimental.useTypeScriptCli in next.config.ts. That flag makes next build run the project-local tsc CLI, which is required while TypeScript 7 has no JavaScript compiler API for Next’s default checker. Drop back to a stable Next release once it includes this support, or keep the canary + flag while on TS 7.
From the repo root:
| Command | What it does |
|---|---|
pnpm dev |
Dev all apps/packages (Turbo) |
pnpm build |
Build all |
pnpm lint |
Lint all (Oxlint, type-aware from root config) |
pnpm format |
Format all (Oxfmt) |
pnpm check-types |
tsc all (Turbo) |
Target one package:
pnpm exec turbo dev --filter=@repo/web
pnpm exec turbo build --filter=@repo/web- Copy or clone the repo.
- Rename root
package.json/ workspace packages if you want. - Add apps under
apps/*, shared code underpackages/*. - Wire them in
pnpm-workspace.yaml(alreadyapps/*,packages/*).
Turborepo remote caching is optional. If you use Vercel:
pnpm exec turbo login
pnpm exec turbo link