# Build your own storefront

Source: https://snizu.dev/docs/storefronts

<StarterStage>
```tsx tab="Next.js" lineNumbers
// 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} />;
}
```

```ts tab="Any runtime" lineNumbers
// 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"));
}
```
</StarterStage>

## Packages [#packages]

<Packages items={[{"name":"@snizu/storefront","description":"The client: catalog, cart, customer and store. No dependencies.","install":"npm i @snizu/storefront","href":"/docs/storefronts/storefront-client"},{"name":"@snizu/react","description":"A provider and hooks, with optimistic carts.","install":"npm i @snizu/react","href":"/docs/storefronts/react"},{"name":"create-snizu-storefront","description":"The Next.js starter, Arabic and English from the address.","install":"npm create snizu-storefront","href":"/docs/storefronts/nextjs-starter"}]} />

<Callout tone="success" title="Checkout stays ours">
`cart.checkoutUrl()` sends the shopper to the hosted checkout, so your storefront never handles a card number. Orders come back to you as `order.created`.
</Callout>

## Where to start [#where-to-start]

- **A whole shop in minutes:** [the Next.js starter](/docs/storefronts/nextjs-starter) has every page, both languages, SEO and webhooks done.
- **Your own stack:** [`@snizu/storefront`](/docs/storefronts/storefront-client) works anywhere `fetch` does, and [`@snizu/react`](/docs/storefronts/react) adds hooks for React.
- **Every endpoint:** the [Storefront API reference](/reference/store/catalog/list-storefront-products) 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.