This demo models a document-centric backend workflow where a business document must pass through a controlled lifecycle before reaching a final state.
The focus is not on UI polish but on backend structure, rules, and safety — the kind required in approval flows, compliance systems, and external integrations.
Domain core: Document
At the center of the system is a Document as a domain entity, not a database record.
Each document:
Has a clearly defined lifecycle
Enforces valid state transitions
Records who can act on it, and when
Produces an audit trail for every meaningful change
This makes the system predictable and safe to extend.
Lifecycle & state machine
The document follows a strict lifecycle, for example: