Digital storefront · Supporting domain · EventStorming board
product-discovery
The shopper-facing read side: keeps searchable product pages and a category tree up to date from other contexts' events, and works out what is purchasable.
- events published (none)
- 0
- commands
- 11
- policies
- 11
- read models
- 3
- hot spots
- 4
The story in 5 key moments
This context publishes no events. The pivotal moments are the events it listens to.
- Pivotal eventCatalog
Item Created - Pivotal eventProduct
Content Published - Pivotal eventItem
Price Changed - Pivotal eventListing
Availability Changed - Pivotal eventCatalog
Item Discontinued
Listens to (3): contexts whose events this one reacts to
Tells (0): contexts that react to its events
none
The board, row by row
12 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
-
Add a new item to the catalogue view
offer-availability announces a new catalogue item. The product row gets its title and flags and becomes visible. If a price or listing arrived first, a hidden placeholder row is completed.
Systemoffer-availability EventCatalogItem Created PolicyWhenever a catalogue item is created, complete its product row and mark it activeCommandApplyCatalog started by the policyItem Created Read model · kept up to dateProduct viewSource: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_item.go
-
Show the published content
product-content publishes the description, bullets, attributes, media and main category of a product. Only a newer revision replaces what is shown, and the product becomes searchable.
Systemproduct-content EventProductContent Published PolicyWhenever content is published, replace the product's content if its revision is newerCommandApplyProduct started by the policyContent Published Read model · kept up to dateProduct viewSource: application/usecases/consume_catalogue.go · adapters/inbound/kafka/product_content.go · domain/productview/fold_content.go
-
Keep the category tree
product-content publishes the whole category tree. A newer version replaces the old one and the purchasable counts per category are worked out again. No product row has to change.
Systemproduct-content EventCategoryTree Published PolicyWhenever a category tree is published, replace the current one if its version is newerCommandApplyCategory started by the policyTree Published Read model · kept up to dateCategory tree viewSource: application/usecases/consume_catalogue.go · domain/categoryview/categoryview.go · adapters/inbound/kafka/product_content.go
-
Show the current price
pricing announces a new list and sale price. A newer version replaces the prices on the product and makes the price count towards being purchasable.
SystempricingEventItemPrice Changed PolicyWhenever a price changes, store the new prices if the version is newerCommandApplyItem started by the policyPrice Changed Read model · kept up to dateProduct viewSource: application/usecases/consume_catalogue.go · adapters/inbound/kafka/pricing.go · domain/productview/fold_price.go
-
Add a listing to a product
offer-availability says a node now offers the item. The product gets a live listing with no stock yet, and the view learns which item the listing belongs to.
Systemoffer-availability EventListingCreated PolicyWhenever a listing is created, add it to its product and remember which item it belongs toCommandApplyListing started by the policyCreated Read model · kept up to dateProduct viewRead model · kept up to dateListing-to-item mapSource: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go
-
Update the stock of a product
offer-availability reports how many units a listing can ship. A newer report replaces the old count, and the product shows in stock if any live listing has units.
Systemoffer-availability EventListingAvailability Changed PolicyWhenever a quantity is reported, store it if it is newer and recheck in stock and purchasableCommandApplyListing started by the policyAvailability Changed Read model · kept up to dateProduct viewRead model · kept up to dateListing-to-item mapSource: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go · domain/productview/view.go
-
Hide a suppressed listing
A suppressed listing stops counting as stock. The event names only the listing, so the item is found in the listing-to-item map. An unknown listing is skipped with a warning.
Systemoffer-availability EventListingSuppressed PolicyWhenever a listing is suppressed, mark it suppressed so it no longer counts as stockRead modelListing-to-item mapCommandApplyListing started by the policyState Changed Read model · kept up to dateProduct viewSource: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go
-
Bring a restored listing back
A restored listing counts as stock again, found through the listing-to-item map like a suppression. An unknown listing is skipped with a warning.
Systemoffer-availability EventListingRestored PolicyWhenever a listing is restored, mark it live so its units count as stock againRead modelListing-to-item mapCommandApplyListing started by the policyState Changed Read model · kept up to dateProduct viewSource: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go
-
Retire a product's content
product-content ends a product's published content. The row stays, but it is no longer searchable or purchasable. A later, higher revision can publish it again.
Systemproduct-content EventProductContent Retired PolicyWhenever content is retired, mark it retired unless an older revision is being retiredCommandApplyProduct started by the policyContent Retired Read model · kept up to dateProduct viewSource: application/usecases/consume_catalogue.go · adapters/inbound/kafka/product_content.go · domain/productview/fold_content.go
-
Withdraw a price from a product
pricing withdraws an item's price. The amounts are cleared and the product is no longer purchasable, even if it is in stock.
SystempricingEventItemPrice Withdrawn PolicyWhenever a price is withdrawn, clear the amounts unless a newer price was already storedCommandApplyItem started by the policyPrice Withdrawn Read model · kept up to dateProduct viewSource: application/usecases/consume_catalogue.go · adapters/inbound/kafka/pricing.go · domain/productview/fold_price.go
-
Mark a discontinued item
The item is marked discontinued and is never purchasable again. Its page stays and reads as currently unavailable. A late creation event cannot bring it back.
Systemoffer-availability EventCatalogItem Discontinued PolicyWhenever an item is discontinued, mark its row discontinuedCommandApplyCatalog started by the policyItem Discontinued Read model · kept up to dateProduct viewSource: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_item.go
-
Rebuild the views from scratch
An operator runs a one-off job that reads every source page by page and refills the product and category views with the same rules as live events. Events that follow are not applied twice.
ActorOperatorCommandRebuildProjections a background jobRead model · kept up to dateProduct viewRead model · kept up to dateCategory tree viewSource: application/usecases/rebuild.go · cmd/rebuild/main.go · 0006-rebuild-as-default-off-helm-job.md
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 spotA silent producer or a stalled consumer leaves the views stale. There is no freshness metric and no alert on lag.
- Hot spotThe list of handled events and the messages parked after failing grow without bound. No pruning job exists.
Source: docs/operations/runbook.md
- Hot spotA suppress or restore that arrives before its listing is known is skipped with a warning. Only a rebuild repairs it.
- Hot spotA producer that resets its version or revision counter has its new facts ignored as stale.
Opportunities
- OpportunitySearch runs on the database today; a dedicated search engine can sit behind the same port later.
Source: docs/ddd/ubiquitous-language.md
- OpportunityRecommendations, reviews, personalisation and sponsored placement are later phases; ranking weights are fixed today.
Source: docs/overview/introduction.md
This board is a reconstruction from the code and documentation of product-discovery at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.