<#list domain.modules as module>

${domain.name} Domain Model

Version ${domain.version}

<#if includeGenerationDate>

Generated on ${generationDate?datetime?iso_utc}

${domain.name} Domain Model

Table of Contents

  1. Table of Contents
  2. Introduction
  3. ${domain.name} Domain
    1. <#list domain.modules as module>
    2. ${module.name}
      1. <#if module.aggregates?size gt 0>
      2. Aggregates
        1. <#list module.aggregates as aggregate>
        2. ${aggregate.name}
        <#if module.services?size gt 0>
      3. Services
        1. <#list module.services as service>
        2. ${service.name}
        <#if module.domainProcesses?size gt 0>
      4. Domain Processes
        1. <#list module.domainProcesses as process>
        2. ${process.name}
  4. Ubiquitous Language

Introduction

This document describes ${domain.name} domain using concepts defined by Domain-Driven Design (DDD) methodology. It was generated directly from source code and can be considered as a close summary of what is actually implemented. A description of followed conventions is given below.

The document is split in two parts:

  1. the description of the different modules and their components,
  2. the ubiquitous language, presented in the form of a glossary. Each entry is composed of a name, the module (if relevant), the type of component and a short description.

Modules

Each module has its own section, each containing sub-sections for each aggregate, service and domain process in the module.

Each module section starts with the description of the module and an undirected graph. The nodes represent the aggregates of the module and the edges represent the links between those aggregates. A link between two aggregates means that one aggregates holds a reference to the other in its attributes.

Aggregates

Each aggregate section starts with the description of the aggregate and an undirected graph. Each node of the graph represents a component (an entity or a value object) part of the aggregate. The edges represent links between the components of the aggregate.

Follows the description of the Value Objects and Entities part of the aggregate and represented in the aggregate graph.

The aggregate section ends with a directed graph showing how current aggregate is connected to other aggregates, modules or external systems in terms of consumption and transmission of events.

Current aggregate is represented by a box with bold borders, other aggregates are represented by boxes with a thin border. Dashed boxes represent other modules or external systems issuing or consuming events. Elliptic nodes represent the events.

An edge going from a box to an ellipse means that the component represented by the box issues the event represented by the ellipse. An edge going from an ellipse to a box means that the component represented by the box consumes the event represented by the ellipse.

Domain Processes

Each domain process section starts with the description of the process and a directed graph.

Each node of the graph represents a message listener (ellipses) or other modules or external systems (boxes) producing and/or sending messages.

Each directed edge represents a message being produced by source node and consumed by destination node.

The section ends with the list of message listeners involved in the process and their description. The naming convention for the message listeners is

Aggregate.listenerName(Event)
where
Aggregate
is the name of the aggregate being created/updated/deleted,
listenerName
is the name of the listener inside of the component and
Event
is the name of the consumed event or command.

${domain.name} Domain

<#list domain.modules as module>

${module.name}

<#if module.description??> ${module.description}
<#if module.aggregates?size gt 0>

Aggregates

<#list module.aggregates as aggregate>

${aggregate.name}

${aggregate.description}
<#if aggregate.valueObjects?size gt 0>
Value Objects
<#if aggregate.entities?size gt 0>
Entities
Events
<#if module.services?size gt 0>

Services

<#list module.services as service>

${service.name}

${service.description} <#if module.domainProcesses?size gt 0>

Domain Processes

<#list module.domainProcesses as process>

${process.name}

${process.description}

Ubiquitous Language

    <#list ubiquitousLanguage as entry>
  1. ${entry.name}, ${entry.type}, ${entry.description}