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
| Concept | Where it lives | Rule in one line |
|---|---|---|
| ProductContent (one per catalogue item) | internal/domain/content | The 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/category | The 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. |
| CatalogItemView | internal/application/readmodel, table catalog_item_view | Event-fed local copy of the items offer-availability reports (ACTIVE or DISCONTINUED), so completeness checks never call the network (ADR 0003). Not aggregate state. |
| RetireOnDiscontinue | internal/application/usecases/consume.go | When the network discontinues an item, its PUBLISHED content retires with ProductContentRetired and a DRAFT retires silently. |
What it does not own
| Out of scope | Where it belongs |
|---|---|
| The item itself: title, dimensions, weight, GTIN, discontinuation | offer-availability (network item master) |
| Stock and listings | offer-availability |
| Prices and sale windows | pricing |
| Search, browse and the product-page read side | product-discovery, fed by this context's events |
| Media upload and binary storage | nobody here: media are URLs only |
| Promotions, reviews, recommendations | later phases |
| PII | none: the storefront stores none and no event carries any |
| Anything in the warehouse-systems fleet | the 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 likecom.retailnetwork.storefront.product-content.<entity>.<EventName>.
Main capabilities
- Create a content draft for a known, not discontinued catalogue item and
revise it (
POST /product-contents,/revisions), up to the collection bounds. - Publish the current revision (
/publications): a full-contentProductContentPublishedevent reachesproduct-discoverywithout a call back. Publishing again after a revision of live content publishes the new revision; publishing a revision that is already live changes nothing. - Retire published content (
/retirements) or discard a draft (DELETE .../draft); the network'sCatalogItemDiscontinueddoes the same on its own. - Create, move and rename categories (
/categories,PUT .../parent,PUT .../name); every one publishes the whole tree under a new version, andPOST /category-tree-publicationsre-sends the tree on demand. - 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). - Publish
ProductContentPublished,ProductContentRetiredandCategoryTreePublishedonretailnetwork.product-content.eventsthrough the transactional outbox.
Where to go next
| You want to | Read |
|---|---|
| See the layers, packages, binaries and the rules that police them | Architecture |
| Run it and make the first calls | Quickstart |
| Know every setting | Configuration |
| Deploy and operate it | Runbook, Observability, Before the first release |
| Fix something that broke | Troubleshooting |
| Know what tests and CI gates exist | Testing |
| See who talks to whom | Integration |
| See the application use cases and their invariants | Use cases |
| Read the design in ddd-crew artifacts | DDD artifacts, Ubiquitous language |
| Read the contracts | API overview, Event catalogue |
| Read the decisions | ADR index |
Published at https://iqvo.github.io/product-content/.
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.