architecture-patterns

Provides backend architecture guidance using Clean, Hexagonal, and Domain-Driven Design patterns.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/kegbi/monica-companion --skill architecture-patterns-kegbi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/kegbi/monica-companion/tree/main/.codex/skills/architecture-patterns
Command: npx skills add https://github.com/kegbi/monica-companion --skill architecture-patterns-kegbi

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Backend teams often struggle with maintaining consistency across services as systems grow. This skill provides proven patterns to structure software for maintainability and testability.

Core Features & Use Cases

  • Learn Clean Architecture, Hexagonal Architecture, and Domain-Driven Design with practical guidance.
  • Apply interface-driven design, clear boundaries, and domain modeling to real projects.
  • Use Case: Refactor a monolith into modular components with independent, testable layers.

Quick Start

Apply the three patterns (Clean Architecture, Hexagonal Architecture, and Domain-Driven Design) to structure a sample backend service in your project today.

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
What is the best way to refactor a monolith into modular backend components?

Domain-Driven Design helps structure backend systems by defining clear boundaries and domain modeling. Applying DDD principles allows you to isolate business logic into testable layers, improving maintainability and scalability as your services grow.

How do I structure a new backend system for maintainability and scalability?

To structure a scalable backend system, apply interface-driven design with patterns like Clean Architecture and Hexagonal Architecture. This separates core business logic from external dependencies, creating extensible and testable layers across your growing services.

When do I need Clean Architecture versus Hexagonal Architecture for my backend design?

Clean Architecture focuses on dependency inversion across concentric layers, while Hexagonal Architecture isolates domain logic through explicit ports and adapters. Both backend design patterns improve testability, but choosing depends on your specific boundary enforcement needs.

Can I use Hexagonal Architecture to establish backend architecture standards across multiple teams?

Yes, Hexagonal Architecture is effective for establishing architecture standards across teams. By enforcing interface-driven design and clear boundaries, multiple teams can consistently structure backend services to maintain testable and extensible systems.

How does Domain-Driven Design improve testability in backend architecture?

Domain-Driven Design improves testability by emphasizing strict layering and domain modeling. Isolating business logic through clear boundaries allows you to test independent layers without external dependencies, ensuring consistent behavior across services.