Catalog

Catalog - Bounded Context & Strategic Domain Classification

Strategic domain classification, operational scope, out-of-scope boundaries, context mapping, and anti-corruption layer for the Catalog (PIM) domain module (obelaw/ium-catalog).

A resilient enterprise architecture depends on establishing unambiguous linguistic, systemic, and conceptual boundaries. In multi-channel commerce and manufacturing enterprises, product information touches nearly every organizational function—from brand marketing and catalog merchandising to automated warehouse sortation, POS retail checkout, shop floor assembly, and tax accounting. Without disciplined domain boundaries, product attributes become entangled with warehouse stock locations, commercial discount engines, and financial ledger balances.

The Catalog bounded context—provided by obelaw/ium-catalog—operates as the centralized authority governing canonical product definitions and engineering assembly specifications. It oversees the lifecycle of catalog entities from initial creative conception to terminal retirement, managing product hierarchies, variant option matrices, dynamic attribute schemas, multi-tree taxonomies, digital media associations, channel syndication readiness, and production Bills of Materials (BOM).


1. Strategic Domain Classification

Applying strategic Domain-Driven Design principles from Vlad Khononov’s Learning Domain-Driven Design, the Catalog domain is classified based on its strategic differentiation, organizational complexity, and competitive necessity:

flowchart TD
    subgraph Strategic_Classification["Strategic Domain Classification"]
        Core["Core Domain<br/>Catalog Differentiation & BOM Formulation"]
        Supporting["Supporting Subdomains<br/>Media Storage & Localization"]
        Generic["Generic Capabilities<br/>Standard Units of Measure & Barcode Symbology"]
    end
Classification PillarStrategic DesignationStrategic Architectural Rationale
Domain TypeCore DomainProprietary catalog structuring, dynamic attribute family schemas, multi-channel syndication gating, and engineering Bill of Materials (BOM) formulation provide direct competitive differentiation. They dictate time-to-market for new merchandise, eliminate fulfillment return rates caused by inaccurate specifications, and protect product intellectual property.
Supporting SubdomainsSupporting CapabilityDigital asset attachment mapping, role-based media tagging, and locale-specific translation workflows support the core catalog but do not provide standalone differentiation. They are customized to fit internal merchandise workflows.
Generic SubdomainsGeneric CapabilityOptical barcode check-digit validation (GS1 Modulo 10 algorithms), standard International System of Units (SI) conversions, and ISO country/language codes represent industry-standard mechanisms consumed off-the-shelf without proprietary adaptation.
Business Model AlignmentOmnichannel Master Data HubFunctions as the single source of truth for all sellable and manufactured merchandise, shielding downstream high-volume transactional engines from unstable catalog mutation cycles.
Evolutionary TrajectoryHigh Innovation InvestmentEvolves continuously with emerging sales channels, regulatory transparency mandates (such as Digital Product Passports and sustainability disclosures), and dynamic multi-market syndication rules.

2. Operational Scope

The Catalog bounded context directly owns and enforces invariants across the following functional capabilities:

  • Canonical Product & Variant Modeling: Maintaining strict separation between high-level merchandise concepts (Products / Standard Product Units - SPUs) and physically sellable, stockable items (Product Variants / Stock Keeping Units - SKUs).
  • Variant Option Matrices & Collision Prevention: Governing configurable dimensions (such as Size, Color, Capacity, or Voltage) and computing sparse Cartesian variant matrices while mathematically preventing duplicate option combinations.
  • Dynamic Attribute Families & Schema Validation: Defining extensible, strongly-typed attribute templates (numeric, text, unit-based, boolean, single/multi-choice) that enforce validation schemas across diverse categories without altering underlying database structures.
  • Multi-Tree Taxonomies: Segregating official, single-parent Master Reporting Taxonomies used for financial rollups from flexible, multi-parent Merchandising Category Trees used for promotional navigation and seasonal campaigns.
  • Digital Asset Management (DAM) Associations: Associating visual assets, technical specification sheets, and safety documentation with catalog entities using explicit semantic roles (hero_image, gallery_image, swatch_icon, tech_sheet).
  • Channel & Locale Scoping: Governing localized copy, channel-specific descriptions, and display titles across multiple sales platforms through an explicit four-tier fallback cascade.
  • Completeness Evaluation & Publication Gates: Calculating multi-dimensional readiness vectors and enforcing zero-tolerance publication gates before merchandise can be syndicated to public storefronts or retail registers.
  • Engineering Bill of Materials (BOM) & Assembly Recipes: Modeling multi-level component trees, raw material consumption rates, scrap percentages, and revision histories for assembled items and commercial kits.
  • Lifecycle Governance & Sunsetting: Managing explicit state progressions from initial draft creation to sell-down deprecation, superseding SKU re-routing, and immutable historical archival.

