원클릭으로
clean-architecture
Clean Architecture: Layered architecture, dependency rule, use cases, business logic isolation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Clean Architecture: Layered architecture, dependency rule, use cases, business logic isolation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Bun runtime: HTTP server, file I/O, SQLite, test runner, package manager, bundler — all-in-one JS toolchain.
Clerk: Drop-in auth UI, Organizations, User management, JWT templates, webhooks, Next.js middleware integration.
Gelişmiş masaüstü, tarayıcı ve işletim sistemi kontrol yeteneği. Görsel (koordinat tabanlı) fare/klavye otomasyonu, DOM manipülasyonu, pencere yönetimi, gelişmiş dosya, ağ ve süreç yönetimini kapsar.
Drizzle ORM: Schema definition, type-safe queries, migrations, relations, Postgres/SQLite/MySQL support.
Expo Router v3: File-based navigation, layouts, tabs, modals, deep linking, API routes, typed routes.
Flutter ile oyun geliştirme (Flame Engine vb.) ve karmaşık, büyük ölçekli mimariler kurma rehberi.
| name | clean-architecture |
| description | Clean Architecture: Layered architecture, dependency rule, use cases, business logic isolation. |
| triggers | {"keywords":["architecture","layer","domain","use case","clean","dependency inversion"]} |
| auto_load_when | Designing system architecture or layers |
| agent | architect |
| tools | ["Read","Write","Bash"] |
Focus: Layer separation, dependency inversion, testable business logic
Layers (outer to inner):
├── Frameworks/Drivers (DB, UI, API clients)
├── Interface Adapters (Controllers, Presenters, Gateways)
├── Application Layer (Use Cases, DTOs)
└── Enterprise Business Rules (Entities)
Dependency Rule:
├── Outer layers depend on inner
├── Inner = business logic, no dependencies
└── Dependencies point inward (arrows toward entities)
Use when:
├── Complex business logic (not CRUD)
├── Long-term project (6+ months)
├── Multiple delivery teams
├── Testability is critical
├── Need to swap DB/UI frameworks
└── Domain changes frequently
Skip when:
├── Simple CRUD app
├── Quick prototype/MVP
├── Tight deadline
└── Single developer
Use Case Pattern:
├── Input: Request DTO (what caller sends)
├── Output: Response DTO (what caller receives)
├── Interface: Input/Output ports
├── Logic: Orchestrate domain objects
Naming: CreateUser, UpdateOrderStatus, CalculateShipping
How to inject:
├── Constructor injection (preferred)
├── Method injection (for optional deps)
└── Factory injection (complex creation)
Pattern:
├── Interface in domain (port)
├── Implementation in infrastructure (adapter)
└── Wiring in composition root (main/app)
Entity:
├── Has identity (ID)
├── Contains business logic
├── Can change over time
└── Lives in domain layer
DTO (Data Transfer Object):
├── No identity (just data)
├── No logic
├── For crossing boundaries
└── Lives in application layer
Domain Layer (innermost):
├── Entities (core business objects)
├── Value Objects (immutable, no identity)
├── Domain Services (complex logic)
└── Interfaces (ports)
Application Layer:
├── Use Cases (orchestration)
├── DTOs (data carriers)
└── Interfaces (output ports)
Infrastructure Layer:
├── Repositories (implementations)
├── External services (API clients)
└── Frameworks (DB, HTTP)
(End of file - 79 lines)
❌ Business logic in controllers/routes
✅ Logic lives in use cases and domain services
❌ Domain entities importing framework classes
✅ Domain layer has zero framework dependencies
❌ Repository implementations in domain layer
✅ Domain defines interfaces; infra implements them
❌ Anemic domain model (entities = just data bags)
✅ Rich domain model — entities enforce their own invariants
❌ Direct DB calls from UI/presentation layer
✅ Always go through use case → repository interface
| Concept | Where it lives | Rule |
|---|---|---|
| Business rules | Domain entities / services | No framework imports |
| Orchestration | Use cases (application layer) | Calls domain + repos |
| DB / HTTP | Infrastructure layer | Implements domain interfaces |
| DI wiring | Composition root | Once, at startup |
| Input validation | Application layer | Before reaching domain |
| Error types | Domain layer | No HTTP status codes inside |