domain-driven-design

Solid

DDD tactical patterns for complex business modeling including entities, value objects, aggregates, domain services, repositories, specifications, and bounded contexts. Python dataclass implementations with TypeScript alternatives. Use when building rich domain models, enforcing invariants, or separating domain logic from infrastructure.

AI & Automation 188 stars 15 forks Updated today MIT

Install

View on GitHub

Quality Score: 86/100

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

Skill Content

# Domain-Driven Design Tactical Patterns Model complex business domains with entities, value objects, and bounded contexts. ## Overview - Modeling complex business logic - Separating domain from infrastructure - Establishing clear boundaries between subdomains - Building rich domain models with behavior - Implementing ubiquitous language in code ## Building Blocks Overview ``` ┌─────────────────────────────────────────────────────────────┐ │ DDD Building Blocks │ ├─────────────────────────────────────────────────────────────┤ │ ENTITIES VALUE OBJECTS AGGREGATES │ │ Order (has ID) Money (no ID) [Order]→Items │ │ │ │ DOMAIN SERVICES REPOSITORIES DOMAIN EVENTS │ │ PricingService IOrderRepository OrderSubmitted │ │ │ │ FACTORIES SPECIFICATIONS MODULES │ │ OrderFactory OverdueOrderSpec orders/, payments/ │ └─────────────────────────────────────────────────────────────┘ ``` ## Quick Reference ### Entity (Has Identity) ```python from dataclasses import dataclass, field from uuid import UUID from uuid_utils import uuid7 @dataclass class Order: """Entity: Has identity, mutable state, lifecycle.""" id: UUID = field(default_factory=uuid7) customer_id: UUID = field(default=None) status: str = "...

Details

Author
yonatangross
Repository
yonatangross/orchestkit
Created
5 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category