TypeScript Monorepo
CLAUDE.md for a Turborepo monorepo
Score: AA root CLAUDE.md that maps the workspace, points to per-app files, and encodes filter-first turbo usage and codegen order.
# CLAUDE.md - Nova (Turborepo monorepo) ## Map - `apps/web` - Next.js app (see apps/web/CLAUDE.md for app-specific rules) - `apps/api` - Hono API (see apps/api/CLAUDE.md) - `packages/ui` - shared components; `packages/db` - Drizzle schema + client - `packages/config` - shared eslint/tsconfig; extend it, never fork it ## Commands ```bash pnpm turbo run build # cached; safe to run repeatedly pnpm turbo run test --filter web # scope to one workspace while iterating pnpm turbo run lint typecheck # repo gates, must pass before PR pnpm --filter @nova/db generate # after any schema change in packages/db ``` ## Conventions - Internal imports only through package entries (`@nova/ui`), never deep paths into another workspace's `src/`. - Internal versions are `workspace:*`; changesets handle publishing. - New shared code: if two apps need it, it moves to `packages/` - don't copy between apps. ## Workflow - Start scoped: `--filter <workspace>` keeps turbo cache hits high and output readable. Only run the full graph before pushing. - Schema edits in `packages/db`: change schema, regenerate, then fix type errors that surface in dependent apps - in that order. ## Do not - Do not edit `packages/db/src/generated/` (codegen output). - Do not add runtime dependencies at the repo root. - Do not disable turbo caching to "make sure it runs" - change the task inputs.
These examples are released under CC0. Use them freely, no attribution required. They are provided as is, without warranty of any kind: review and adapt them to your project before use, as you are responsible for the outcome of applying them.
Bring PromptArch to your team
Deploy PromptArch as an internal tool across every area of your company. Get team accounts with shared preloaded credits and custom domains tailored to your organization.
Contact Us