Skip to main content

Product Content

product-content is a Storefront-area Generic bounded context of the retail-network organisation. It enriches a catalogue item the network already knows with everything a product page needs and the item master does not have: a description, bullet points, an attribute table, media and a place in the category tree. Content is written as a DRAFT, published as a numbered revision when it is complete, and retired when it is no longer sold.

The title stays the item master's (offer-availability); only catalogItemId crosses the boundary. Media upload is out of scope: media are URLs to static assets. Shoppers never call this service. product-discovery reads its REST pages to rebuild a projection and folds its events into the product page, so the browser reaches the storefront edge and never this context (Integration).

:::info What runs on develop Three binaries: cmd/api (REST, the transactional outbox relay and the offer-availability consumer in one process), cmd/mcp (a read-only Model Context Protocol server over the same Postgres, ADR 0008) and cmd/a2a (a read-only Agent2Agent agent over the same Postgres, ADR 0006). All three run on real Postgres; cmd/api also needs real Kafka. There is no in-memory mode, and DATABASE_URL, KAFKA_BROKERS and OFFER_AVAILABILITY_CONSUMER_GROUP are mandatory for cmd/api (Configuration). Packaged as a Dockerfile that builds every cmd/* binary and the Helm chart charts/product-content (the api Deployment always, the MCP Deployment when mcp.enabled=true, the A2A Deployment when a2a.enabled=true). The MCP server has two read tools, get_product_content and list_categories, one resource and one prompt (MCP tools). :::

What the context owns​

ConceptWhere it livesRule in one line
ProductContent (one per catalogue item)internal/domain/contentThe editable body (description, up to 10 bullets, 50 attributes, 12 media, primary category) with a lifecycle DRAFT, PUBLISHED, RETIRED and a revision. It publishes only when complete: a description, exactly one PRIMARY medium and a category in the current tree. RETIRED is terminal.
CategoryTree (one, id main)internal/domain/categoryThe single live, versioned tree of categories, at most four levels deep and 5000 categories, with unique sibling names. There is no draft: every command applies to the live tree and publishes a new version.
CatalogItemViewinternal/application/readmodel, table catalog_item_viewEvent-fed local copy of the items offer-availability reports (ACTIVE or DISCONTINUED), so completeness checks never call the network (ADR 0003). Not aggregate state.
RetireOnDiscontinueinternal/application/usecases/consume.goWhen the network discontinues an item, its PUBLISHED content retires with ProductContentRetired and a DRAFT retires silently.

What it does not own​

Out of scopeWhere it belongs
The item itself: title, dimensions, weight, GTIN, discontinuationoffer-availability (network item master)
Stock and listingsoffer-availability
Prices and sale windowspricing
Search, browse and the product-page read sideproduct-discovery, fed by this context's events
Media upload and binary storagenobody here: media are URLs only
Promotions, reviews, recommendationslater phases
PIInone: the storefront stores none and no event carries any
Anything in the warehouse-systems fleetthe storefront never touches the fleet

Classification and area​

  • Generic subdomain. Describing a product is a commodity problem a production shop solves by buying a product information management (PIM) system; the study builds it anyway so the storefront's event contracts are explicit (Subdomain classification).
  • Storefront area, tier segment storefront: CloudEvents types look like com.retailnetwork.storefront.product-content.<entity>.<EventName>.

Main capabilities​

  1. Create a content draft for a known, not discontinued catalogue item and revise it (POST /product-contents, /revisions), up to the collection bounds.
  2. Publish the current revision (/publications): a full-content ProductContentPublished event reaches product-discovery without a call back. Publishing again after a revision of live content publishes the new revision; publishing a revision that is already live changes nothing.
  3. Retire published content (/retirements) or discard a draft (DELETE .../draft); the network's CatalogItemDiscontinued does the same on its own.
  4. Create, move and rename categories (/categories, PUT .../parent, PUT .../name); every one publishes the whole tree under a new version, and POST /category-tree-publications re-sends the tree on demand.
  5. Read content (paged, for a projection rebuild) and the category tree over REST, or the same two reads as A2A skills or MCP tools (get_product_content, list_categories).
  6. Publish ProductContentPublished, ProductContentRetired and CategoryTreePublished on retailnetwork.product-content.events through the transactional outbox.

Where to go next​

You want toRead
See the layers, packages, binaries and the rules that police themArchitecture
Run it and make the first callsQuickstart
Know every settingConfiguration
Deploy and operate itRunbook, Observability, Before the first release
Fix something that brokeTroubleshooting
Know what tests and CI gates existTesting
See who talks to whomIntegration
See the application use cases and their invariantsUse cases
Read the design in ddd-crew artifactsDDD artifacts, Ubiquitous language
Read the contractsAPI overview, Event catalogue
Read the decisionsADR index

Published at https://iqvo.github.io/product-content/.

Disclaimer

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic.