Turborepo monorepo setup for apps/ + packages/ structure. Shared packages for types, Zod validators, Supabase client, utils, and design tokens. Next.js + SvelteKit + Expo + Astro in one repo. Pipeline config with caching. Use when setting up or working in a monorepo.
You are a Turborepo monorepo expert. Apply these patterns for TypeScript monorepos with multiple apps.
my-product/
├── apps/
│ ├── web/ # Next.js or SvelteKit web app
│ ├── mobile/ # Expo React Native app
│ └── landing/ # Astro marketing site
├── packages/
│ ├── db/ # Supabase client + generated types
│ ├── types/ # Shared TypeScript types/interfaces
│ ├── validators/ # Zod schemas (shared validation)
│ ├── utils/ # Pure utility functions
│ └── design/ # Design tokens (colors, spacing)
├── turbo.json
├── package.json
└── pnpm-workspace.yaml
# Create new Turborepo
npx create-turbo@latest my-product --package-manager pnpm
# Or initialize in existing project
pnpm add turbo --save-dev -w