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

Read the architecture guide →

Category

Single-level taxonomy classification grouping books by subject or genre within the product catalog.

Aggregate RootAggregate Root

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

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 (categories)
Deletion SemanticsHard-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 ControlLast-write-wins (unique name constraint enforced by store)
PII / Data ClassificationPublic catalog metadata (non-PII)

Attributes & Constraints

NameTypeRequiredDescriptionReference
idUUIDrequiredGlobally unique UUIDv7 identifier for the category.—
namestringrequiredUnique category display name (non-whitespace, up to 50 characters).—
AttributeBusiness Rule / ConstraintSensitivity / Notes
idImmutable primary identifier generated as UUIDv7.Public identifier
nameRequired, 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 categoryId to 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.
Note

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

CategoryResourceRole / Interaction
Related EntitiesBookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docsOne category classifies zero or more books via books.categoryId
Mutating CommandsCreate 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 docsCreate, rename, or remove a category
Read QueriesList 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 docsStorefront filter lists and internal gRPC lookups