Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Book

Canonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxonomy links, and derived rating summaries.

Aggregate RootAggregate Root

Domain Role & Boundary

Book is the central Aggregate Root in the CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs bounded context, representing a sellable title with its descriptive metadata, pricing value object, availability status, taxonomy associations, and derived rating summary. Owned by Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs (with vector index synchronization handled by Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs), it serves as the single source of truth for product discovery and checkout price resolution. It explicitly does not own customer shopping baskets (ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs), locked purchase-time order prices (OrderingDomainv1.0.0OrderingCreates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions ...Ownercommerce-fulfillment-teamDiagramOpen docs), or individual customer reviews (ReviewsDomainv1.0.0ReviewsCaptures individual customer feedback for books, publishes rating changes for Catalog discovery, and provides privacy-sc...Ownercatalog-experience-teamDiagramOpen docs).

Entity Profile

PropertyValue
Bounded Context / DomainCatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs
Owning ServiceCatalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs
DDD RoleAggregate Root
Identifier StrategyUUIDv7 generated at persistence
Persistence StoreCatalog relational database (books)
Deletion SemanticsSoft-delete (isDeleted flag excludes retired books from standard queries)
Concurrency ControlOptimistic concurrency via persistence-managed row version
PII / Data ClassificationPublic catalog metadata (non-PII)

Attributes & Constraints

NameTypeRequiredDescriptionReference
idUUIDrequiredGlobally unique UUIDv7 identifier for the book.—
namestringrequiredDisplay title of the book (non-whitespace, up to 50 characters).—
descriptionstringrequiredSynopsis or editorial description of the book (up to 1,000 characters).—
imagestringoptionalCover image asset reference or URL (up to 255 characters).—
priceobjectrequiredRegular price and optional promotional sale price.—
↳originalPricedecimalrequiredRegular non-negative unit price.—
↳discountPricedecimaloptionalOptional sale price; must be non-negative and not exceed originalPrice.—
statusstring
InStockOutOfStock
requiredCatalog listing availability state.—
averageRatingdoublerequiredDerived mean rating projected asynchronously from customer feedback.—
totalReviewsintegerrequiredDerived count of customer reviews projected asynchronously.—
categoryIdUUIDoptionalIdentifier of the assigned Category, if any.
categoryProperty: id
publisherIdUUIDoptionalIdentifier of the assigned Publisher, if any.
publisherProperty: id
authorIdsUUID[]optionalIdentifiers of the Authors credited on this book.
authorProperty: id
isDeletedbooleanrequiredSoft-delete marker hiding retired books from standard queries.—
createdAtdatetimerequiredUTC timestamp when the book was created.—
lastModifiedAtdatetimeoptionalUTC timestamp of the most recent modification.—
rowVersionstringrequiredPersistence-managed optimistic concurrency token.—
AttributeBusiness Rule / ConstraintSensitivity / Notes
nameRequired; non-whitespace, max 50 characters, indexed for lookup.Public
descriptionRequired on persistence and update; non-whitespace, max 1,000 characters.Public
priceEmbedded value object (originalPrice >= 0; discountPrice >= 0 and <= originalPrice).Monetary precision (18, 2)
statusDefaults to InStock; transitions between InStock and OutOfStock.Availability indicator only
averageRating, totalReviewsDefault to 0.0 and 0; updated exclusively via asynchronous feedback events.Derived projection
categoryId, publisherIdNullable taxonomy references; cleared to null if the parent taxonomy is deleted.Optional foreign keys

Domain Invariants & Lifecycle

  • Pricing integrity: Original price cannot be negative, and an optional discount price must be non-negative and never exceed the original price.
  • Availability semantics: New books default to InStock. Catalog availability indicates listing status for discovery and never acts as an inventory reservation or fulfillment guarantee.
  • Derived rating summary: averageRating and totalReviews are rebuilt from ReviewsDomainv1.0.0ReviewsCaptures individual customer feedback for books, publishes rating changes for Catalog discovery, and provides privacy-sc...Ownercatalog-experience-teamDiagramOpen docs events; removing the last review resets both fields to 0.
  • Soft-delete isolation: Deleting a book marks isDeleted = true rather than removing the record, automatically hiding the book and its author links from standard catalog queries.
  • Taxonomy replacement: Updating a book replaces its credited AuthorEntityv1.0.0AuthorRepresents a credited author of one or more books in the product catalog, enforcing display-name validity and referentia...Ownercatalog-experience-teamOpen docs links as a complete set.
