Multi-Brand Beauty Middle Platform Architecture: Design and Implementation

    This article walks through the architecture of a shared middle platform for a multi-brand beauty group spanning fragrance, color cosmetics, and skincare. It explains how to decide the right granularity of unification across a shared layer, a brand-level configuration layer, and a data/permission isolation layer; how to model "brand" as a first-class tenant rather than a plain field; how to choose among three multi-tenant isolation levels; how to design batch- and expiry-aware inventory with cross-channel fulfillment; and how to build a unified member identity with explicit consent. It closes with a mapping to common cloud capabilities, common anti-patterns, and a three-phase evolution path.

    1. Problem Definition: From “Every Brand on Its Own” to a “Shared Foundation”

    When a group consolidates the fragrance, color cosmetics, and skincare businesses scattered across multiple brands into a single division, the core tension on the technical side is not “whether to unify” but at what granularity to unify. Over-unification flattens brand identity, forcing premium and mass-market brands to share the same promotions and page logic. Under-unification degrades into a stack of independent systems with inconsistent data definitions, inventory overselling, and duplicate members.

    A sensible goal can therefore be broken into three layers:

    • Shared layer (group level): product master data, inventory center, order fulfillment, member primary key, payment and settlement, compliance and audit.
    • Configuration layer (brand level): pricing strategy, promotion rules, pages and content, channel switches, service commitments (delivery time, returns).
    • Isolation layer (data and permissions): data invisible across brands, operations roles that cannot exceed their authority, and report definitions that remain distinguishable.

    A simple rule decides which layer a capability belongs to: capabilities that change infrequently and carry consistent cross-brand semantics sink down; capabilities that change frequently and carry brand expression float up.

    2. Domain Modeling: Brand as a First-Class Citizen, Not a Field

    The most common anti-pattern is adding a brand_id field to every table and declaring multi-brand support complete. This leads to poor index selectivity, easy-to-miss permission filters, and no place to put brand-level differentiated rules. A more robust approach is to model “brand” as a tenant, and introduce a brand hierarchy (group—division—brand—product line) so that permissions and settlement can both be inherited along the hierarchy.

    1. -- Tenants and hierarchy
    2. CREATE TABLE tenant (
    3. tenant_id BIGINT PRIMARY KEY,
    4. parent_id BIGINT NULL,
    5. tenant_type VARCHAR(16) NOT NULL, -- GROUP/DIVISION/BRAND
    6. status VARCHAR(16) NOT NULL
    7. );
    8. -- Product master data: group-unique code + brand context
    9. CREATE TABLE product (
    10. product_id BIGINT PRIMARY KEY,
    11. tenant_id BIGINT NOT NULL, -- owning brand
    12. global_sku VARCHAR(64) NOT NULL, -- unique across brands
    13. category_path VARCHAR(128) NOT NULL, -- fragrance/color cosmetics/skincare
    14. attrs JSON NOT NULL, -- shade, scent, size
    15. created_at TIMESTAMP NOT NULL
    16. );
    17. CREATE INDEX idx_product_tenant ON product(tenant_id, category_path);

    The beauty category has several characteristics that must be modeled explicitly: multi-dimensional variants of shade and scent, sets (BOM combinations), production batches and expiry, and non-sellable inventory such as testers and samples. Batch and expiry cannot live only in the warehouse system; the sales side needs to filter sellability by “remaining shelf life,” otherwise near-expiry products get shipped.

    1. {
    2. "sku": "GLOBAL-000123",
    3. "variant": {"shade": "W2", "volume_ml": 30},
    4. "batch": {"batch_no": "B2026A", "expire_at": "2029-08-01"},
    5. "sellable_rule": {"min_remain_days": 180}
    6. }

    3. Choosing an Isolation Level: Don’t Use One Size for All

    There are three typical forms of multi-tenant isolation, to be mixed according to data sensitivity and scale:

    Isolation level Suitable data Advantages Cost
    Shared table + tenant_id Products, content, configuration Low cost, easy unified operations Requires enforced filtering, override risk
    Separate schema Orders, payments Clear boundaries Complex migration and statistics
    Separate instance Highly sensitive member data Strong compliance Highest operations cost

    The key engineering constraint is to inject the tenant condition at the data access layer, rather than relying on business code to remember:

    1. // Unified tenant-context interception to avoid missed filters
    2. public class TenantAwareInterceptor implements StatementHandler {
    3. @Override
    4. public void beforeQuery(StatementHandler h, Connection c, int timeout) {
    5. String tenantId = TenantContext.current();
    6. if (tenantId == null) throw new IllegalStateException("tenant missing");
    7. // Bind the tenant_id condition to the execution plan; forbid cross-tenant full-table scans
    8. }
    9. }

    4. Inventory and Omnichannel Fulfillment: Consistency Over Real-Time

    The inventory profile of fragrance and beauty is “high value, low volume, batch-sensitive.” The design should split inventory into four states—available, reserved, in-transit, locked—route all deductions through a two-phase “reserve—confirm—release” flow, and use an idempotency key to make retries safe.

    1. POST /inventory/reserve
    2. Idempotency-Key: {requestId}
    3. { "tenantId": "B01", "sku": "...", "qty": 2, "channel": "EC" }
    4. -- On conflict, return 409 with the available balance, letting the frontend decide whether to switch warehouses

    When sharing inventory across channels, use a central inventory + regional buffer structure: the central ledger is authoritative, and regions are pre-allocated by safety stock to avoid hitting the center on every request. Reconciliation is based on the event stream: stock.changed events are delivered through a message queue, consumers perform idempotent upserts, and eventual consistency is enough—no strong synchronization is required.

    The most sensitive part of multi-brand integration is member data. A workable path is to establish a group-wide primary key (One ID) while keeping attribute data tied to its brand; cross-brand sharing must be based on explicit user consent, with the consent version and revocation status recorded.

    1. {
    2. "oneId": "U-88213",
    3. "consent": [
    4. {"scope": "cross_brand_profile", "granted": true, "version": "v3", "ts": "..."},
    5. {"scope": "marketing_push", "granted": false}
    6. ]
    7. }

    Engineering follows data minimization: the brand side takes only the fields it needs, revoking consent must trigger cascading invalidation of downstream tags and profiles, and auditable operation logs are retained.

    6. Implementation: Mapping to Common Cloud Capabilities

    • A container platform hosts stateless services, with namespace and quota isolation per brand.
    • A message queue handles event distribution and peak shaving for inventory, orders, and consent changes.
    • Object storage holds brand visual assets and content, distributed via CDN.
    • A logging service plus monitoring and alerting builds an observability system keyed primarily on tenant_id and trace_id.
    • A configuration center enables brand-level canary and feature switches, so onboarding a new brand requires no code changes.

    The standardized onboarding flow for a new brand can be fixed as a checklist: create the tenant and hierarchy → map product categories → set inventory warehouses and buffer strategy → configure pricing and promotions → set channel switches → bind permission roles → canary rollout and observability dashboard.

    7. Common Anti-Patterns and Evolution Path

    1. Faking multi-tenancy with a brand_id field, with permission filters scattered everywhere.
    2. Hard-coding promotion logic in shared services, with brand differences piled up as if-else branches.
    3. Strongly synchronized inventory deductions, making the central inventory a bottleneck during major promotions.
    4. No consent layering for members, causing cross-brand recommendations to overstep.
    5. Report definitions computed separately per brand, so the group cannot consolidate.

    A three-phase evolution is recommended: first unify product and inventory master data (consistent definitions), then unify orders and the member primary key (consistent experience), and finally open brand self-service configuration and data services (consistent efficiency). Each phase uses a rollback-capable canary release and clear observability metrics as entry gates, so that the group gains real reuse benefits while preserving brand independence.