The public buy-side — browsing, cart, checkout handoff and the customer's order history.
storefront is the layer that sells: the public listing grids, the cart and buyer flow, the checkout handoff, and the shopper's account. It composes the catalog from products and writes orders through orders.
A tenant's shop runs on one of two coherent stacks, chosen by a persisted setting and switchable without a deploy.
| Backend | Catalog | Cart | Pay | Order lands in |
|---|---|---|---|---|
| kikstart | The tenant's database | The kikstart cart | A gateway: Stripe or PayFast | The tenant's orders |
| Shopify | Shopify's Storefront API | The same cart | Shopify-hosted checkout | Shopify, mirrored back into orders |
Both complete the buyer flow end to end. The cart is gateway-blind: it is handed its checkout action as a prop and never imports a gateway, and a cart built under one backend resets with a notice if the backend changes. The client cart price is display only; every gateway re-prices each line by slug and charges the gross total, and the paid webhook is the single source of truth for the order. Nothing fulfils on the redirect.
All public, anonymous, and all gated on the module.
| Route | Content |
|---|---|
/shop | Collection cards and the featured shelf. |
/shop/collections | Every collection in scope. |
/shop/[collection] | The listing with its filters. |
/shop/[collection]/[slug] | Product detail with the variant picker. |
/shop/search | Free-text search. |
/checkout/success, /cancel | The post-gateway landings. |
/account/orders | The customer's order history. |
/account/auth/[pathname] | Storefront customer sign-in. |
/shop is a fixed path. Tenant wording goes on the label, not the URL, because a shared route tree cannot carry a per-tenant segment without losing its static shell.
Only path segments drive the first page and get indexed; filters and sort are query parameters applied on the client. The sitemap lists every collection and product URL, so the catalog indexes by sitemap rather than by crawling.
The shop application-wide row: the backend, the Shopify domain and client-public storefront token, the root collection that scopes the shop, the home-page collection order, a fallback featured brand. Gateway secrets never live here; they are environment-sourced per tenant.
find and get_product, used by the shopping agent, which requires this module.
The shop, checkout and account routes render an access page in place, the header drops search, wishlist, account and cart, the home page's featured section renders nothing, and the shop's URLs leave the mega-menu and the sitemap. The marketing site and the catalog admin stay: a field tenant audits a catalog it does not sell.