Warning

Catalog price updates never retroactively change prices on existing Order ItemEntityv1.0.0Order ItemChild entity within an Order capturing a purchased book identifier, positive quantity, and locked checkout-time unit pri...Ownercommerce-fulfillment-teamOpen docs records. Conversely, if a ReviewsDomainv1.0.0ReviewsCaptures individual customer feedback for books, publishes rating changes for Catalog discovery, and provides privacy-sc...Ownercatalog-experience-teamDiagramOpen docs event arrives for a soft-deleted or nonexistent book, Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs emits Book rating update failedEventv1.0.0Book rating update failedIndicates that Catalog could not apply a feedback-created event because the referenced book was not found. Ownercatalog-experience-teamSchemaDiagramOpen docs so Reviews can compensate.

Relationships & Associated Operations

CategoryResourceRole / Interaction
Related EntitiesAuthorEntityv1.0.0AuthorRepresents a credited author of one or more books in the product catalog, enforcing display-name validity and referentia...Ownercatalog-experience-teamOpen docs, CategoryEntityv1.0.0CategorySingle-level taxonomy classification grouping books by subject or genre within the product catalog.Ownercatalog-experience-teamOpen docs, PublisherEntityv1.0.0PublisherRepresents a publishing house or imprint associated with books in the product catalog.Ownercatalog-experience-teamOpen docsIntra-context taxonomy and authorship relationships
Cross-Context ReferencesFeedbackEntityv1.0.0FeedbackRepresents an individual customer's rating and optional written review for a Catalog book.Ownercatalog-experience-teamOpen docs, Basket ItemEntityv1.0.0Basket ItemChild entry within a Basket pairing a Catalog book identifier with a positive requested quantity.Ownercommerce-fulfillment-teamOpen docs, Order ItemEntityv1.0.0Order ItemChild entity within an Order capturing a purchased book identifier, positive quantity, and locked checkout-time unit pri...Ownercommerce-fulfillment-teamOpen docsReferenced strictly by bookId across service boundaries
Mutating CommandsCreate bookCommandv1.0.0Create bookCreates a book listing and returns its generated UUID.Ownercatalog-experience-teamSchemaDiagramOpen docs, Update bookCommandv1.0.0Update bookUpdates an existing book listing, including optional image and catalog relationships.Ownercatalog-experience-teamSchemaDiagramOpen docs, Delete bookCommandv1.0.0Delete bookDeletes an existing book from the Catalog.Ownercatalog-experience-teamSchemaDiagramOpen docsManage book lifecycle, metadata, and soft deletion
Read QueriesGet bookQueryv1.0.0Get bookReturns one book and its catalog relationships by identifier.Ownercatalog-experience-teamSchemaDiagramOpen docs, List booksQueryv1.0.0List booksReturns a filterable collection of books with pricing, availability, relationships, and rating summaries.Ownercatalog-experience-teamSchemaDiagramOpen docs, Get book over gRPCQueryv1.0.0Get book over gRPCReturns one Catalog book by identifier through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs, Get books over gRPCQueryv1.0.0Get books over gRPCReturns multiple Catalog books by identifier through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs, List books over gRPCQueryv1.0.0List books over gRPCSearches and lists Catalog books with full metadata through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs, Get book details over gRPCQueryv1.0.0Get book details over gRPCReturns full Catalog book details by identifier through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs, Get catalog dashboard over gRPCQueryv1.0.0Get catalog dashboard over gRPCReturns Catalog totals and category counts through the admin-protected book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docsHTTP discovery, hybrid search, and internal gRPC lookups
EventsFeedback createdEventv1.0.0Feedback createdIndicates that a customer feedback rating was created for a book. Rating API publishes this event so Catalog can update ...Ownercatalog-experience-teamSchemaDiagramOpen docs, Feedback deletedEventv1.0.0Feedback deletedIndicates that a customer feedback rating was deleted for a book. Rating API publishes this event so Catalog can remove ...Ownercatalog-experience-teamSchemaDiagramOpen docs, Book rating update failedEventv1.0.0Book rating update failedIndicates that Catalog could not apply a feedback-created event because the referenced book was not found. Ownercatalog-experience-teamSchemaDiagramOpen docsConsume rating deltas and signal missing-book compensation