UML Diagram for the DDD Example in Evans' Book
This project uses UML diagrams to illustrate the structure and behavior of the DDD example—a cargo shipping system—from Eric Evans' book (Domain-Driven Design: Tackling Complexity in the Heart of Software). These diagrams are created based on the source code of the dddsample-core project on GitHub. The diagrams aim to help us understand how the example implements the strategic and tactical designs of DDD and the mechanisms by which it operates.
If you want to get into DDD theory, check out Evans' book. If you want to get into the implementation details, check out the source code of the dddsample-core project. Also, if you want to understand the UML model behind these diagrams, open the model file (ddd-example-in-evans-book.asta) using the modeling tool Astah Professional/UML/Viewer.
Clicking on the UML diagram image below opens the diagram in Diagram Map *1.
*1: Diagram Map allows you to zoom and pan, like Google Maps, when viewing a UML diagram. You can view it with any browser. To create one on your own, Astah Professional/UML and the m+ plug-in are required.
Audio guide
Audio guide for this project – This audio was generated with Google NotebookLM based on the contents of this README. You may question some of the explanations, but overall the explanations are clear and informative. I'm sharing it here because I think it will help you get an initial understanding of the cargo shipping system's design.
User-system interaction
This sequence diagram illustrates the key interactions between the user and the system, with references to other diagrams. The interactions show two use cases: (1) tracking the handling of specified cargo, and (2) booking new cargo followed by assigning it a delivery route. To understand the system requirements and specifications in detail, refer to Chapter 7 of Evans' book, Using the Language in an Example: A Cargo Shipping System.

Domain model overview
This class diagram illustrates the basic elements of the domain model and their relationships. The layout of the domain model elements is based on the diagram presented in the dddsample-core project. Attributes and operations are hidden to focus on understanding the elements and their relationships. If you want to see them, open the model file (ddd-example-in-evans-book.asta) using the modeling tool Astah.

Domain objects for "ABC123" cargo
This object diagram shows the basic domain objects and thier connections. In particular, it shows the object snapshot associated with the cargo object "ABC123," which is preset as sample data. The cargo "ABC123," which is en route from HongKong to Helsinki, is currently at the port of New York, where unloading has been completed.

Overall structure
This class diagram illustrates the overall structure of the cargo shipping system: it is composed of two contexts, the Booking context and the Transport network context. The system is implemented using Spring projects such as Spring Boot / MVC / Data JPA. Note that this diagram focuses on elements and relationships that may be considered and does not reflect the entire implementation. Attributes and operations are also hidden to focus on understanding the elements and their relationships. If you want to see them, open the model file (ddd-example-in-evans-book.asta) using the modeling tool Astah.

Behavior 1: Initialization
This communication diagram illustrates a scenario in which the user launches the cargo shipping system, with a focus on messages that may be worth considering.

Behavior 2: Cargo tracking
This communication diagram shows a scenario in which the user requests tracking for cargo "ABC123" on the cargo tracking page. The cargo "ABC123," which is preset by the system and en route from HongKong to Helsinki, is currently at the port of New York, where unloading has been completed.

Behavior 3-1: Cargo booking
This communication diagram shows a scenario in which the user registers new cargo on the cargo booking page. The new cargo is set to be delivered from New York to Helsinki.

Behavior 3-2: Route suggestion
This communication diagram illustrates a scenario in which the user requests cargo routing on the cargo booking result page, followed by the suggestion of route candidates.

Behavior 3-3: Route assignment
This communication diagram illustrates a scenario in which the user requests the assignment of new cargo to a delivery route on the route selection page.

JPA entity relationships for the Database
This class diagram shows JPA entity relationships transcribed from the JPA annotations applied to the source code. The stereotypes correspond to those annotations (e.g., <<Entity>> denotes the @Entity annotation for JPA, not for DDD). To emphasize ease of understanding over strict formalism, the diagram's notation is not based on any specific UML profile for JPA.

Extra: Directed graph
This is a directed graph *2 that represents the structural elements (classifiers) and their relationships, associated with the Booking context and the Transport network context. This graph allows you to view the element relationships in various layouts. Maybe you'll be surprised by how complex the edges in this graph are — I was too. But I think it just reflects the reality—relationships really do get this complex in a reasonably sized application.
Note that the node colors in this graph are automatically assigned on a per‑folder basis and do not correspond to the element colors in the UML diagram shown above.

*2: To create this directed graph on your own, Astah Professional/UML and the m+ plug-in are required.
References
- Evans, Eric. Domain-Driven Design: Tackling Complexity in the Heart of Software, Addison-Wesley, 2004.
- Evans, Eric. Domain-Driven design Reference: Definitions and pattern summaries. Dog Ear Publishing, 2014.
Links
License
Diagram map (diagram_map.html) and Directed graph (directed_graph.html) include the following libraries:
And some of the diagrams use images downloaded from Freepik.
Except for the libraries and images mentioned above, all files and data in this project are under the Creative Commons Zero (CC0) license.
Found a mistake?
If you spot any mistakes in the diagrams or model, please open an issue.