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.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

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.

  1. Pivotal eventCatalogItemCreated
  2. Pivotal eventProductContentPublished
  3. Pivotal eventItemPriceChanged
  4. Pivotal eventListingAvailabilityChanged
  5. Pivotal eventCatalogItemDiscontinued

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
  1. 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
    EventCatalogItemCreated
    PolicyWhenever a catalogue item is created, complete its product row and mark it active
    CommandApplyCatalogItemCreatedstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_item.go

  2. 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
    EventProductContentPublished
    PolicyWhenever content is published, replace the product's content if its revision is newer
    CommandApplyProductContentPublishedstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_catalogue.go · adapters/inbound/kafka/product_content.go · domain/productview/fold_content.go

  3. 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
    EventCategoryTreePublished
    PolicyWhenever a category tree is published, replace the current one if its version is newer
    CommandApplyCategoryTreePublishedstarted by the policy
    Read model · kept up to dateCategory tree view

    Source: application/usecases/consume_catalogue.go · domain/categoryview/categoryview.go · adapters/inbound/kafka/product_content.go

  4. 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.

    Systempricing
    EventItemPriceChanged
    PolicyWhenever a price changes, store the new prices if the version is newer
    CommandApplyItemPriceChangedstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_catalogue.go · adapters/inbound/kafka/pricing.go · domain/productview/fold_price.go

  5. 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 to
    CommandApplyListingCreatedstarted by the policy
    Read model · kept up to dateProduct view
    Read model · kept up to dateListing-to-item map

    Source: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go

  6. 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
    EventListingAvailabilityChanged
    PolicyWhenever a quantity is reported, store it if it is newer and recheck in stock and purchasable
    CommandApplyListingAvailabilityChangedstarted by the policy
    Read model · kept up to dateProduct view
    Read model · kept up to dateListing-to-item map

    Source: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go · domain/productview/view.go

  7. 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 stock
    Read modelListing-to-item map
    CommandApplyListingStateChangedstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go

  8. 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 again
    Read modelListing-to-item map
    CommandApplyListingStateChangedstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_listing.go

  9. 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
    EventProductContentRetired
    PolicyWhenever content is retired, mark it retired unless an older revision is being retired
    CommandApplyProductContentRetiredstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_catalogue.go · adapters/inbound/kafka/product_content.go · domain/productview/fold_content.go

  10. 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.

    Systempricing
    EventItemPriceWithdrawn
    PolicyWhenever a price is withdrawn, clear the amounts unless a newer price was already stored
    CommandApplyItemPriceWithdrawnstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_catalogue.go · adapters/inbound/kafka/pricing.go · domain/productview/fold_price.go

  11. 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
    EventCatalogItemDiscontinued
    PolicyWhenever an item is discontinued, mark its row discontinued
    CommandApplyCatalogItemDiscontinuedstarted by the policy
    Read model · kept up to dateProduct view

    Source: application/usecases/consume_offer.go · adapters/inbound/kafka/offer_availability.go · domain/productview/fold_item.go

  12. 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.

    ActorOperator
    CommandRebuildProjectionsa background job
    Read model · kept up to dateProduct view
    Read model · kept up to dateCategory tree view

    Source: 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.

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.