Build Shared HMPPS Domain Services Where Appropriate
Outline
Where a digital service implements domain logic that is commonly applicable across HMPPS, build a separate application to provide common behaviour and a primary domain data store as a shared service.
Rationale
The HMPPS technical landscape contains a large amount of duplicated data and business logic. Older systems have traditionally implemented their own data capture, storage and business logic rather than integrate with other services. As we develop smaller, domain-scoped services we have the opportunity to better define the ownership and responsibility for both data and business logic associated with a domain. Where multiple digital services rely on behaviour and data linked to a domain then centralising this into a domain service helps to manage this in a single place with a single well-defined owner.

Implementation
- Use the HMPPS Digital Kotlin template as the starting point for your implementation of an HMPPS domain service