Skip to main content

Ubiquitous language

The terms product-discovery speaks, each with the identifier that implements it. The first table is the context's own vocabulary, the second the neighbour terms it projects but does not own (their definitions belong to the owning context), the third terms that are easy to confuse. The storefront-wide glossary is on the aggregator site.

Source: internal/domain/{productview,categoryview,search,shared}, internal/application/{ports,usecases}.

Own terms​

TermDefinitionCode identifierNot to be confused with
Product ViewThe projection one product page or search hit renders from: one row per catalogue item, folded from factsproductview.ViewThe catalogue item (offer-availability) or its content (product-content)
Category ViewThe browsable tree of one published version, with purchasable counts per categorycategoryview.View, categoryview.CountedThe category tree aggregate in product-content, which owns the tree; this view adds counts
PurchasableItem ACTIVE, content PUBLISHED, price ACTIVE, and at least one LIVE listing with availableQty above 0View.PurchasableThe network's sellable listing (one node): purchasable is an item-level verdict this context derives
In StockAt least one LIVE listing with availableQty above 0View.InStockPurchasable: stock is one of its four inputs
SearchableItem ACTIVE and content PUBLISHED: the row is offered in search and browse, even when unpurchasableView.SearchablePurchasable
StubThe invisible row an out-of-order fact creates before CatalogItemCreated has completed it; IsStub is true while the title is emptyproductview.Stub, View.IsStubA deleted or draft product
FoldApplying one fact to a row under a per-source guard; answers Applied or StaleView.Apply..., productview.OutcomeA command: a fold never rejects a well-formed fact
Monotonic guardPer-source ordering: listing asOf, content revision, price version, tree version must be strictly newer; an older fact is Stalethe comparisons in fold_listing.go, fold_content.go, fold_price.go, categoryview.ReplaceThe inbox: the inbox deduplicates by id, the guard orders by source sequence
InboxThe claim on the CloudEvents id, in the same transaction as the foldports.Inbox, table processed_eventsThe guard
Listing item mapRead-side lookup listingId to catalogItemId, learned from listing eventsports.ListingItemMap, table listing_itemsThe listing itself
Product-type queryA search for a kind of product; the answer adds category suggestions (categories whose name covers every query word, shallowest first, at most 5)categoryview.View.Suggestions, usecases.MaxSuggestionsA navigational query (a category name) or an item-specific one (brand and model)
BrowseA query with no free text: a plain filtered listingsearch.Query.BrowseSearch
Typo fallbackThe pg_trgm similarity match used when a first full-text page finds nothing; similarity at least 0.3search.SimilarityThreshold, search.ModeTrgmSynonym or stem expansion
ModeThe matching strategy of a page: browse, fts or trgm; recorded in the cursorsearch.ModeSort
CursorThe opaque keyset position after the last hit (base64url JSON), bound to a sort and a modesearch.CursorAn offset
FacetA filter axis with counts over the whole filtered result: category, price-band, in-stocksearch.Facet, search.NewFacetsFree-form filters
Price bandA range of effective price in minor units, lower edge included; edges from PRICE_BAND_EDGES, default 2500, 5000, 10000, 25000search.Band, search.BandsA price filter (priceMin, priceMax)
Search portThe port search sits behind: PostgreSQL full-text search plus pg_trgm today, a dedicated engine laterports.SearchPortA ranking service: the weights are fixed
Snapshot rebuildSeeding the projections from the producers' paged reads, through the same fold rules; ops-run, never on a user requestusecases.Rebuilder, cmd/rebuildA user-request read
Dead letterA message copied to <topic>.dlq with x-dlq-* headers because it can never be applied or exhausted its attemptsDLQSuffix and publishDeadLetter (internal/adapters/inbound/kafka/deadletter.go)A skipped message (not a CloudEvent, unknown type)
Invalid factA consumed or snapshot fact that can never be folded (bad id, negative quantity, bad price)shared.ErrInvalidFactA stale fact
SkillOne A2A capability: search_products or get_productskills in internal/adapters/inbound/a2aAn MCP tool (there is none)

Neighbour terms this context projects​

TermOwner's definitionOwner
Catalog itemThe network's own entry for a product, independent of who ships itoffer-availability
ListingA catalogue item offered from one node; states LIVE and SUPPRESSEDoffer-availability
Available quantityWhat a node claims it can ship now for one listing, with the asOf of the claimoffer-availability
Effective priceThe lowest active sale price, else the list pricepricing
Product contentDescription, bullets, attributes and media of one catalogue item; one revision per publicationproduct-content
Category treeThe single, versioned tree of categoriesproduct-content

Terms to keep apart​

TermIsIs not
ACTIVE / DISCONTINUEDThe item master states of the whole itemThe listing states LIVE / SUPPRESSED
PUBLISHED / RETIREDThe content state this row knowsA producer's DRAFT (the rebuild skips drafts)
ACTIVE / WITHDRAWNThe price state this row knowsA zero price: a withdrawn price clears the amounts
StaleA fact the guard dropped; acknowledged, not an errorInvalid: a fact that can never be folded, dead-lettered
UnavailableA row that is not purchasable, still shown as currently unavailableNot found: a stub or unknown id is a 404