One-click install
npx skills add https://github.com/Ikki-Group/erp --skill architecture-patterns-ikki-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/Ikki-Group/erp/tree/main/.agents/skills/architecture-patterns
Command: npx skills add https://github.com/Ikki-Group/erp --skill architecture-patterns-ikki-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Architecture patterns provide a structured approach to designing backend systems, enabling maintainable, testable, and scalable software by applying Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.

Core Features & Use Cases

  • Provide clear guidance on structuring domain models, use cases, and adapters to enforce inward dependencies.
  • Include concrete examples of directory structures, ports, and adapters to help teams implement robust architectures in microservices or monoliths.
  • Help diagnose and resolve dependency cycles between layers, and support testability with in-memory or unit tests.

Quick Start

Start by identifying a service boundary and applying the three patterns (Clean, Hexagonal, and DDD) to define domain boundaries, ports/adapters, and testing strategy.

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
How do I structure a backend using clean architecture and domain-driven design?

Hexagonal architecture, or ports and adapters, isolates domain logic by defining ports for external interactions and adapters for implementations. It enforces inward dependencies, keeping the core domain independent of infrastructure, which improves testability and maintainability.

How do I resolve dependency cycles between architecture layers?

To resolve dependency cycles between architecture layers, enforce strict inward dependencies by restructuring domain models and use cases. Ensure adapters depend inward toward the domain, preventing outer layers from circular references, and validate the structure using in-memory unit tests.

What is the best way to organize directories for a hexagonal architecture project?

The best way to organize directories for a hexagonal architecture project is to group code by layers: separate directories for domain models, ports, and adapters. This structure clarifies boundaries and supports maintainable systems in both microservices and monoliths.

Can I use these architecture patterns for both microservices and monoliths?

Yes, you can apply clean architecture, hexagonal architecture, and DDD to both microservices and monoliths. The patterns provide concrete examples for structuring ports and adapters, ensuring robust architectures regardless of your system's deployment scale.

How do I test domain logic when using ports and adapters?

To test domain logic when using ports and adapters, write in-memory or unit tests that target the core domain without external dependencies. This approach leverages the enforced inward dependencies, allowing you to validate use cases independently of infrastructure adapters.