Build your own storefront
Any stack, any runtime. Sell from your own pages with the Storefront API, and send shoppers to the store's hosted checkout when it's time to pay.
1 min read
siwagrove.com/ar
بستان سيوةالتمورالحلوياتالسلة (٢)
تمر سكري، ١ كجم٤٥٠ ج.م
بسبوسة بالقشطة٢٢٠ ج.م
كنافة بالمكسرات٣٤٠ ج.م// app/[locale]/page.tsx
import {
createServerStorefront,
} from "@snizu/storefront/server";
import { cookies } from "next/headers";
export default async function Home({ params }) {
const { locale } = await params;
const shop = createServerStorefront({
publishableKey: process.env.SNIZU_PK,
locale, // "ar" or "en"
cookies: await cookies(),
});
const { data } = await shop.catalog.products({ limit: 3 });
return <ProductGrid products={data} />;
}// Browsers, Node, Deno, Bun and edge workers
import { createStorefront, formatMoney } from "@snizu/storefront";
const shop = createStorefront({
publishableKey: "pk_…", // safe in a browser
locale: "ar",
country: "EG",
});
const { data } = await shop.catalog.products({ limit: 3 });
for (const product of data) {
console.log(product.title, formatMoney(product.price_range.min, "ar"));
}Packages
- @snizu/storefront2.0.0
The client: catalog, cart, customer and store. No dependencies.
npm i @snizu/storefront - @snizu/react2.0.0
A provider and hooks, with optimistic carts.
npm i @snizu/react The Next.js starter, Arabic and English from the address.
npm create snizu-storefront
Where to start
- A whole shop in minutes: the Next.js starter has every page, both languages, SEO and webhooks done.
- Your own stack:
@snizu/storefrontworks anywherefetchdoes, and@snizu/reactadds hooks for React. - Every endpoint: the Storefront API reference lists each operation the client calls.
All you need is the store's publishable key, from the admin under Settings → API keys. It's made for browsers: it reads what the store publishes and opens carts, nothing more.
Was this page helpful?
Updated 25 Nov 2026