Watch
Domain Modeling Made Functional - Scott Wlaschin - KanDDDinsky 2019
Shows how to model a domain with types (choice types, constrained values, explicit states) so that business rules are visible in code and invalid data cannot be constructed.
Engineering Fundamentals for the Agent Era
A lifecycle modeled as scattered booleans (isPaid, isShipped, isCancelled) that allows impossible combinations such as shipped but never paid.
A rule enforced in the main code path and skipped in the bulk import, the admin tool or the background job.
One 'user' object stretched to mean customer, administrator and billing contact, so a change for one breaks the others.
Naming the things in the problem, their lifecycles and the rules that must always hold, so code and tests can enforce them.
An agent modeled subscriptions with the fields isActive, isTrial, isCancelled and isPastDue. Find a combination of values that the business says is impossible, then redraw the model as a state machine that cannot represent it.
Watch
Shows how to model a domain with types (choice types, constrained values, explicit states) so that business rules are visible in code and invalid data cannot be constructed.
Refactors a model built from loose fields and booleans into union types step by step, the exact fix for the isActive/isTrial/isCancelled drill.
The originator of domain-driven design explains ubiquitous language and bounded contexts, including why one word such as 'user' should mean different things in different contexts.
A modern, compact introduction to ubiquitous language, bounded contexts, aggregates and where invariants are enforced, written for working developers.
Teaches encoding lifecycles as state types and constraints as wrapper types, making illegal states unrepresentable; the ideas carry directly to TypeScript discriminated unions.
The original source for entities versus value objects, aggregates as invariant boundaries, and bounded contexts.
Reference
Explains why checking a rule once and passing raw data along lets the bulk import or admin path skip it, and how parsing into a stronger type makes the invariant hold everywhere.
Reference
A short, canonical definition of bounded contexts with the example of one term meaning different things in sales and support.