DDD artifacts
The strategic and tactical design of dock-scheduling follows the ddd-crew tools. Each page below is checked against the code of this repository: every Mermaid diagram carries a Source: line naming the files it was drawn from, and where the yard design model in the central documentation site and the code differ, the code wins and the page says so.
Source: internal/domain/, internal/application/, internal/adapters/, migrations/, apis/, ADR 0001 and ADR 0002.
| Page | What it holds | ddd-crew tool |
|---|---|---|
| Ubiquitous language | Dock appointment, door window, door calendar, closure, arrival status, no-show, SCAC, CPT and the neighbour terms, with the Go identifier of each | glossary |
| Core domain chart | Why the context is Supporting, with its internal slices | core-domain-charts |
| Bounded context canvas | Purpose, classification, roles, every inbound and outbound message, assumptions | bounded-context-canvas |
| Context map | Every upstream and downstream neighbour with its pattern and channel | context-mapping |
| Aggregate design canvas | DockAppointment and DockCalendar: states, invariants, commands, events | aggregate-design-canvas |
| Domain message flow | Booking, arrival to completion, late ETA and no-show, closure and ASN cancellation | domain-message-flow-modelling |
| EventStorming | Process-level boards with hotspots and how each was settled | eventstorming-glossary-cheat-sheet |
| Class diagram | Domain types and the hexagonal ports and adapters | UML |
| Entity relationship | The Postgres schema (OLTP and analytics) | ER |
| Sequence diagrams | One runtime sequence per command use case | UML |
| Domain events | The fourteen published and ten consumed events with full CloudEvents types | event catalogue |
Also in this section: Use cases (one section per command: trigger, inputs, invariants, errors, events) and Subdomain classification.
In numbers (from the code)
| Item | Count | Where |
|---|---|---|
| Aggregates | 2: DockAppointment (5 states: BOOKED, CHECKED_IN, COMPLETED, CANCELLED, NO_SHOW), DockCalendar | Aggregate design canvas |
| Command use cases | 16 (eight on DockAppointment, four on DockCalendar, four on Carrier) | Use cases |
| Published events | 14 (10 integration plus analytics twin, 4 analytics only) | Events |
| Consumed events | 10 from four upstream topics | Events |
| REST routes | 13 business routes plus /healthz, /readyz, /metrics on the API; 2 report routes on the reports binary | API reference |
| ADRs | 12 | ADR index |