
What is an aggregate root?
An Aggregate Root is the root of an aggregate.
An aggregate is a cluster of domain objects that is treated as a single unit.
Any references from outside the aggregate should only go to a specific entry point to the aggregate, the root, so that root can ensure the integrity of the aggregate as a whole.
As an aggregate root is responsible for maintaining integrity of the whole, it is the primary responsible for deciding if a command can be executed on the aggregate or not.
These decissions can be recorded as an event on an event stream, while any internal state of the aggregate can be derived from the recorded events.