Developer docs

StoreOS Dev Docs

Everything you need to build headless commerce — catalog, checkout, orders, payments, and delivery APIs for your storefront.

TypeScript SDK

Accelerate development with the SDK

Install @storeos/storefront-client and connect your storefront to StoreOS in minutes.

  • Typed catalog, auth, and checkout methods
  • Tenant UID and auth headers handled for you
  • Works with Next.js, Remix, or any JS framework
bun add @storeos/storefront-client

Quick start

Connect your storefront

Three steps from environment variables to a live product catalog. Works with Next.js, Remix, or any framework that can call the SDK.

01

Set your tenant

Add your store's tenant UID to .env.local. You'll get this from the StoreOS console after onboarding.

.env.local
NEXT_PUBLIC_SITE_API_TENANT=your-tenant-uid
NEXT_PUBLIC_SITE_URL=http://localhost:3000

02

Create your store client

Instantiate StoreFront once and reuse it across pages — auth headers and tenant scoping are handled for you.

lib/store.ts
import { StoreFront } from "@storeos/storefront-client";

export const store = new StoreFront({
  tenant: process.env.NEXT_PUBLIC_SITE_API_TENANT!,
});

03

Fetch your catalog

Drop the SDK into an existing page. The highlighted lines are all you need to load products — the rest is your UI.

app/page.tsx
import { store } from "@/lib/store";

export default async function CatalogPage() {
  const { nodes: products } = await store.getProducts({
    limit: 24,
  });

  return (
    <main>
      <h1>Products</h1>
      <ul>
        {products.map((product) => (
          <li key={product.id}>{product.name}</li>
        ))}
      </ul>
    </main>
  );
}

Next step

Launch your storefront

Read the introduction to understand the architecture, or jump straight into the interactive API reference.