Storefront Factory
← All guides

Platform architecture

Why Storefront Factory publishes stores as data, not deployments

A practical explanation of how one shared commerce platform can publish and update focused storefronts without creating a new build for every store.

Most store builders treat every new storefront like a small software project. A theme is copied, configuration is written into source files, and a deployment pipeline turns that copy into another application. That works for a handful of stores. It becomes slow and expensive when merchants routinely test products, revise offers, pause losing ideas, and replace them.

Storefront Factory takes a different approach: a store is versioned commerce data served by one application. The renderer, checkout rules, security controls, and merchant workspace stay shared. The product facts, imagery, layout choices, offers, variants, shipping presentation, and policies belong to a tenant-scoped store record.

What changes when a store is data

Publishing no longer needs a repository, build, or deployment. The platform validates the draft, synchronizes the merchant's payment catalog, creates an immutable storefront version, moves the store's published-version pointer, and clears only that store's cached pages.

That creates several useful properties:

  • A merchant can revise copy or presentation without rebuilding an application.
  • A rollback selects a previous immutable version instead of reconstructing old source code.
  • Pausing a store changes its lifecycle state immediately.
  • Dormant stores do not need their own running application or deployment resources.
  • One security or checkout fix can improve the shared renderer rather than waiting for every copied store to upgrade.

Tenant isolation still matters

Sharing an application does not mean sharing merchant data. Every merchant-facing query is scoped through the authenticated user, active membership, merchant, and owned store. Public traffic resolves a store from the request hostname rather than accepting a store identifier from a query parameter.

The public cache identity includes the normalized hostname, store ID, published version, pathname, and safe request variations. That prevents a cached response for one merchant from appearing on another merchant's hostname. Checkout independently reloads current store state, so a stale browser page cannot buy from a paused or suspended store.

Commerce stays outside AI control

AI can help create a storefront direction, but it does not own the transaction. Storefront Factory keeps product amounts, discounts, shipping charges, Stripe identifiers, availability, and platform fees in server-controlled commerce records.

The browser submits selections such as an offer, variants, eligible add-ons, and a shipping option. The server resolves those selections against the published catalog and calculates the authoritative checkout. This boundary matters more than whether the page was written by a person, assembled from a template, or assisted by AI.

Where the data lives

The current platform uses Cloudflare D1 for relational tenant and commerce state, R2 for content-addressed product media, and Queues for recoverable work such as AI generation and verified payment-event processing. Stripe remains the financial source of truth for payments, refunds, disputes, and payouts.

Uploaded product photographs are stored in the platform's media system. Product prompts and images may be sent to the configured AI provider when a merchant explicitly starts generation. Public storefront configuration excludes secrets, private customer information, and raw provider credentials.

The honest limitations

This model is intentionally focused. The current release is designed for one product per store, with variants, quantity offers, add-ons, and flat-rate shipping. It is not a general-purpose marketplace, warehouse-management system, or arbitrary code editor.

Merchants who need a large catalog, extensive app marketplace, complex staff permissions, or bespoke backend logic should choose a broader commerce platform. Stores-as-data is an advantage when the job is launching and operating a focused product storefront quickly—not when the real requirement is unlimited platform customization.

The practical outcome

Treating stores as data makes the publication event smaller and easier to reason about. The merchant reviews a draft, the platform validates the commerce contract, and one pointer determines what the public hostname serves. That is the technical reason Storefront Factory can publish a new store without manufacturing another software project.