A production-ready Next.js 15 e-commerce template powered by Contentstack
π― Built for Contentstack Explorer Accounts: This kickstart is designed to work seamlessly with free Contentstack Explorer accounts, providing all the features you need to build stunning content-driven websites.
Live Demo β’ GitHub Repository
Veda: The Revival Collection showcases an upscale unisex jewelry line with four distinct product collections inspired by early 2000s pop culture. This kickstart demonstrates how to build a modern Next.js application with Contentstack as the headless CMS.
Important: This is a content template, not a complete e-commerce system. It includes product displays, categories, and rich content pages, but does not include shopping cart, checkout, or payment integration.
- Complete content structure with products, product lines, categories, and dynamic pages
- Visual Builder support with drag-and-drop components
- Real-time Live Preview for content editing
- TypeScript types for all content models
- Next.js 15 App Router with ISR and streaming SSR
- Responsive design with Tailwind CSS 4.x
- Built-in image optimization via Contentstack
- Optimized for Contentstack Explorer (free) accounts
kickstart-veda/
βββ app/ # Next.js 15 App Router
β βββ [[...slug]]/ # Dynamic pages
β βββ category/[category]/ # Category pages
β βββ products/[line]/ # Product pages
βββ components/ # React components
β βββ Pages/ # Page-level components
β βββ ComponentsRenderer.tsx # Dynamic component mapper
β βββ [UI Components] # Hero, List, Media, etc.
βββ lib/ # Utilities & types
βββ contentstack.ts # SDK configuration
βββ types.ts # TypeScript definitions
βββ pageUtils.ts # Data fetching
- Node.js 20+ and npm
- A Contentstack account (Sign up for free)
- Basic knowledge of Next.js and React
- Install the Contentstack CLI
npm install -g @contentstack/cli- Set your region (Explorer accounts use EU)
csdx config:set:region EU- Authenticate
csdx auth:login- Create your stack (find your Organization ID under Org admin)
csdx cm:stacks:seed --repo "contentstack/kickstart-veda-seed" --org "<YOUR_ORG_ID>" -n "Veda: The Revival Collection"-
Create tokens in Contentstack dashboard
- Navigate to Settings β Tokens
- Create a delivery token with preview token enabled
- Copy both tokens
-
Configure environment variables (create
.env.local)
These are all delivery related so can be PUBLIC.
NEXT_PUBLIC_CONTENTSTACK_API_KEY=blt...
NEXT_PUBLIC_CONTENTSTACK_DELIVERY_TOKEN=cs...
NEXT_PUBLIC_CONTENTSTACK_PREVIEW_TOKEN=cs...
NEXT_PUBLIC_CONTENTSTACK_REGION=EU
NEXT_PUBLIC_CONTENTSTACK_ENVIRONMENT=development
NEXT_PUBLIC_CONTENTSTACK_PREVIEW=trueNote: All variables use NEXT_PUBLIC_ prefix because they're needed in client-side components for Live Preview functionality.
-
Enable Live Preview in Contentstack
- Go to Settings β Live Preview
- Set preview URL to
http://localhost:3000
-
Install and run
npm install
npm run devVisit http://localhost:3000 to see your site!
Contentstack Live Preview enables real-time content editing without page refreshes:
- CSLP Tags: Editable fields have
data-cslpattributes for live editing - Real-time Updates: Changes in Contentstack instantly appear in the preview
- Visual Builder: Drag-and-drop interface for adding, reordering, and editing components
- No Page Reload: Only changed content updates, maintaining your scroll position
To use: Open any entry in Contentstack β Click Live Preview β Edit and see changes instantly!
- Dynamic Components:
ComponentsRenderermaps Contentstack modular blocks to React components - Type-Safe Fetching: TypeScript interfaces for all content types with React Cache
- Region-Specific SDK: Configured for EU region with automatic endpoint resolution
- CSLP Integration: Components receive
$prop with editable tags for Live Preview - Catch-All Routing:
[[...slug]]handles all dynamic pages with ISR (30-min revalidation) - Unified Data Fetching:
pageUtils.tsprovides consistent data fetching across all page types
- Page: Generic pages with modular components
- Product: Individual jewelry items with pricing and media
- Product Line: Collections (Digital Dawn, Urban Armor, etc.)
- Category: Product categories (Earrings, Rings, etc.)
- Header: Site navigation
- Hero: Full-width banner with media and CTAs
- List: Grid of product/category cards
- Two Column: Split layout with flexible content
- Media: Image or video block
- Rich Text: WYSIWYG content
Tailwind CSS 4.x with PostCSS plugin architecture provides utility-first styling.
Image Optimization uses Contentstack's built-in image delivery system with URL parameters:
- Automatic format selection (WebP/AVIF)
- Responsive sizing on-the-fly
- Global CDN distribution
- No external dependencies needed
Example: ${asset.url}?width=800&auto=webp&quality=80
- Read-only tokens: Delivery tokens for published content, preview tokens for drafts
- Content sanitization: Rich text sanitized with
isomorphic-dompurify - ISR: 30-minute revalidation with React Cache
- Streaming SSR: Fast TTFB and lazy-loaded images
npm run dev # Start development server
npm run build # Build for production
npm run lint # Run ESLintThe updateLaunchConfig.mjs script runs before build to generate launch.json with all URLs for optimal CDN caching.
- Next.js 15 with React 19 and App Router
- @contentstack/delivery-sdk & @contentstack/live-preview-utils
- Tailwind CSS 4.x for styling
- TypeScript for type safety
Perfect for product catalogs, marketing sites, content-heavy projects, POCs, and learning headless CMS architecture.
Not included: Shopping cart, checkout, payments, authentication, or order management. For full e-commerce, integrate with Shopify, Stripe, or similar services.
This kickstart uses only features available in the free Explorer plan:
- Generous API calls
- Live Preview & Visual Builder
- Multiple environments
- Asset management with CDN
- Additional products: Personalize, Brand Kit, Automate, Launch (free tier), and more
Perfect for learning, prototyping, personal projects, and client demos!
Issues, feature requests, and pull requests are welcome! Check existing issues or join our Discord community.
MIT License - see LICENSE for details.
Built with β€οΈ by Contentstack