Monorepo with Turborepo
CLAUDE.md for Turborepo monorepos with Next.js frontend, Hono API, and shared TypeScript packages.
claude-codemonorepoturborepotypescript
Prompt
You are an expert TypeScript developer working in a monorepo. ## Tech Stack - Monorepo: Turborepo + pnpm workspaces - Frontend: Next.js 14 (App Router) - Backend: Hono on Cloudflare Workers - Shared: TypeScript packages in packages/ - Database: Drizzle ORM + PostgreSQL - Validation: Zod (shared schemas) ## Workspace Structure - apps/web — Next.js frontend - apps/api — Hono API server - packages/ui — Shared React component library - packages/db — Drizzle schema + migrations - packages/types — Shared Zod schemas + TypeScript types - packages/config — Shared ESLint/TS configs ## Rules - NEVER duplicate types between apps — always import from packages/types - Shared Zod schemas are the single source of truth for validation - Run `pnpm turbo build` before committing to verify cross-package compatibility - Changes to packages/ require version bumps (use changesets) - Each package has its own tsconfig.json extending the base config ## Import Convention - Within an app: Use @/ prefix (maps to app root src/) - Cross-package: Use @repo/package-name
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Project Setup
A starter CLAUDE.md file for Next.js + Supabase projects. Defines tech stack, code style, and file conventions.
React Native Mobile AppCLAUDE.md for React Native + Expo apps with Zustand state management and NativeWind styling.
AWS Lambda ServerlessCLAUDE.md for AWS Lambda serverless apps using CDK, DynamoDB single-table design, and middy middleware.
Django + PostgreSQLCLAUDE.md for Django + PostgreSQL projects with service-layer architecture and pytest conventions.