The Catalog module provides a flexible product/service catalog that feeds the billing system. It manages plan definitions, add-on offerings, entitlement mappings, and configurable catalog items.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/catalog/items | POST | Create catalog item |
/api/catalog/items | GET | List catalog items |
/api/catalog/items/{id} | GET | Get item details |
/api/catalog/plans | POST | Create plan |
/api/catalog/plans | GET | List plans |
/api/catalog/add-ons | POST | Add add-on to plan |
/api/catalog/offerings/{tenantId} | PUT | Set tenant catalog offering |
/api/catalog/entitlements/{planId} | POST | Map entitlement to plan |
Architecture
CatalogEndpoints (Minimal API) │ ▼CatalogService │ ├── ICatalogRepository → SqlSugarCatalogRepository ├── ICatalogEntitlementMappingStore └── ICatalogEventPublisher → NullCatalogEventPublisherCatalogItem entity
public class CatalogItemEntity : TenantSoftDeleteEntityBase{ public string Name { get; set; } public string Description { get; set; } public string ItemType { get; set; } // Plan, AddOn, Feature, Entitlement public string? Metadata { get; set; } // JSON configuration public bool IsActive { get; set; }}Entitlement mapping
Plan → CatalogOffering → EntitlementMapping → Quota Key| Concept | Description |
|---|---|
| Catalog Item | Individual product/feature definition |
| Plan | Bundle of entitlements at a price point |
| Add-On | Optional feature addable to any plan |
| Entitlement Mapping | Links catalog items to quota keys |
| Catalog Offering | Per-tenant assigned plan + add-ons |
Plans and add-ons
Plans define the base subscription tier; add-ons extend functionality:
Free Plan → { storage: 1GB, tickets: 10, chat: 1 channel }Pro Plan → { storage: 100GB, tickets: 100, chat: 10 channels }Enterprise Plan → { storage: unlimited, tickets: unlimited, chat: unlimited }+ Extra Storage → { storage: +50GB }+ Priority Support → { tickets: priority queue }See also
- Billing module — Subscription and invoice management
- Quota building block — Quota enforcement