Installation
Install @avvyr/storefront-sdk in any JavaScript or TypeScript project
Starter templates
The fastest way to launch a storefront is to start from an Avvyr Storefront Starter. It is a complete project with product listing, search, cart, checkout, auth and account pages already wired up. There is one for each framework:
| Starter | Built on | Stack |
|---|---|---|
| Nuxt Storefront Starter | @avvyr/storefront-nuxt | Nuxt 4, Nuxt UI, Tailwind CSS |
| Next.js Storefront Starter | @avvyr/storefront-next | Next.js 16 (App Router), React 19, Tailwind CSS |
Ask your Avvyr contact for access to the starter repository, then:
cp .env.example .env # Nuxt; for Next.js: cp .env.example .env.local
npm install
npm run dev
All pages and components are yours to customize. The SDK and the framework package are regular npm dependencies that you update with npm update.
If you are integrating into an existing project instead:
- Nuxt: install the Nuxt layer.
- Next.js: install
@avvyr/storefront-next. - Anything else (plain React, Vue, Svelte, Node, edge functions): follow the steps below to use the SDK directly.
Requirements
- Node.js 18 or later
- TypeScript 5+ recommended (plain JS works too)
Install
npm install @avvyr/storefront-sdk
Create a client
import { createStorefrontClient } from '@avvyr/storefront-sdk'
const client = createStorefrontClient({
publicKey: 'sfp_your_public_key',
baseUrl: 'https://api.avvyr.com',
marketId: '676140c4136218caaf97d79e',
})
The client is a plain object — create one per request in server contexts, or once at module level in the browser.
Server-side usage
On the server you can optionally pass the privateKey to unlock server-only endpoints:
const client = createStorefrontClient({
publicKey: process.env.STOREFRONT_PUBLIC_KEY!,
privateKey: process.env.STOREFRONT_PRIVATE_KEY!, // never expose in the browser
baseUrl: 'https://api.avvyr.com',
marketId: process.env.MARKET_ID!,
})
Never send
privateKey to the browser. Keep it in server-only environment variables.