3. Out-of-Scope Boundaries

Preserving domain purity requires defining what Catalog strictly excludes. Operational and transactional concerns are delegated to dedicated bounded contexts:

Out-of-Scope Operational ConcernAuthoritative Bounded ContextBoundary Rationale & Data Ownership
Warehouse bin allocations, picking routes, and physical stock countsInventory / WMSCatalog defines package dimensions, gross weight, and storage handling rules; WMS owns shelf locations, bin capacities, and real-time physical availability.
Customer pricing agreements, promo codes, and discount calculationsSales / OMS & PricingCatalog maintains baseline manufacturer list prices (MSRP); OMS calculates customer tier adjustments, contractual discounts, and order totals.
Frontline register checkouts, drawer sessions, and split paymentsPoint of Sale (POS)Catalog supplies barcode-to-SKU mappings and tax categories; POS registers execute ultra-low-latency, offline-capable checkout sessions.
Double-entry journal entries, asset valuation, and revenue recognitionAccounting / FMSCatalog provides item categorization and standard production costs; FMS records balance sheets, tax liabilities, and general ledger postings.
Shop floor work centers, shift dispatching, and machine schedulingManufacturing / MRPCatalog defines the engineering assembly recipe (BOM); MRP orchestrates production order schedules, machine capacities, and worker shifts.
Vendor purchase orders, procurement contracts, and supplier lead timesPurchasing / ProcurementCatalog records vendor part numbers and raw material specifications; Procurement manages commercial purchase agreements and vendor performance.
Sales opportunity stages, prospect pipelines, and customer supportCRMCatalog exposes lookup snapshots for quotation lines; CRM tracks commercial relationships, lead scoring, and service tickets.
Freight carrier rate shopping, shipping manifests, and waybillsTransport / TMSCatalog provides packaged parcel weights and physical dimensions; TMS manages carrier booking, transit tracking, and vehicle dispatching.

[!IMPORTANT] Boundary Principle: The Catalog bounded context emits immutable domain events when product definitions or BOM recipes reach approved milestones. Downstream contexts subscribe to these events and materialize local projections. Catalog never mutates warehouse inventory directly, processes financial payments, or schedules shop floor work orders.


4. Context Mapping & Strategic Integration

The Catalog bounded context integrates with surrounding enterprise contexts through formal DDD relationship patterns, preventing schema coupling while guaranteeing reliable data syndication:

flowchart TD
    Catalog["Catalog Domain Core (ium-catalog)<br/>Strategic Master Hub"]

    WMS["Inventory / WMS"]
    OMS["Sales / Order Management"]
    POS["Point of Sale (POS)"]
    MRP["Manufacturing / MRP"]
    CRM["Customer Relationship Management"]
    FMS["Accounting / FMS"]
    Channels["Storefronts & Digital Marketplaces"]

    Catalog -->|Customer-Supplier<br/>ProductPublished, VariantCreated| WMS
    Catalog -->|Customer-Supplier<br/>ProductPublished, VariantUpdated| OMS
    Catalog -->|Snapshot Feed<br/>VariantBarcodeAssigned| POS
    Catalog -->|Customer-Supplier<br/>BOMRevisionApproved| MRP
    Catalog -->|Anti-Corruption Layer<br/>Catalog Lookups| CRM
    Catalog -->|Customer-Supplier<br/>TaxCategoryAssigned| FMS
    Catalog -->|Published Language<br/>ChannelSyndicated| Channels
Integrating Bounded ContextUpstream / DownstreamDDD Relationship PatternIntegration Interaction Contract
Inventory / WMSUpstream (Catalog) $\to$ Downstream (WMS)Customer-SupplierWMS reacts to VariantCreated and VariantUpdated to instantiate warehouse master item records with storage dimensions, handling flags, and gross weights.
Sales / OMSUpstream (Catalog) $\to$ Downstream (Sales)Customer-SupplierOMS subscribes to ProductPublished and ProductDeprecated to validate order line entries and refresh sellable catalog indexes.
Point of Sale (POS)Upstream (Catalog) $\to$ Downstream (POS)Snapshot FeedPOS terminals ingest lightweight catalog snapshots, pricing defaults, and barcode indexes to support offline-first laser and optical scanning.
Manufacturing (MRP)Upstream (Catalog) $\to$ Downstream (MRP)Customer-SupplierMRP ingests approved, immutable BOMRevisionApproved events to calculate gross component requirements and drive work order generation.
Customer Relationship (CRM)Upstream (Catalog) $\to$ Downstream (CRM)Anti-Corruption LayerCRM accesses read-only catalog lookup projections to populate quotation line items without coupling customer records to catalog internals.
Accounting / FMSUpstream (Catalog) $\to$ Downstream (FMS)Customer-SupplierFMS consumes item tax categories, standard cost estimates, and deprecation notices to establish automatic ledger posting rules.
Storefronts & MarketplacesUpstream (Catalog) $\to$ Downstream (Channels)Open Host / Published LanguageSyndication pipelines transform channel-scoped, localized payloads into denormalized search documents consumed by web and mobile storefronts.

