Catalog
Overview
Tenant products, categories, tags, and per-channel listings.
Responsibilities
- Product command and query.
- Catalog ingestion and product import from channels.
- Publish allocation changes into the stock sync path.
Code map
| Piece | Path |
|---|---|
| Product feature | src/modules/commerce/product |
| Category, tag | src/modules/commerce/category, src/modules/commerce/tag |
| Schema | 20-catalog.prisma |
| Embedding listener | product-embedding.listener.ts |
Entities: Product, ChannelListing, CatalogProduct, Category, Tag.
Business rules
Channel allocation mode, buffer, min/max publish quantity, and zero-quantity behaviour live on Channel as defaults and can exist per listing. Publishing policy is data. The numeric formula was not extracted. See Inventory.
product.content.changed and product.channel-allocation.changed are in-process events, not outbox types found in enqueue calls.
API surface
Product, category, and tag controllers. Channel product sync endpoints also exist on provider controllers (Amazon, BigCommerce, and others). Use OpenAPI.
Events
| Event | Listener |
|---|---|
product.content.changed | embedding |
product.channel-allocation.changed | ProductStockSyncListener |
Integrations
Marketplace catalog services are auto-registered when the class name matches {Provider}CatalogService. A provider without both order and catalog services is not registered.
Failure scenarios
Embedding failures are caught so API boot does not require the AI gateway. Content embeddings can lag. That is separate from inventory publish.
Development
Do not import a marketplace SDK into the product module. Call the integration from src/integrations.