hexagonal-architecturelisted
Install: claude install-skill matiaspakua/notaire
# Hexagonal Architecture
Hexagonal architecture (Ports & Adapters) keeps business logic independent of
frameworks, transport, and persistence details. The core application depends
only on abstract ports; adapters implement those ports at the edges.
## When to Use
- Building new features where long-term maintainability and testability matter.
- Refactoring layered, framework-heavy code where domain logic is mixed with I/O concerns.
- Supporting multiple interfaces for the same use case (HTTP, CLI, queue workers, cron jobs).
- Replacing infrastructure (database, external APIs, message bus) without rewriting business rules.
- Teams adopting DDD principles without requiring full ubiquitous language / bounded contexts.
Use this skill when the request involves architectural boundaries,
domain-centric design, refactoring tightly coupled services, or decoupling
application logic from specific libraries.
## Core Concepts
- **Domain model**: business rules as entities/value objects. No framework imports.
- **Use cases (application layer)**: orchestrate domain behavior across workflow steps.
- **Inbound ports (driving/primary ports)**: contracts describing what the
application can do (commands/queries/use-case interfaces).
- **Outbound ports (driven/secondary ports)**: contracts for dependencies the
application needs (repositories, gateways, event publishers, clock, UUID
generation, etc.).
- **Inbound adapters**: translate a real transport (HTTP controller, CLI,
queue cons