Skip to main content
The Quickshops TypeScript SDK works in any framework that gives you a server-side execution context — loaders, server components, server actions, or API routes. The pattern is the same everywhere: instantiate the client once with your API key in a server-only module, then call methods in your server boundary and pass only the response data to your UI.
Import Quickshops from @quickshops/sdk only in server-only modules. Use @quickshops/starter-templates for storefront types and theme helpers in client code.
Next.js App Router gives you three natural places to call the SDK: Server Components for read operations, Server Actions for mutations, and Route Handlers for custom API endpoints.1. Create the shared client
lib/quickshops.ts
2. Fetch data in a Server Component
app/page.tsx
product-list.tsx
3. Mutate cart state in a Server Action
app/actions.ts