Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.13 KB

CLAUDE.md

File metadata and controls

61 lines (41 loc) · 2.13 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build & Development Commands

All commands run from the repository root via Turbo:

  • pnpm dev — Start dev server (Next.js with Turbopack)
  • pnpm build — Build all packages
  • pnpm lint — ESLint across workspace
  • pnpm format — Prettier formatting
  • pnpm typecheck — TypeScript type checking

No test framework is configured yet.

Architecture

Turbo monorepo with pnpm workspaces:

  • apps/web — Next.js 16 app (App Router, React 19, Server Components by default)
  • packages/ui — Shared component library using shadcn/ui with CVA variants
  • packages/eslint-config — Shared ESLint configs (base, next.js, react-internal)
  • packages/typescript-config — Shared tsconfig presets (base, nextjs, react-library)

Path Aliases

  • @/* — Resolves to apps/web/src/* or packages/ui/src/* (context-dependent)
  • @workspace/ui/* — References the shared UI package
  • @workspace/eslint-config/* — References shared ESLint configs

Component Patterns

  • shadcn/ui components live in packages/ui/src/components/
  • Use cn() from @workspace/ui/lib/utils for class merging (clsx + tailwind-merge)
  • CVA for type-safe component variants with Radix UI Slot for polymorphism
  • Client components must be marked with "use client"

Styling

  • Tailwind CSS v4 with PostCSS (@tailwindcss/postcss)
  • OKLch color variables defined in packages/ui/src/styles/globals.css
  • Dark mode via next-themes with class strategy
  • Tailwind plugin functions: cn, cva

Code Style

Enforced by Prettier (.prettierrc):

  • Double quotes, no semicolons, trailing commas (ES5)
  • 80 character line width, LF line endings
  • Tailwind class sorting enabled

TypeScript strict mode with noUncheckedIndexedAccess.

Key Config Locations

  • turbo.json — Task pipeline definitions
  • apps/web/next.config.mjs — Transpiles @workspace/ui
  • apps/web/components.json / packages/ui/components.json — shadcn/ui CLI config
  • packages/ui/src/styles/globals.css — Theme variables and Tailwind base styles