Book
Canonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxonomy links, and derived rating summaries.
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
| Property | Value |
|---|---|
| Bounded Context / Domain | CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs |
| Owning Service | 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 |
| DDD Role | Aggregate Root |
| Identifier Strategy | UUIDv7 generated at persistence |
| Persistence Store | Catalog relational database (books) |
| Deletion Semantics | Soft-delete (isDeleted flag excludes retired books from standard queries) |
| Concurrency Control | Optimistic concurrency via persistence-managed row version |
| PII / Data Classification | Public catalog metadata (non-PII) |
Attributes & Constraints
| Name | Type | Required | Description | Reference |
|---|---|---|---|---|
| id | UUID | required | Globally unique UUIDv7 identifier for the book. | — |
| name | string | required | Display title of the book (non-whitespace, up to 50 characters). | — |
| description | string | required | Synopsis or editorial description of the book (up to 1,000 characters). | — |
| image | string | optional | Cover image asset reference or URL (up to 255 characters). | — |
| price | object | required | Regular price and optional promotional sale price. | — |
| ↳originalPrice | decimal | required | Regular non-negative unit price. | — |
| ↳discountPrice | decimal | optional | Optional sale price; must be non-negative and not exceed originalPrice. | — |
| status | string InStockOutOfStock | required | Catalog listing availability state. | — |
| averageRating | double | required | Derived mean rating projected asynchronously from customer feedback. | — |
| totalReviews | integer | required | Derived count of customer reviews projected asynchronously. | — |
| categoryId | UUID | optional | Identifier of the assigned Category, if any. | categoryProperty: id |
| publisherId | UUID | optional | Identifier of the assigned Publisher, if any. | publisherProperty: id |
| authorIds | UUID[] | optional | Identifiers of the Authors credited on this book. | authorProperty: id |
| isDeleted | boolean | required | Soft-delete marker hiding retired books from standard queries. | — |
| createdAt | datetime | required | UTC timestamp when the book was created. | — |
| lastModifiedAt | datetime | optional | UTC timestamp of the most recent modification. | — |
| rowVersion | string | required | Persistence-managed optimistic concurrency token. | — |
| Attribute | Business Rule / Constraint | Sensitivity / Notes |
|---|---|---|
name | Required; non-whitespace, max 50 characters, indexed for lookup. | Public |
description | Required on persistence and update; non-whitespace, max 1,000 characters. | Public |
price | Embedded value object (originalPrice >= 0; discountPrice >= 0 and <= originalPrice). | Monetary precision (18, 2) |
status | Defaults to InStock; transitions between InStock and OutOfStock. | Availability indicator only |
averageRating, totalReviews | Default to 0.0 and 0; updated exclusively via asynchronous feedback events. | Derived projection |
categoryId, publisherId | Nullable 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:
averageRatingandtotalReviewsare 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 to0. - Soft-delete isolation: Deleting a book marks
isDeleted = truerather 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.
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
| Category | Resource | Role / Interaction |
|---|---|---|
| Related Entities | 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, 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 docs | Intra-context taxonomy and authorship relationships |
| Cross-Context References | FeedbackEntityv1.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 docs | Referenced strictly by bookId across service boundaries |
| Mutating Commands | Create 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 docs | Manage book lifecycle, metadata, and soft deletion |
| Read Queries | Get 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 docs | HTTP discovery, hybrid search, and internal gRPC lookups |
| Events | Feedback 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 docs | Consume rating deltas and signal missing-book compensation |