jamstack-storefront

Build statically generated ecommerce storefronts with Next.js or Astro and headless commerce APIs.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill jamstack-storefront-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: jamstack-storefront
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/platform-integrations-infrastructure/finsilabs/headless-modern/jamstack-storefront
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill jamstack-storefront-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @shopify/storefront-api-client, graphql, graphql-request, zustand, @astrojs/node.

What problem does it solve? Monolithic commerce themes often deliver slow page loads and poor Core Web Vitals, hurting SEO and conversion. This Skill guides you through building a Jamstack storefront that pre-renders product pages as static HTML served from a CDN, while keeping cart, checkout, and pricing fresh through client-side islands and incremental static regeneration. ## Core Features & Use Cases - Static Product Pages with ISR: Generate top product pages at build time with Next.js generateStaticParams and revalidate them on a timed interval or on demand, so large catalogs stay fast without slow builds. - Astro Zero-JS Storefronts: Server-render catalog pages in Astro and hydrate only interactive islands like the add-to-cart button, minimizing shipped JavaScript. - Webhook-Driven Cache Invalidation: Implement a secured /api/revalidate endpoint that uses revalidatePath and revalidateTag so flash-sale price changes appear within seconds. - Client-Side Cart State: Persist a Zustand cart store to localStorage with quantity merging for static pages that have no server session. - Use Case: A fashion retailer with 12,000 Shopify products pre-builds its top 200 pages, renders the long tail on demand, and triggers targeted revalidation webhooks whenever merchandising updates a product. ## Quick Start Ask the AI to scaffold a Next.js App Router storefront with a Shopify Storefront API client, an ISR product page at app/products/[handle]/page.tsx, and a next.config.ts with CDN cache headers and image remote patterns.

Frequently Asked Questions about jamstack-storefront

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a headless Shopify storefront with Next.js?▼

Create a Next.js App Router project and configure the @shopify/storefront-api-client with your store domain, public access token, and API version 2025-01. Then statically generate product pages with generateStaticParams and export a revalidate interval for ISR.

Next.js vs Astro for an ecommerce storefront?▼

Next.js offers Incremental Static Regeneration and fetch cache tags for fine-grained revalidation of large catalogs. Astro ships zero JavaScript by default and hydrates only interactive islands, suiting content-heavy stores where minimal client JS matters most.

How do I handle ISR for a large product catalog?▼

Use generateStaticParams to pre-build only your top products, such as the first 200 or 500, and set dynamicParams = true so long-tail pages render on first request. This keeps build times fast while ISR caches the rest on demand.

How do I persist a shopping cart on a static site?▼

Use a Zustand store with the persist middleware and a localStorage key like 'cart-storage'. The store should merge quantities when the same variantId is added twice and expose addItem, removeItem, updateQuantity, clearCart, and total operations.

Why does my ISR storefront serve stale prices during flash sales?▼

Timed revalidation intervals are too slow for rapid price changes. Implement a webhook endpoint secured with a Bearer token that calls revalidatePath and revalidateTag on product update events, and tag fetches with semantic names like product-${handle}.

Why do product images fail to load in Next.js production?▼

Next.js blocks external image hosts by default. Add your commerce CDN hostnames, such as '**.shopify.com' or '**.saleor.io', to images.remotePatterns in next.config.ts so the image optimizer can serve them.