---
id: product-catalog-system
name: Product Catalog System
version: 1.0.0
summary: |
  Internal BookWorm system that owns catalog management, product discovery,
  and catalog search index ingestion within the Catalog bounded context.
scope: internal
owners:
  - catalog-experience-team
services:
  - id: catalog-api
    version: 1.0.0
  - id: catalog-ingestion
    version: 1.0.0
flows:
  - id: product-ingestion
    version: 1.0.0
  - id: user-checkout
    version: 1.0.0
relationships:
  - id: identity-provider
    version: 1.0.0
    label: introspects access tokens for protected API requests
containers:
  - id: catalog-database
    version: 1.0.0
  - id: catalog-cache
    version: 1.0.0
  - id: catalog-blob
    version: 1.0.0
  - id: catalog-vector
    version: 1.0.0
entities:
  - id: book
    version: 1.0.0
  - id: author
    version: 1.0.0
  - id: category
    version: 1.0.0
  - id: publisher
    version: 1.0.0
actors:
  - id: business-user
    name: Business user
    label: maintains books and catalog reference data
    direction: inbound
  - id: customer
    name: Customer
    label: browses the product catalog
    direction: inbound
badges:
  - content: Internal
    backgroundColor: gray
    textColor: gray
    icon: LockClosedIcon
---

## System Purpose & Boundary

The Product Catalog System delivers product catalog management, hybrid keyword-and-semantic discovery, and asynchronous search index maintenance within the [[domain|catalog]] domain. It serves **Customers** browsing and searching for books and **Business Users** maintaining titles, pricing, cover art, and reference metadata ([[entity|book]], [[entity|author]], [[entity|category]], [[entity|publisher]]). Shopping baskets ([[domain|shopping]]), accepted order lifecycles ([[domain|ordering]]), and individual customer reviews ([[domain|reviews]]) are explicitly out of scope; the system stores only a derived rating summary on each book.

:::note
[[container|catalog-database]] is the sole system of record for catalog entities and pending search-index work. [[container|catalog-cache]] and [[container|catalog-vector]] are disposable, rebuildable projections—search results always resolve final details from the authoritative database so stale projections never leak outdated prices or deleted listings.
:::

## Contained Capabilities

| Service / Agent                | Role in System                                                                                                                       | Primary Data Store                                                                                                        | Interaction Style (Sync / Async) |
| :----------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------ | :------------------------------- |
| [[service\|catalog-api]]       | Serves versioned HTTP REST endpoints for storefront/backoffice, internal gRPC lookups, hybrid search, and review summary projections | [[container\|catalog-database]], [[container\|catalog-cache]], [[container\|catalog-blob]], [[container\|catalog-vector]] | Sync (HTTP/gRPC) & Async (Kafka) |
| [[service\|catalog-ingestion]] | Consumes scheduled batch triggers, generates embeddings, and synchronizes book records into the vector search index                  | [[container\|catalog-database]], [[container\|catalog-vector]]                                                            | Async (Kafka trigger)            |

## External Interactions & Trust Boundaries

- **Human actors via API Gateway:** Customers access public catalog read and search operations; Business Users and Administrators authenticate through [[system|identity-provider]] to create, update, or delete catalog records and upload cover images.
- **Internal service consumers:** [[service|basket-api]], [[service|order-api]], and [[service|mcp-server]] query book metadata, pricing, and dashboard counts over internal gRPC contracts.
- **Reviews integration:** [[system|rating-system]] publishes feedback lifecycle events over Kafka so [[service|catalog-api]] can maintain derived average ratings and review counts; if a review targets a missing book, Catalog emits a compensating failure event.
- **Scheduled indexing:** [[system|scheduler-system]] dispatches periodic batch-processing triggers over Kafka to [[service|catalog-ingestion]].

<Accordion title="Operational & Consistency Notes">
	- **Eventual search consistency:** Catalog writes commit immediately to
	[[container|catalog-database]] and enqueue work for [[service|catalog-ingestion]], keeping
	authoring responsive while search index updates catch up asynchronously. - **Monitoring:** Track
	the pending vector-update queue depth and ingestion execution health to detect indexing lag early.
</Accordion>

## System Visualizations

### System Context

<ContextDiagram />

### Component Topology

<NodeGraph />

### Architecture Decisions

<ADRTable />

## Related Documentation

- [[flow|product-ingestion]] — End-to-end catalog authoring and vector indexing workflow.
- [[flow|user-checkout]] — Checkout flow consuming catalog price and title lookups.
- [[doc|domains/bookworm/subdomains/catalog/engineering/01-consistency-and-data-ownership]] — Catalog consistency and ownership invariants.
- [[doc|domains/bookworm/subdomains/catalog/guides/01-managing-catalog-data]] — Guide for maintaining books, authors, categories, and publishers.
- [[doc|domains/bookworm/subdomains/catalog/guides/02-search-and-discovery]] — Guide for hybrid keyword and semantic search.
