📄️ Domain Entity
Domain-Driven Design (DDD) is an approach to software development that puts the business domain at the center of your code. Rather than thinking in terms of database tables or HTTP endpoints, you model the real world: its concepts, its rules, its vocabulary.
📄️ Domain Events
In Domain-Driven Design, a Domain Event is a record that something meaningful happened in your domain.
📄️ Invariants
An invariant is a rule that must always be true about your entity — no matter what.
📄️ The Result Pattern
When an operation can fail, there are two common ways to communicate that failure to the caller: throw an exception, or return a value that represents the outcome.
📄️ Repository
In Domain-Driven Design, a Repository is the interface between your domain and your persistence layer. Its job is simple: store entities and retrieve them. Everything else — SQL queries, ORM mappings, connection pooling — is an implementation detail that your domain should never need to know about.