architecture-paradigm-hexagonal

Featured

Applies hexagonal architecture isolating domain from infrastructure. Use when designing systems where testability and port/adapter separation are priorities.

AI & Automation 323 stars 29 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# The Hexagonal (Ports & Adapters) Paradigm ## When To Use - Isolating business logic from external dependencies - Systems needing swappable adapters for testing ## When NOT To Use - Small scripts or utilities without external dependencies - Prototypes where port/adapter abstraction adds overhead ## When to Employ This Paradigm - When you anticipate frequent changes to databases, frameworks, or user interfaces and need the core domain logic to remain stable. - When testing the core application requires mocking complex or slow infrastructure components. - When the development team needs to provide clear inbound and outbound interfaces for third-party integrations. ## Adoption Steps 1. **Define Domain Ports**: Identify all interactions with the core domain. Define inbound "driver ports" for actors that initiate actions (e.g., UI, CLI, automated jobs) and outbound "driven ports" for services the application consumes (e.g., database, message bus, external APIs). Express these ports as formal interfaces. 2. **Implement Adapters at the Edge**: For each external technology, create an "adapter" that implements a port's interface. Keep the core domain entirely ignorant of the specific frameworks or libraries used in the adapters. 3. **Aggregate Use Cases**: Organize the application's functionality into services that are built around business capabilities. These services orchestrate calls to the domain through the defined ports. 4. **Implement Contract Testing**: validate that e...

Details

Author
athola
Repository
athola/claude-night-market
Created
8 months ago
Last Updated
today
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category