@fayz-ai/storefront
v0.22.0
Published
Fayz SDK storefront kit — Shopify-style customer-facing ecommerce template components
Maintainers
Readme
@fayz-ai/storefront
Shopify-style customer-facing storefront, assembled from data — hero, products, cart, checkout, all themeable.
Status: beta — published to npm and used across Fayz dogfood apps. Pre-1.0: minor APIs may change before 1.0.
@fayz-ai/storefront is the customer-facing surface of the Fayz SDK: a storefront scaffold that renders a page as a tree of blocks (hero, products, manifesto, cart, …) defined in the app manifest. Two completely different brands come out of the same template with zero custom components — the storefront is data, not a fork.
It reads commerce from @fayz-ai/shop, so the same engine powering an admin also powers the public store. Customize from labels to a fully bespoke section via the customization ladder — never by editing this package.
What's inside
- Scaffold —
defineStorefront(config)+StorefrontScaffoldrendered byrenderApp - Block system —
registerStorefrontBlocks,sectionsToBlocks(sections as registry blocks) - Factory path —
createStorefrontApp,initStorefrontRuntime,StorefrontShell - Routing — hash router (
Link,navigateTo,useHashPath,matchPath) - Config hook —
useStorefrontConfig
Install
npm install @fayz-ai/storefrontPeer deps: @fayz-ai/core, @fayz-ai/ui, @fayz-ai/shop, @fayz-ai/auth (+ react, react-dom).
Usage
import { renderApp } from '@fayz-ai/core'
import { defineStorefront } from '@fayz-ai/storefront'
export function App() {
return renderApp(defineStorefront(config), { surface: 'storefront' })
}Part of the Fayz SDK
The storefront surface over @fayz-ai/shop. The admin counterpart is built with @fayz-ai/admin; both are surfaces of one manifest.
Roadmap & contributing
Built and evolving in the open. See the Fayz SDK roadmap.
