← Back to blog
Commerce platform · 4 min read

Giving each storefront a place in a shared commerce platform

Tenant handles, seller modules and product assignment in the Buwigs Shop commerce foundation.

Buwigs Shop logo
Inside the projectBuwigs Shop

Tenant-based storefronts · Seller management · Product assignment

A shared commerce backend needs a clear answer to a deceptively simple question: which products belong in this shop? Without an explicit model, storefront identity can become a loose collection of filters applied differently across the application.

Buwigs Shop extends a Medusa backend with tenant and seller modules. Tenants have names, unique handles and an active or suspended status, while dedicated workflows assign and detach products from a tenant.

Storefront identity belongs in the model

A unique handle provides an addressable identity for a storefront. Store API routes can resolve that identity before selecting products, making the tenant boundary part of the application contract rather than a visual convention.

This does not automatically guarantee isolation. The usefulness of the model depends on consistent enforcement across routes, searches, product assignment and administration. A tenant concept is a starting point for correctness, not proof that every boundary has been secured.

Decisions that matter

Model storefronts as tenants

A dedicated tenant model includes unique handles and active or suspended status. Store routes resolve tenants by handle.

What this asks of the system

Every tenant-facing query needs to preserve the intended catalog boundary.

Build on commerce primitives

The backend extends Medusa with tenant and seller modules, links and workflows.

What this asks of the system

Custom modules must remain compatible with the underlying commerce framework.

Make product assignment an operation

Dedicated workflows assign and detach tenant products, rather than treating catalog membership as display-only state.

What this asks of the system

Catalog changes must coordinate module links and storefront queries.

How it fits together

The key steps make the boundaries of the product easier to see:

  1. An administrator creates a tenant with a unique storefront handle.
  2. Product assignment workflows establish the catalog associated with that tenant.
  3. Storefront requests resolve the handle and retrieve the corresponding commerce data.

A practical walkthrough

Consider a product that is assigned to one storefront and later detached from it. An administrator may see a successful assignment operation, but the change also needs to make sense in product lists, search results and direct product access. The storefront boundary must survive more than the first catalog query.

This is a review scenario derived from the tenant and product-assignment model, not a claim about a particular deployment. Following a product through assignment, removal and tenant suspension helps reveal where business identity is enforced and where it is only assumed. It also gives the team a concrete basis for discussing how quickly a storefront should reflect an administrative change and which cached responses might still contain earlier data.

Questions worth asking

  • Do catalog and direct product routes apply the same storefront boundary?
  • What should visitors see when a tenant is suspended?
  • Does removing a product assignment affect every relevant retrieval path?

What we take from it

Extending commerce primitives avoids rebuilding every product and catalog operation from scratch. The tradeoff is integration work: custom modules, framework links and storefront queries need to evolve together.

The most useful abstraction is one that matches a business responsibility. Here, a tenant represents a storefront that staff can name, manage and change through explicit operations.

Have a similar challenge?Let’s talk about your project ↗