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.
-- Tenants and hierarchyCREATE TABLE tenant (tenant_id BIGINT PRIMARY KEY,parent_id BIGINT NULL,tenant_type VARCHAR(16) NOT NULL, -- GROUP/DIVISION/BRANDstatus VARCHAR(16) NOT NULL);-- Product master data: group-unique code + brand contextCREATE TABLE product (product_id BIGINT PRIMARY KEY,tenant_id BIGINT NOT NULL, -- owning brandglobal_sku VARCHAR(64) NOT NULL, -- unique across brandscategory_path VARCHAR(128) NOT NULL, -- fragrance/color cosmetics/skincareattrs JSON NOT NULL, -- shade, scent, sizecreated_at TIMESTAMP NOT NULL);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.
{"sku": "GLOBAL-000123","variant": {"shade": "W2", "volume_ml": 30},"batch": {"batch_no": "B2026A", "expire_at": "2029-08-01"},"sellable_rule": {"min_remain_days": 180}}
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:
// Unified tenant-context interception to avoid missed filterspublic class TenantAwareInterceptor implements StatementHandler {@Overridepublic void beforeQuery(StatementHandler h, Connection c, int timeout) {String tenantId = TenantContext.current();if (tenantId == null) throw new IllegalStateException("tenant missing");// Bind the tenant_id condition to the execution plan; forbid cross-tenant full-table scans}}
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.
POST /inventory/reserveIdempotency-Key: {requestId}{ "tenantId": "B01", "sku": "...", "qty": 2, "channel": "EC" }-- 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.
5. Unified Membership and Compliance: Consent First, Profiling Later
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.
{"oneId": "U-88213","consent": [{"scope": "cross_brand_profile", "granted": true, "version": "v3", "ts": "..."},{"scope": "marketing_push", "granted": false}]}
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_idandtrace_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
- Faking multi-tenancy with a
brand_idfield, with permission filters scattered everywhere. - Hard-coding promotion logic in shared services, with brand differences piled up as if-else branches.
- Strongly synchronized inventory deductions, making the central inventory a bottleneck during major promotions.
- No consent layering for members, causing cross-brand recommendations to overstep.
- 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.