5. Domain Isolation & Anti-Corruption Layer (ACL)

To guarantee that internal catalog modifications never cascade into neighboring operational engines, the Catalog domain enforces strict systemic isolation at the persistence and integration tiers.

Systemic Decoupling Guarantees

  1. Zero Database Coupling: Catalog internal storage structures never maintain foreign key constraints referencing external operational tables (such as sales order rows, warehouse bin records, or procurement requisitions).
  2. Natural Business Keys as Boundary Bridges: External contexts interact with Catalog exclusively through stable, natural business identifiers—specifically immutable SKU codes and globally standardized GTIN optical barcodes.
  3. Private Internal Identifiers: Internal synthetic keys, category node IDs, and draft entity states remain private to the Catalog bounded context and are never exposed across public contracts.

Anti-Corruption Layer (ACL) Architectural Engine

The Anti-Corruption Layer operates as a bidirectional translation barrier safeguarding the integrity of both inbound and outbound data flows:

sequenceDiagram
    participant Source as External Integration Source
    participant ACL as Anti-Corruption Layer (ACL)
    participant Core as Catalog Domain Core
    participant Bus as Enterprise Event Bus
    participant Downstream as Downstream Operational Contexts

    Source->>ACL: Raw Supplier Catalog Feed (CSV / EDI)
    ACL->>ACL: Normalize, Validate & Map to Import Contract
    ACL->>Core: Dispatch Canonical Catalog DTO
    Core->>Core: Enforce Domain Invariants & Completeness Gates
    Core->>Bus: Emit Immutable Domain Events
    Bus->>ACL: Intercept Event for Public Consumption
    ACL->>ACL: Transform to Downstream Specification DTO
    ACL->>Downstream: Distribute Channel-Ready Payload

The ACL executes five essential architectural translations:

  • Inbound Supplier Feed Normalization: Ingests disparate supplier catalogs, vendor spreadsheets, and electronic data interchange (EDI) formats, validating measurement units and mapping raw records into standardized Catalog import DTOs.
  • Downstream Warehouse Item Profiling: Translates internal variant dimension sets, packaging units, and temperature requirements into clean warehouse master item records consumed by WMS.
  • Storefront Search Denormalization: Flattens multi-dimensional product entities, localized attributes, variant matrices, and media URLs into fast, searchable documents optimized for indexing engines.
  • Frontline POS Scanner Ingestion: Transforms rich catalog objects into minimal, high-speed lookup payloads containing only SKU codes, optical barcodes, tax classes, and retail prices.
  • Manufacturing Recipe Explosion: Transforms multi-level, recursive Bill of Materials trees into flat production formulation structures specifying gross requirements, scrap ratios, and component part numbers for shop floor execution.

6. Pluggable Stock Strategy & Presentation Resources (obelaw/ium-catalog)

While enterprise deployments delegate physical bin-level stock to WMS, standalone or lightweight deployments often need built-in stock tracking. obelaw/ium-catalog bridges this cleanly via the Strategy Pattern (Obelaw\Ium\Catalog\Interfaces\StockManagerInterface), configured via CatalogConfigEnum::DEFAULT_STOCK_MANAGER (config('catalog.default_stock_manager')):

  • CatalogStockManager (Default): Tracks physical_quantity and reserved_quantity directly in obelaw_catalog_product_stocks (ProductStock morph model) with atomic reservations (reserve(), release(), fulfill()).
  • WmsStockManager (Enterprise WMS Adapter): Delegates getPhysical(), getReserved(), and getAvailable() to the external WMS bounded context while keeping the Product and ProductVariant (HasStock trait) API identical for UI and OMS consumers.
  • Read-Optimized Presentation Resources (Resources\*): ProductResource and ProductVariantResource serialize published products, variants, flat EAV attribute mappings, resolved media roles, and ATP stock balances without N+1 query overhead.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw