Product & SKU Architecture: Structured Configuration System

This article explains how we use a structured SKU system to manage thousands of product configurations.

The Problem: Combinatorial Explosion

A configurable product has many options:

  • 17 chassis types × 17 processors × 8 RAM sizes × 19 storage sizes × 6 WiFi options × 9 OS options = 2,372,112 possible configurations

Managing each configuration manually is impossible:

  • 2,372,112 product descriptions to write

  • 2,372,112 price calculations to maintain

  • 2,372,112 inventory records to track

  • 2,372,112 product pages to create

We need a system that generates configurations dynamically.

The Solution: SKU-Based Architecture

We use a hyphen-separated SKU structure where each segment represents a component:

Format: Chassis-Board-RAM-Flash-Adapter-WiFi-OS-Accessories

Example: Treo-97-8-512-65-ax200-W11P-KM

From this SKU, we can:

  • Extract features (processor, RAM, storage)

  • Calculate price (sum of component costs)

  • Generate description (combine component names)

  • Check stock (verify all components available)

Single Source of Truth: productdb

The product database (productdb.json) is the single source of truth for all product information:

  • Format: JSON with categories as top-level keys

  • Categories: Chassis, Board, RAM, Flash, Adapter, WiFi BT, OS, Accessories, Component, Custom

Productdb Structure

Each product has:

  • PartID: Unique identifier (e.g., "Treo", "97", "8")

  • internal: Internal name for employees

  • external: External name for customers

  • class: Product class for compatibility rules

  • allows: Constraints on compatible parts

  • provides: Features provided by this part

  • weight: Weight in grams

  • constituents: For composite parts, list of sub-components

Example Productdb Entry

Productdb entries include chassis, board, RAM, flash, adapter, WiFi BT, OS, and accessories with their specifications.

SKU Structure

SKUs are hyphen-separated strings of part IDs:

  • Format: {Chassis}-{Board}-{RAM}-{Flash}-{Adapter}-{WiFi BT}-{OS}-{Accessories}

  • Example: Treo-97-8-512-65-ax200-W11P-KM

  • Length: Always 8 parts (some may be empty for optional categories)

SKU Parsing

The SKU is parsed using part_sequence which defines the order of categories.

Feature Extraction

Features are extracted from productdb using find_features():

  1. Start with part: Get the part from productdb
  2. Add provides: Copy all features from provides field
  3. Process constituents: Recursively add features from sub-components
  4. Multiply numeric values: For quantities (e.g., weight, RAM)

Feature Aggregation

For a complete SKU, features from all parts are aggregated. The aggregation process combines features from all parts in the SKU.

Feature Sequence

feature_sequence defines how features are displayed:

  • Key: Feature name (e.g., "Processor Model", "Screen Size")

  • Value: Dict with Unit and Heading

  • Headings: Processing, Display, Audio, Connectivity, Networking, Power, Environmental, Physical, Accessories, Operating System

Feature Sequence

feature_sequence defines how features are displayed with their units and headings.

Facets for Filtering

FACETS_FOR_FILTERING is dynamically generated from feature_sequence:

  • Excludes: OS Features, Dimensions, Weight, Cache

  • Groups by heading: Processing, Display, Audio, etc.

  • Used for: Query page filters, product search

Filter Facets Structure

FACETS_FOR_FILTERING groups features by heading for query page filters.

Feature Tables

Feature tables are generated from product_features():

  1. Group by heading: Processing, Display, etc.
  2. Format values: Add units where applicable
  3. Display in 2-column layout: Balanced for product pages

Feature Table Example

Processing
Processor Model Intel i5-12400
Cores 6
Max Frequency 4.4 GHz
Main Memory 16 GB
Display
Screen Size 21.5 inch
Resolution 1920 × 1080
Brightness 250 nits

Cross-References

External Links

Summary

The product & SKU architecture provides:

  • Single source of truth: productdb.json for all product information

  • Feature extraction: Automatic feature aggregation from parts

  • Filtering: FACETS_FOR_FILTERING for query page filters

  • Feature tables: Grouped features for product pages

  • SKU parsing: Hyphen-separated part IDs for product composition