c4-level3-component
C4 Level 3: Component Diagram & Folder Mapping
Level 3 focuses on the internal architecture of a single container, bridging the gap between high-level containers and low-level code.
🎯 Stakeholder Focus
- Developers: Understanding internal module boundaries and dependencies.
- Architects: Ensuring proper layering and Separation of Concerns.
🛠 Folder Structure Mapping
Level 3 should ideally map to your folder structure:
- Controller/Handler: Maps to
src/api,internal/handler. - Service/Logic: Maps to
src/services,internal/usecase. - Repository/Data Access: Maps to
src/db,internal/repository. - Infrastructure Wrapper: Maps to
pkg/email,src/adapters.
🚫 Anti-Patterns to Guard (Level 3)
- OVER-DETAILING: Don't draw every class. Only draw major logical groupings.
- MIXING CONTAINERS: Focus only on ONE container at a time.
- CIRCULAR DEPENDENCIES: Level 3 is the best place to identify and fix tight coupling.
More from kinhluan/skills
ddd-tactical
Tactical Domain-Driven Design (DDD) with Scoring Rubric. Use this skill when designing internal domain models or performing architectural reviews to ensure domain logic is isolated and rich.
7scheduling-algorithms
Job scheduling algorithms for parallel and distributed systems
7ddd-core
Professional Strategic Domain-Driven Design (DDD) Hub. Use this skill for Event Storming, identifying Subdomains, defining Bounded Contexts, and mapping Domain Models to the heart of your architecture.
6security-analysis
Security vulnerability analysis and auditing procedures
6docker-containerization
Docker containerization best practices and patterns
6ddd-patterns
Advanced Domain-Driven Design (DDD) Integration Patterns. Use this skill for implementing CQRS, Event Sourcing, the Outbox Pattern, and Anti-Corruption Layers (ACL) in distributed systems.
6