Digital storefront · Generic domain · EventStorming board
product-content
Holds the description, media and category of each catalogue item, publishes it when complete, and retires it when the item is discontinued.
- events published
- 3
- commands
- 11
- policies
- 9
- read models
- 2
- hot spots
- 5
The story in 3 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventProduct
Content Published - Pivotal eventCategory
Tree Published - Pivotal eventProduct
Content Retired
Listens to (1): contexts whose events this one reacts to
Tells (1): contexts that react to its events
The board, row by row
11 rows, in the order the business story happens: the main path first, then how this context reacts to the others, then the clock. Rows are small stories; read each one left to right.
- Event
- Command
- Actor
- Aggregate
- Policy
- Read model
- External system
- Hot spot
- Opportunity
-
Start the content of an item
A content manager creates a draft for a catalogue item the network already knows. Items the network has discontinued are refused. A draft may be incomplete, and nothing is published yet.
ActorContent managerRead modelKnown catalogue itemsRead modelCategory treeCommandCreateProduct POST /product-contentsContent AggregateProductContent Source: application/usecases/content.go · domain/content/commands.go · domain/content/content.go
-
Revise the content
The content manager replaces the description, bullets, attributes and media. A draft or live content takes a new revision. Shoppers see it only after the next publish. Retired content cannot be revised.
ActorContent managerRead modelCategory treeCommandReviseContent POST /product-contents/{catalogItemId}/revisionsAggregateProductContent Source: application/usecases/content.go · domain/content/commands.go · domain/content/content.go
-
Discard a draft
The content manager throws away a draft that was never published. It is retired as discarded, and nothing is announced because the shopper never saw it.
ActorContent managerCommandDiscardDraft DELETE /product-contents/{catalogItemId}/draftAggregateProductContent Source: application/usecases/content.go · domain/content/commands.go · domain/content/content.go
-
Publish the content
The content manager publishes. It needs a description, exactly one main media item and a category in the tree, and a known, live item. The full content leaves with its revision. Publishing a revision already live does nothing.
ActorContent managerRead modelKnown catalogue itemsRead modelCategory treeCommandPublishContent POST /product-contents/{catalogItemId}/publicationsAggregateProductContent EventProductContent Published Systemproduct-discovery PolicyReplaces the item's content in its product view, only if the revision is newerSource: application/usecases/content.go · domain/content/commands.go · domain/content/content.go · domain/content/events.go
-
Withdraw published content
The content manager takes published content down by hand. Retired content is final: it can never be changed or published again.
ActorContent managerCommandRetireContent POST /product-contents/{catalogItemId}/retirementsAggregateProductContent EventProductContent Retired Systemproduct-discovery PolicyEnds the item's published content in its product viewSource: application/usecases/content.go · domain/content/commands.go · domain/content/content.go · domain/content/events.go
-
Add a category
The content manager adds a category, at the top or under a parent. The tree has at most four levels and sibling names are unique. There is no draft tree: every change publishes a new version of the whole tree.
ActorContent managerCommandCreateCategory POST /categoriesAggregateTreeEventCategoryTree Published Systemproduct-discovery PolicyReplaces its category view when the tree version is newerSource: application/usecases/category.go · domain/category/category.go · domain/category/events.go
-
Move a category
The content manager moves a category, with its sub-categories, under another parent. A move into its own subtree, or past four levels, is refused. The new tree version is published.
ActorContent managerCommandMoveCategory PUT /categories/{categoryId}/parentAggregateTreeEventCategoryTree Published Systemproduct-discovery PolicyReplaces its category view when the tree version is newerSource: application/usecases/category.go · domain/category/category.go · domain/category/events.go
-
Rename a category
The content manager renames a category. The paths of its sub-categories follow, and sibling names stay unique. The new tree version is published.
ActorContent managerCommandRenameCategory PUT /categories/{categoryId}/nameAggregateTreeEventCategoryTree Published Systemproduct-discovery PolicyReplaces its category view when the tree version is newerSource: application/usecases/category.go · domain/category/category.go · domain/category/events.go
-
Send the category tree again
The content manager republishes the tree without changing it, so a consumer can catch up. It goes out under the next version.
ActorContent managerCommandPublishCategory POST /category-tree-publicationsTree AggregateTreeEventCategoryTree Published Systemproduct-discovery PolicyReplaces its category view when the tree version is newerSource: application/usecases/category.go · domain/category/category.go · domain/category/events.go
-
Keep the list of catalogue items
offer-availability announces each new item. This context keeps a copy, so it can refuse content for an unknown item without asking. A discontinued item is never made active again by a late message.
Systemoffer-availability EventCatalogItem Created PolicyWhenever an item is created, record it as active unless it is already knownCommandApplyCatalog started by the policyItem Created Read model · kept up to dateKnown catalogue itemsSource: application/usecases/consume.go · adapters/inbound/kafka/offer_availability.go
-
Retire content when an item is discontinued
The network discontinues an item. Published content is retired and announced. A draft is retired quietly, since nothing was ever published. A discontinued item can no longer be published.
Systemoffer-availability EventCatalogItem Discontinued PolicyWhenever an item is discontinued, mark it so and retire its published and draft contentCommandRetireOn started by the policyDiscontinue AggregateProductContent EventProductContent Retired Read model · kept up to dateKnown catalogue itemsSystemproduct-discovery PolicyEnds the item's published content in its product viewSource: application/usecases/consume.go · domain/content/commands.go · adapters/inbound/kafka/offer_availability.go
Hot spots and opportunities
Open questions and known gaps, each taken from a decision record or a document in the repository, never invented. Opportunities are improvements the documentation already names.
- Hot spotMedia are plain links to static files. Nothing fetches or checks them, so a broken link can be published.
- Hot spotContent for an item not yet announced is refused, not queued. A quick write can fail only because this copy lags.
- Hot spotPublished content stays up until the discontinue notice arrives. The design assumes it will eventually.
- Hot spotCategories can never be deleted. The 'category in use' refusal exists for a future removal and nothing raises it.
- Hot spotEvery category change republishes the whole tree, even a move to the same parent or a rename to the same name.
Opportunities
- OpportunityPromotions, reviews and recommendations are left for later phases.
Source: docs/overview/introduction.md
This board is a reconstruction from the code and documentation of product-content at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.