clean-architecture

Solid

Provides implementation patterns for Clean Architecture, Domain-Driven Design (DDD), and Hexagonal Architecture (Ports & Adapters) in NestJS/TypeScript applications. Use when structuring complex backend systems, designing domain layers with entities/value objects/aggregates, implementing ports and adapters, creating use cases, or refactoring from anemic models to rich domain models with dependency inversion.

AI & Automation 278 stars 32 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
81
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Clean Architecture, DDD & Hexagonal Architecture for NestJS ## Overview This skill provides comprehensive guidance for implementing Clean Architecture, Domain-Driven Design (DDD), and Hexagonal Architecture patterns in NestJS/TypeScript applications. It covers the architectural layers, tactical patterns, and practical implementation examples for building maintainable, testable, and loosely-coupled backend systems. ## When to Use - Architecting complex NestJS applications with long-term maintainability - Refactoring from tightly-coupled MVC to layered architecture - Implementing rich domain models with business logic encapsulation - Designing testable systems with swappable infrastructure - Creating microservices with clear bounded contexts - Separating business rules from framework code - Implementing event-driven architectures with domain events ## Instructions ### 1. Understand the Architectural Layers Clean Architecture organizes code into concentric layers where dependencies flow inward. Inner layers have no knowledge of outer layers: ``` +-------------------------------------+ | Infrastructure (Frameworks, DB) | Outer layer - volatile +-------------------------------------+ | Adapters (Controllers, Repositories)| Interface adapters +-------------------------------------+ | Application (Use Cases) | Business rules +-------------------------------------+ | Domain (Entities, Value Objects) | Core - most stable +-----------------------------...

Details

Author
giuseppe-trisciuoglio
Repository
giuseppe-trisciuoglio/developer-kit
Created
7 months ago
Last Updated
5 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category