Product Discovery
Derived from model/model.yaml. The product-discovery service is built on develop (IQVO/product-discovery at 9c2f945, checked 2026-10-27) and not deployed (no warehouse-infra entry). Every Err... name, REST route and CloudEvents type of this context named on this page exists in the service; where the built service differs from the model's design, the page says so (As built) or the context's Service and operations section lists it.
Product Discovery (product-discovery, code PD, tier storefront)
is the read side of browsing and search. It keeps one ProductView per
catalogue item — title, flags, content, category path, list and effective
price, inStock, purchasable — and one CategoryView — the browsable
tree plus purchasable counts. Both are projections, fed by events from the
network's offer-availability and the
storefront's own product-content and
pricing. Search is PostgreSQL full-text
search plus pg_trgm similarity (decision D9), behind a port so a dedicated
engine is a later adapter swap. There is no aggregate in v1: the
context's own ADR 0002 will say so plainly — projections only — so it
publishes no events and takes no commands, only the three read routes the
experience layer calls.
This context's pages
| Page | What it holds | ddd-crew tool it follows |
|---|---|---|
| Business Context | The problem, actors, decisions, relation to real storefronts, out of scope | (narrative) |
| Ubiquitous Language | Terms, code identifiers, terms not to confuse | Bounded Context Canvas (UL section) |
| Core Domain Chart | Why this context is Supporting, a Core candidate at scale | Core Domain Charts |
| Bounded Context Canvas | Purpose, classification, roles, inbound and outbound messages, decisions, metrics | Bounded Context Canvas v5 |
| Context Map | Every neighbour, direction and pattern | Context Mapping |
| Aggregate Design Canvas | No aggregate by decision: the canvas applied to ProductView and CategoryView | Aggregate Design Canvas v1.1 |
| Domain Events | The eleven consumed CloudEvents (nothing is published), with an example envelope | Domain Message Flow Modelling (message catalogue) |
| Domain Message Flow | Search, the availability feed, the content and price feeds, the bootstrap rebuild | Domain Message Flow Modelling |
| EventStorming | Process-level boards with hotspots | EventStorming glossary & cheat sheet |
| Use Cases | The three queries, the projector and the bootstrap rebuild | (application layer, fleet convention) |
| Class Diagram | Read-side model, the search port and the hexagonal adapters (the model's design, with the as-built packages) | (UML, fleet convention) |
| Entity Relationship | Postgres schema as built (migration 0001): projections, search index, inbox | (fleet convention) |
| Sequence Diagrams | Adapter to store for every use case, including the ops-only rebuild | (UML, fleet convention) |
Service and operations
- Service:
IQVO/product-discoveryondevelop(9c2f945, 2026-10-27): binariescmd/api,cmd/rebuild; REST contractapis/openapi.yaml, event contractapis/asyncapi.yaml, schema ininternal/adapters/outbound/postgres/migrations/(see Entity Relationship). 5 ADRs, listed in the ADR index. - Configuration: mandatory at boot (the service exits naming the missing variable):
DATABASE_URL,KAFKA_BROKERS,OFFER_AVAILABILITY_CONSUMER_GROUP,PRODUCT_CONTENT_CONSUMER_GROUP,PRICING_CONSUMER_GROUP. There is no in-memory mode. Packaging: no Helm chart in the repo yet (charts/is absent on develop). - Deployment: not deployed. warehouse-infra
develophas noterraform/apps.yamlentry and nohelm-values/product-discovery.yaml, so no database, consumer group or gateway route is provisioned. The kind cluster was not checked in this refresh. - Observability: service ADR 0005, Adopt the fleet observability standard (logs, metrics, traces), Accepted (2026-10-26). Logs, metrics and traces leave over OTLP/gRPC (
OTEL_EXPORTER_OTLP_ENDPOINT, code defaultlocalhost:4317;OTEL_SERVICE_NAME); a collector that is down only drops telemetry. The Tier-2 business counter isdiscovery.searches.served(unit{search}, ininternal/adapters/outbound/telemetry/search_metrics.go), with attributeoutcome=served,emptyorfailedandreasonon the outcomes that are not a success. No warehouse-infra dashboard queries it yet. - Rebuild:
cmd/rebuildis a one-shot ops binary (service ADR 0003): it pages every source over REST (OFFER_AVAILABILITY_URL,PRODUCT_CONTENT_URL,PRICING_URL, all mandatory) and rebuilds the projections; it never serves a shopper request.
Elsewhere
- REST contract:
storefront/apis/product-discovery/openapi.yaml(a copy of the service's spec on develop), rendered under the API reference. - The storefront-wide Context Map, Subdomain Classification and Ubiquitous Language.
- The Model Gap Register
tracks gap S6 (out-of-stock purchase): impossible in this network; an item
with no live listing is shown as currently unavailable (policy
UnavailableNotBuyable). - The research behind the search decision (D9) and the product-type-query rule: search quality is benchmark [6].
- offer-availability owns the item master and listing availability this context projects; product-content owns descriptions, media and the category tree; pricing owns the prices.