The overall architecture
One datastore supports two domain modules. Which conditions ensure a valid result?
Planners and time reviewers need a shared person identity.
Starting point The time account remains independent.
Assumptions for the example case
A fictional maintenance operation with a defined qualification for each shift. The example requires 11 hours of rest between planned shifts; this is an exercise assumption and does not replace an employment-law review. All quantities, thresholds and operational objectives are illustrative assumptions.
Planning API and synchronization
Planning API and synchronization
The interface and offline app use the authenticated API endpoint; planning and time records remain separate modules sharing a datastore.
Responsibilities within the application
Modules of the planning application
Staffing needs, eligibility, assignment and time records remain separate responsibilities within the same API process.
Runtime components and authoritative data
- Runtime boundary
- Planning interface and offline app → scheduling API → relational datastore. A synchronisation worker associates durably accepted device events; eligibility checks read versioned qualification evidence from an external register. Shift planning and time records are separate modules sharing the datastore.
- Module responsibilities
- Staffing planning maintains required qualifications and staffing levels. Eligibility checks verify qualification evidence and rest periods. Shift assignment protects confirmed intervals against conflicts. Time records preserve actual entries and corrections.
One datastore supports two domain modules.
The modules remain separate within the relational datastore.
Planners and time reviewers need a shared person identity.
Shift assignments and time accounts own different data. The API accepts input; the synchronisation worker associates device events.
- Alternative considered
- A common status mixes plan release and time release.
- Trade-off
- More states need to be explained.
- Reassess
- Independent load can justify later separation.
Try it yourself
Organize modules and processes.
A hint for your attempt
Planners and time reviewers need a shared person identity.
Compare with a possible solution
- Modules
- Shift assignment and time records own different data.
- Processes
- The API accepts input; the synchronisation worker associates device events.
Apply to your project
How does this principle apply in your own project: One datastore supports two domain modules.