Builder for developers
Your store reads what you publish in the Builder through a few npm packages. create-store scaffolds a Next.js store; with --builder-mode build it also adds a Builder
site wired to them. This page lists each package, its current version and what it is for.
The packages
| Package | Version | What it is for |
|---|---|---|
@usethrottle/builder | 0.7.0 | The SDK. Reads pages, the header and footer, templates and site settings from the Builder API, with caching and build-time releases. Peers: next 14 or later, react 18 or later. |
@usethrottle/builder-react | 0.5.2 | Renders Builder pages in Next.js: the renderer, the catch-all route, templates, menus, code component runtime, SEO helpers. Peers: next 15 or later, react and react-dom 18 or later. Node 20 or later. |
@usethrottle/storefront-react | 0.4.3 | Catalog and commerce components (product grid, product page, cart, account) and the pack the Builder uses for them. Works with or without the Builder. |
@usethrottle/create-store | 0.2.2 | The command that scaffolds a Next.js store. |
@usethrottle/builder-schema | 0.4.1 | The document format, site settings, menus, limits and validators that the Builder, the SDK and the renderer share. |
Install
pnpm add @usethrottle/builder @usethrottle/builder-react @usethrottle/builder-schema @usethrottle/storefront-react npm install @usethrottle/builder @usethrottle/builder-react @usethrottle/builder-schema @usethrottle/storefront-react Minimum versions that fit together
storefront-react0.4.3 expectsbuilder-react^0.5.0andbuilder-schema^0.4.0(both are optional peers: needed only when you use the Builder).- It also expects
@usethrottle/catalog^1.4.1 || ^2.0.0,@usethrottle/money^1.1.0,@usethrottle/auth0.15.0 or later,@usethrottle/scripts0.4.0 or later, and Next.js 15 or later. - The SDK sends the minimum schema version it needs (0.4.0) on every read, which the Builder uses to serve the current site settings format. Keep
builder-schemaon 0.4.x. - A component that is newer than your installed
storefront-reactis not available in your store. Update the package. See Troubleshooting.
create-store
npx @usethrottle/create-store my-store
It asks for your catalog's browser key (pc_pk_...) and then its server key, writes them to .env.local and installs dependencies. The store has the shop,
collections, categories, tags, product, search and account pages, the cart drawer, and the cache-safe webhook and sync routes.
The default, --builder-mode live, adds no Builder. To show Builder pages in a store made that way, set up the SDK yourself: see Builder for developers.
Only --builder-mode build adds a Builder site.
Its options:
| Option | What you get |
|---|---|
--builder-mode live | The default. It adds nothing: no Builder site, only the store. |
--builder-mode build | Adds a Builder site generated at build time from a frozen release, with no Builder reads while the store runs. One static catch-all route. |
--catalog-key <key> | The catalog browser key. With --yes it asks nothing. |
--server-key <key> | The catalog server key, for reads made by your store server. It is asked for after the browser key. |
--offline | Do not call the catalog to tell the keys apart. Then --catalog-key and --server-key are both needed. |
--pm <pnpm|npm|yarn|bun> | The package manager. |
--skip-install | Write the files and stop. |
npx @usethrottle/create-store my-store --builder-mode build More options and the hosting-cost rules are in the create-store guide.
storefront-react without the Builder
@usethrottle/storefront-react is a components package on its own: drop-in React storefront components that read their display from your catalog's settings. You do not need the
Builder to use it.
pnpm add @usethrottle/storefront-react @usethrottle/catalog @usethrottle/money Which setting wins
When you use the Builder, the order is: Builder setting, then the SDK prop you pass to the component, then the default. A value a merchant sets in the Builder overrides the same value passed as a prop; a prop overrides the default. Without the Builder, the prop and the default are all there is.
/config. Pass strings or localization, or use the Builder's per-locale wording.
See Storefront components for every component and its props.
Developer reference
- Builder for developers: how the pieces fit together.
- The SDK (
@usethrottle/builder). - Rendering (
@usethrottle/builder-react). - The document format (
@usethrottle/builder-schema). - MCP for developers and the guide's tool reference.
- Widget API and widgets guide.
- Delivery modes, Media and Site forms.