hexagonal-architect

Reorganize NestJS codebases into hexagonal architecture with ports and adapters.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/jorgeochipinti97/dublin-skills --skill hexagonal-architect-jorgeochipinti97
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexagonal-architect
Source: https://github.com/jorgeochipinti97/dublin-skills/tree/main/skills/architecture/hexagonal-architect
Command: npx skills add https://github.com/jorgeochipinti97/dublin-skills --skill hexagonal-architect-jorgeochipinti97

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Structure code so business logic is independent of frameworks, databases, and external services.

Core Features & Use Cases

  • Domain independence: domain logic remains decoupled from adapters and frameworks.
  • Ports, adapters, and DI: clear separation between input/output boundaries and implementation details.
  • Folder structure guidelines: template layouts for domain, application, infrastructure, and shared concerns.
  • Testing guidance: strategies for domain, application, and infrastructure layers.

Quick Start

Use hexagonal architecture to scaffold a NestJS project with ports, adapters, and DI.

Frequently Asked Questions about hexagonal-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate domain logic from external concerns using hexagonal architecture?

Hexagonal architecture isolates domain logic by organizing codebases around ports and adapters, enforcing inward dependencies so business rules remain decoupled from frameworks, databases, and external services.

What is the best way to structure a NestJS project with ports and adapters?

Structure a NestJS project using ports and adapters by applying folder templates for domain, application, infrastructure, and shared concerns, utilizing port-based dependency injection to separate input and output boundaries.

Can I use hexagonal architecture to refactor an existing codebase?

Yes, you can refactor existing codebases by reorganizing folders and dependency flows to match hexagonal architecture, shifting implementation details into adapters while protecting core domain logic from external changes.

What testing strategies work with ports and adapters architecture?

Ports and adapters architecture uses layer-specific testing strategies, allowing you to test domain logic independently, validate application use cases, and mock infrastructure adapters to isolate external dependencies.

Why does dependency flow matter in domain-driven design?

Dependency flow matters in domain-driven design because enforcing inward dependencies ensures your domain layer never references infrastructure, keeping business logic pure and swappable without modifying core rules.

When should I not use hexagonal architecture for software design?

Hexagonal architecture may be excessive for small or prototype projects, as the overhead of defining ports, adapters, and strict layer separation introduces complexity that outweighs the benefits of domain isolation in simple applications.