Category
Single-level taxonomy classification grouping books by subject or genre within the product catalog.
Domain Role & Boundary
Category is an 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 single-level subject or genre classification for books. 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, it provides a controlled vocabulary for storefront filtering and backoffice organization. It explicitly does not own a collection of books or hierarchical parent-child category trees; books reference their category by identifier.
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 (categories) |
| Deletion Semantics | Hard-delete; clears categoryId to null on affected BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs records |
| Concurrency Control | Last-write-wins (unique name constraint enforced by store) |
| PII / Data Classification | Public catalog metadata (non-PII) |
Attributes & Constraints
| Name | Type | Required | Description | Reference |
|---|---|---|---|---|
| id | UUID | required | Globally unique UUIDv7 identifier for the category. | — |
| name | string | required | Unique category display name (non-whitespace, up to 50 characters). | — |
| Attribute | Business Rule / Constraint | Sensitivity / Notes |
|---|---|---|
id | Immutable primary identifier generated as UUIDv7. | Public identifier |
name | Required, non-whitespace, max 50 characters, globally unique across categories. | Unique index enforced |
Domain Invariants & Lifecycle
- Name required: Creating or renaming a category with a null, empty, or whitespace-only name is rejected.
- Global uniqueness: Duplicate category names are rejected by the persistence layer to keep storefront filters unambiguous.
- Non-cascading hard delete: Removing a category permanently deletes the category record and sets
categoryIdto null on any linked BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs without deleting the books themselves. - Lifecycle events: Creation, renaming, and deletion raise internal domain events within 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.
Because categories are flat (single-level) and hard-deleted, renaming a category immediately reflects across all referencing books without migrating child trees.
Relationships & Associated Operations
| Category | Resource | Role / Interaction |
|---|---|---|
| Related Entities | BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs | One category classifies zero or more books via books.categoryId |
| Mutating Commands | Create categoryCommandv1.0.0Create categoryCreates a category in the Catalog.Ownercatalog-experience-teamSchemaDiagramOpen docs, Update categoryCommandv1.0.0Update categoryUpdates an existing category in the Catalog.Ownercatalog-experience-teamSchemaDiagramOpen docs, Delete categoryCommandv1.0.0Delete categoryDeletes an existing category from the Catalog.Ownercatalog-experience-teamSchemaDiagramOpen docs | Create, rename, or remove a category |
| Read Queries | List categoriesQueryv1.0.0List categoriesReturns all categories known to the Catalog.Ownercatalog-experience-teamSchemaDiagramOpen docs, List categories over gRPCQueryv1.0.0List categories over gRPCReturns all Catalog categories through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs | Storefront filter lists and internal gRPC lookups |