CClaude Code Catalog
전체 패턴

CLAUDE.md 아키텍처 패턴

CLAUDE.md중급

CLAUDE.md 파일은 글로벌(~/.claude/CLAUDE.md), 프로젝트 루트, 하위 디렉토리 오버라이드의 계층 구조를 형성합니다. 이 패턴은 각 계층을 최대한 재사용할 수 있도록 구조화하는 방법을 보여줍니다 -- 글로벌은 개인 스타일과 안전 규칙, 프로젝트 레벨은 스택별 컨벤션, 디렉토리 레벨은 모듈별 제약 조건. monorepo, 마이크로서비스, 솔로 프로젝트를 위한 템플릿을 포함합니다.

CLAUDE.md설정아키텍처컨벤션

패턴 코드

# CLAUDE.md Layered Architecture ## Layer 1: Global (~/.claude/CLAUDE.md) ```markdown # Global Rules (apply to ALL projects) ## Safety - Never commit .env files or secrets - Never run destructive git commands without confirmation - Never modify files outside the current project ## Style - Use TypeScript strict mode - Prefer functional patterns over classes - Commit messages: imperative mood, <72 chars ## Communication - Respond in Korean, code in English - Use structured output (headings, lists, tables) ``` ## Layer 2: Project Root (./CLAUDE.md) ```markdown # Project: E-Commerce Platform ## Stack - Runtime: Node.js 20 + TypeScript 5.4 - Framework: Next.js 15 (App Router) - Database: PostgreSQL 16 + Drizzle ORM - Testing: Vitest + Playwright ## Conventions - API routes: src/app/api/[resource]/route.ts - Components: PascalCase, co-located tests - Database migrations: drizzle-kit generate ## Forbidden - Do NOT use any ORM other than Drizzle - Do NOT add runtime dependencies without checking bundle size - Do NOT modify shared types in src/types/ without updating all consumers ``` ## Layer 3: Subdirectory (./src/components/CLAUDE.md) ```markdown # Component Rules - Every component must have a .test.tsx file - Use compound component pattern for complex UI - Props interface must be exported separately - Storybook story required for design-system components ``` ## Resolution Order 1. Subdirectory CLAUDE.md (most specific) 2. Project root CLAUDE.md 3. Global CLAUDE.md (least specific) - More specific rules override general ones - Safety rules from global always apply

이 패턴을 프로젝트 설정에 복사하여 적용하세요.

실행 미리보기

CLAUDE.md 아키텍처 패턴

CLAUDE.md 아키텍처 패턴에 대해

Claude Code 패턴은 복잡한 개발 시나리오를 효과적으로 다루기 위한 검증된 아키텍처 설계와 워크플로우 구조입니다. CLAUDE.md 아키텍처 패턴은(는) 중급 수준의 CLAUDE.md 패턴으로, 프로젝트에 맞게 응용할 수 있는 테스트된 반복 가능한 접근 방식을 제공하여 더 효율적이고 일관된 결과를 만들어 냅니다.

관련 패턴