Domain-Driven Design template with CQRS, value objects, idempotent commands, and a transactional outbox.