architecture-patterns

Design and refactor backend systems using Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.

Updated May 29, 2025
One-click install
npx skills add https://github.com/Joel-barriosnuevo/RockaEterna --skill architecture-patterns-joel-barriosnuevo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/Joel-barriosnuevo/RockaEterna/tree/main/.agents/skills/architecture-patterns
Command: npx skills add https://github.com/Joel-barriosnuevo/RockaEterna --skill architecture-patterns-joel-barriosnuevo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps architects and engineers design, organize, and refactor complex backend systems by applying proven patterns such as Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.

Core Features & Use Cases

  • Clean Architecture layering to separate core business logic from frameworks and infrastructure
  • Hexagonal Architecture with ports and adapters to enable interchangeable implementations
  • Domain-Driven Design concepts including bounded contexts, aggregates, and ubiquitous language
  • Guidance for project structure, testing strategies, and team alignment for scalable systems

Quick Start

Start by auditing an existing backend, define clear domain boundaries, map interactions with ports and adapters, and incrementally apply the patterns in a stepping-stone approach.

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
How do I separate core business logic from frameworks in a complex backend?

Clean Architecture separates core business logic from frameworks and infrastructure by organizing your backend into distinct layers. This approach ensures your domain rules remain testable and independent of external tools or database implementations.

What is the best way to refactor a monolithic backend into bounded contexts?

Applying Domain-Driven Design is the best way to refactor a monolithic backend by defining clear bounded contexts and establishing a ubiquitous language. This pattern isolates domain logic into manageable aggregates and aligns team boundaries.

How do ports and adapters work when designing interchangeable backend implementations?

Hexagonal Architecture uses ports and adapters to enable interchangeable backend implementations by defining standard interfaces for all external interactions. Adapters implement these ports, allowing you to swap databases or APIs without altering the core domain logic.

Can I incrementally apply architecture patterns to an existing backend system?

You can incrementally apply architecture patterns to an existing backend by auditing the current structure, defining domain boundaries, and mapping interactions through ports and adapters. This stepping-stone approach allows gradual refactoring without a full rewrite.

When should I use Hexagonal Architecture instead of standard layered architecture?

Use Hexagonal Architecture instead of standard layered architecture when you need strict framework-agnostic core code and easily swappable infrastructure components. It isolates the domain logic completely, whereas traditional layering often allows infrastructure dependencies to leak into the core.