This is a starter template for demonstrating the usage of the NextShopKit SDK in a real-world, headless e-commerce frontend.
Built with Next.js 14 App Router, it provides a fully functional Shopify-integrated storefront including:
- Product listing and detail pages
- Cart functionality with state management
- Dynamic variant handling
- Styled with Tailwind CSS and ShadCN UI
- Built-in context providers (e.g.,
CartProvider)
NextShopKit is a flexible SDK for building Shopify-powered storefronts with Next.js. It abstracts the Storefront API and provides:
- 🔍 Product and collection fetching (
getProducts,getProduct) - 🛒 Cart utilities (
addToCart,getCart,updateCartItem) - 🧱 Strong TypeScript typings for Shopify models
- 🧠 Custom metafield parsing and transformation
- 🛠️ Hooks and context providers for client-side cart management
- ✅ Pre-wired with
@nextshopkit/proorpro-developmentSDK - ✅ Context-based cart with
useCart()andCartProvider - ✅ Product page with variant selection and dynamic pricing
- ✅ Image galleries using
next/image - ✅ Clean layout structure (navbar, page shell, layout hierarchy)
git clone https://github.com/NextShopKit/template-shop-starter.git
cd template-shop-starter
pnpm install
pnpm devMake sure to add your own
.envwith Shopify Storefront credentials:NEXT_PUBLIC_SHOPIFY_DOMAIN=your-shop.myshopify.com NEXT_PUBLIC_STOREFRONT_TOKEN=your-access-token
components/
Navbar/
ProductHeader/
layouts/
ShopLayout.tsx
lib/
nextshopkit/
product.ts # Wrapper for getProduct
...
providers/
CartProvider.tsx # Wraps NextShopKit CartProvider
Feel free to modify:
- Styling: Tailwind + ShadCN components
- State: Replace the cart with your own logic or integrate with your CMS
- APIs: Extend the SDK with custom metafield handling
MIT — use freely for commercial or personal projects.
Open an issue or reach out at github.com/NextShopKit