architecture-patterns

Apply Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to backend structures.

Updated Dec 20, 2023
One-click install
npx skills add https://github.com/Thiago-Cruz-eng/Hibrygame --skill architecture-patterns-thiago-cruz-eng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/Thiago-Cruz-eng/Hibrygame/tree/main/.claude/skills/architecture-patterns
Command: npx skills add https://github.com/Thiago-Cruz-eng/Hibrygame --skill architecture-patterns-thiago-cruz-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

It solves the problem of inconsistent, tightly coupled backend codebases that become hard to test, evolve, and scale over time.

Core Features & Use Cases

  • Architecture guidance for complex backends: Apply Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to reduce coupling and improve testability.
  • Practical structuring patterns: Use clear layer boundaries, ports/adapters contracts, and domain modeling tactics (entities, value objects, aggregates, events).
  • Refactoring and standards: Refactor monoliths toward maintainable structure and establish team-wide architecture conventions, including microservices decomposition planning.

Quick Start

Ask the AI to propose a Clean Architecture + Ports/Adapters directory structure and responsibilities for a backend refactor based on your current modules and the main domain entities.

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
How do I refactor a tightly coupled monolith into a maintainable backend structure?

To refactor a tightly coupled monolith, apply Clean Architecture and Hexagonal Architecture to establish clear layer boundaries and ports-and-adapters contracts. This enforces separation of concerns and dependency direction inward, replacing hard-to-test code with maintainable backend systems.

What is the best way to apply Domain-Driven Design to complex backend builds?

The best way to apply Domain-Driven Design is by using domain modeling tactics like entities, value objects, aggregates, and events. This creates a domain-centric structure that isolates business logic, ensuring your complex backend build remains testable and scalable.

How does hexagonal architecture enforce dependency direction and separation of concerns?

Hexagonal architecture enforces dependency direction inward by isolating the domain core from external concerns using ports-and-adapters contracts. This separation of concerns ensures business logic remains independent of infrastructure, making the backend highly testable.

Can I use clean architecture for microservices decomposition planning?

Yes, you can use clean architecture for microservices decomposition planning. By defining strict layer boundaries and domain modeling aggregates, you can establish team-wide architecture conventions that cleanly separate bounded contexts for scalable backend microservices.

When do I need ports and adapters contracts in a backend refactor?

You need ports and adapters contracts in a backend refactor when replacing tightly coupled designs to ensure clear separation of concerns. They define precise boundaries between your application core and infrastructure, making the system highly testable.