@ecomweb/storefront-kit
@ecomweb/storefront-kit is the headless storefront logic for EcomWeb stores on Next.js 16: auth and session, the same-origin API proxy, cart, checkout, order status and the middleware. It has no UI, so you own every page and component. It builds on @ecomweb/sdk.
pnpm add @ecomweb/storefront-kit @ecomweb/sdkThe package has five entry points. Each link opens its source on GitHub.
| Entry point | Use it from | What it holds |
|---|---|---|
@ecomweb/storefront-kit |
Client and server components | The provider, hooks such as useAuth, useCart and useCheckout, and helpers for prices, paths and metafields |
@ecomweb/storefront-kit/server |
Route handlers and server components | createAuthRoutes, createBackendProxy, requireSession and server config |
@ecomweb/storefront-kit/middleware |
proxy.ts |
createStorefrontMiddleware |
@ecomweb/storefront-kit/config |
Anywhere | publicConfig, parsePublicConfig and resolveMode |
@ecomweb/storefront-kit/theme |
Theme code | defineTheme, defineSchema and the theme slot types |
Source and full API
Section titled “Source and full API”The source is public, with a doc comment on every key function. Read it there, or point your AI coding tool at it:
To move to a new version, follow Upgrade the storefront kit.