NextiPress
NextiPress
Why NextiPressFeaturesHow It WorksPricingDocsFAQ
Sign In
Start Free Trial
Overview
  • Documentation Hub
Storefront Themes
  • Advance Theme Architecture & AICore
Search & SEO
  • Google Search ConsoleEssential
DocsAdvance Theme Architecture
Core Architecture Manual

Advance Theme Architecture & AI Studio

Master the 100% JSON-driven storefront design system: 4 architectural pillars, design tokens, component variants, dynamic product loops, and AI generation master prompts.

12 min read Updated November 2026

Overview & Architecture

NextiPress decouples storefront presentation from code tampering. Instead of fragile page builder shortcodes or custom PHP/blade hacks, every storefront theme is defined as a pure, validated ThemeDefinition JSON. The engine compiles tokens into native CSS variables, maps component variants into accessible React primitives, and renders dynamic product catalogs server-side with zero hydration mismatch.

Zero Server Tampering & Instant Portability
Themes are completely portable across stores. A single JSON string can be exported, imported, or generated by an AI assistant in seconds without touching a single server line.
Architecture Pillars

The 4 Architectural Pillars

Every NextiPress ThemeDefinition JSON is composed of four foundational structures:

Pillar 1

Design Tokens

Hex color palette, typography font families (sans/serif/mono), container widths, button/card corner radii, shadow depths, and motion easings.

colors, typography, layout, shapes, shadows, motion
Pillar 2

Component Variants

Structural presentation modes: classic, glass, minimal, or custom product cards; carousel, split, or fullbleed hero sliders; luxury, warm, or search-focused headers.

productCard, heroSlider, categoryCarousel, header, footer
Pillar 3

Feature Switches (Capabilities)

Granular booleans for storefront features: wishlist buttons, quick view modal, direct WhatsApp checkout, breadcrumb trails, and mobile sticky buy bars.

showWishlist, showQuickView, showWhatsApp, stickyBuyBar
Pillar 4

Homepage Recipes

The ordered sequence of homepage section blocks: hero slider, category pills, product grids, flash sale countdowns, promo banners, testimonials, and custom HTML.

12 sections: hero_slider, products_grid, flash_sale, custom_html...
Product Catalog Architecture

Store Products & Custom Card Guide

Merchants never manually copy-paste product titles, prices, or images into JSON. All products are populated dynamically from the database using three distinct methods:

Recommended Best Practice: Global customProductCardHtml
When creating a bespoke product card design, define customProductCardHtml at the root level of your Theme JSON and set variants.productCard: "custom". This automatically cascades your card design storewide (Homepage grids, category pages, brand pages, search results, and related products) with automated event delegation and zero duplication.
Method 1 (Recommended)

Global Custom Card (customProductCardHtml)

Bespoke HTML/CSS template placed at theme root. Automatically cascades across all storefront product surfaces.

json
{
  "customProductCardHtml": "<div class=\"card\"><img src=\"{{image}}\" /><h4>{{title}}</h4><button data-add-to-cart=\"{{id}}\">Order</button></div>",
  "variants": {
    "productCard": "custom"
  }
}
Method 2 (Simplest)

Automatic Grid (products_grid)

Zero markup needed. Specify category filter and product limit. Renders standard theme variant cards automatically.

json
{
  "type": "products_grid",
  "config": {
    "title": "Best Sellers",
    "categoryFilter": "all",
    "limit": 20
  }
}
Method 3 (Bespoke)

Homepage Section Loop (custom_html)

For one-off custom homepage blocks (guarantee strips or experimental layouts) with dynamic data binding.

html
<!-- {{#products category="all" limit="8" sort="price-asc"}} -->
<div class="my-card">
  <img src="{{image}}" alt="{{title}}" />
  <h4>{{title}}</h4>
  <button data-add-to-cart="{{id}}">Buy</button>
</div>
<!-- {{/products}} -->

29+ Safe Placeholders & 8 Conditionals

Click any placeholder chip to copy it to your clipboard. All data is sanitized against XSS.

Quick-Copy Safe Placeholders:

Conditional Blocks: {{#if condition}} & {{#unless condition}}

Conditionally show or hide elements based on stock status, discounts, or variant presence:

html
<!-- {{#if hasDiscount}} --><span class="badge">{{discountText}}</span><!-- {{/if}} -->
<!-- {{#if inStock}} --><button data-add-to-cart="{{id}}">Order Now</button><!-- {{/if}} -->
<!-- {{#if isOutOfStock}} --><button disabled>Out of Stock</button><!-- {{/if}} -->
Supported 8 Conditionals: hasDiscount, inStock, isOutOfStock, isFreeDelivery, hasVariants, badge, customBadge, description

Interactive Triggers & Theme CSS Variables

Interactive Action Triggers

  • data-add-to-cart="{{id}}": Adds product to cart drawer without page reload. Accessible via keyboard Enter key.
  • data-toggle-wishlist="{{id}}": Toggles wishlist state with instant heart animation.
  • <a href="{{url}}">: Navigates directly to the product details page.

11 Theme CSS Variables

Style your custom cards with theme variables so color changes automatically sync:

var(--theme-primary)var(--theme-secondary)var(--theme-accent)var(--theme-bg)var(--theme-surface)var(--theme-surface-muted)var(--theme-text)var(--theme-text-muted)var(--theme-border)var(--theme-card-radius)var(--theme-btn-radius)

Allowed Settings Matrix

Strict schema validation rules. Only these enum values are accepted by the theme engine:

Setting PathAllowed Enum ValuesPurpose
typography.fontFamilyBase"sans" | "serif" | "mono"Body copy typeface
typography.fontFamilyHeadings"sans" | "serif" | "mono"Heading typeface
shapes.buttonRadius"none" | "sm" | "md" | "lg" | "xl" | "full"Corner roundness on buttons
shapes.cardRadius"none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"Product card corner radius
variants.productCard"classic" | "glass" | "minimal" | "custom"Product card presentation mode
variants.heroSlider"carousel" | "split" | "fullbleed"Hero slider layout
variants.header"classic" | "search_focused" | "luxury" | "warm"Storefront header layout
variants.bottomNav"docked_ai" | "docked_cart" | "none"Mobile bottom navigation bar

AI Master Theme Architect Studio

Paste this prompt into Claude, ChatGPT, or Gemini to generate 100% compliant ThemeDefinition JSONs.

markdown
You are an expert AI E-Commerce Theme Architect for NextiPress Theme Studio.
Your objective is to help me design and generate an advanced, high-converting, fully customized ThemeDefinition JSON file for my storefront.

============================================================
MANDATORY PRE-REQUISITE: INSPECT OFFICIAL DOCUMENTATION FIRST
============================================================
CRITICAL INSTRUCTION FOR THE AI MODEL:
Before generating, suggesting, or reviewing any ThemeDefinition JSON, you MUST inspect and reference the official NextiPress SaaS Platform Documentation page:
Official Docs URL: https://nextipress.shop/docs/advance-theme-guide
LLM Machine-Readable Index: https://nextipress.shop/llms.txt

If you have web browsing, URL fetching, search, or retrieval tools:
1. You MUST FETCH, BROWSE, and PARSE https://nextipress.shop/docs/advance-theme-guide BEFORE answering or generating code.
2. Verify all tokens, 8-state styles, allowed enums, capabilities, and dynamic custom_html product loop syntax against the official live docs.
3. STRICT ZERO-HALLUCINATION CONTRACT: Every single property key, enum value, and section type in your output JSON MUST strictly match the official specification. Never invent custom enum strings (e.g. fontFamily "inter" is invalid - only "sans" | "serif" | "mono" are supported; buttonRadius "50%" or "circle" is invalid - only "full" is supported).

============================================================
STAGE 1: INTERACTIVE BRIEF QUESTIONS (DO THIS FIRST)
============================================================
Before generating the JSON, please ask me the following 5 targeted questions in simple, friendly terms:

1. Store Niche & Products: What kind of products do you sell? (e.g. luxury perfume, children toys/clothing, organic honey/groceries, high-tech electronics, fashion boutique, etc.)
2. Brand Visual Tone & Mood: What atmosphere do you want? (e.g. Clean & Minimalist, Dark Luxury Obsidian & Gold, Warm Earthy Parchment, Vibrant & Playful Neon, Calming Zen Spa)
3. Primary Brand Colors: Do you have specific hex color codes in mind, or should I curate a harmonic color palette for you?
4. Layout, Card Style & Hero Slider Sourcing:
   - Product Cards: classic (standard borders & dual buttons), glass (frosted glass blur & luxury glow), minimal (borderless with hover overlay), or custom (your own bespoke HTML product card)?
   - Hero Slider: carousel (traditional slider), split (split copy + image layout), or fullbleed (cinematic edge-to-edge)?
   - Hero Slider Source: Should the slides be controlled dynamically from the merchant store settings in admin dashboard ("source": "store" - recommended so merchant can swap banners anytime without touching JSON), or statically hardcoded inside this JSON ("source": "json")?
5. Special Sections & Custom Product Cards: Would you like:
   - A global custom product card design via customProductCardHtml? (Yes / No - provide your HTML or describe your desired card design)
   - A custom HTML trust & assurance badge strip? (Yes / No)
   - A bespoke custom HTML homepage section? (Yes / No)
   - A functional newsletter subscription section ("type": "newsletter") to capture subscriber leads? (Yes / No)

Tell me: "Please answer these questions or provide your own custom description, and I will generate your production-ready ThemeDefinition JSON."

============================================================
STAGE 2: JSON GENERATION RULES (WHEN ANSWERS ARE PROVIDED)
============================================================
Once I provide my answers (or if I provide all details upfront), generate a SINGLE, 100% syntactically valid JSON object conforming strictly to the following ThemeDefinition schema.

STRICT VALIDATION RULES & CONSTRAINTS:
1. ONLY return the raw JSON object inside a single markdown code block (```json). No conversational filler outside the JSON.

2. ROOT FIELDS SCHEMA SPECIFICATION:
   - "id": string (unique snake_case string, e.g. "velvet_obsidian_atelier")
   - "name": string (display name, e.g. "Velvet Obsidian Atelier")
   - "tagline": string (short compelling punchline)
   - "description": string (detailed description of mood and target niche)
   - "badge": string (short admin badge label, e.g. "Luxury & Gold")
   - "previewBadgeColor": string (Tailwind color classes for badge, e.g. "bg-slate-900 text-amber-300 border-amber-600/40")
   - "tag"?: "hot" | "special" (optional highlight tag)
   - "schemaVersion"?: "1.0" (optional schema version)
   - "customProductCardHtml"?: string (optional: HTML template when variants.productCard is "custom")

3. ENUMS MUST MATCH EXACTLY (Never fabricate custom values):
   - tokens.colors: { primary: "#hex", secondary: "#hex", accent: "#hex", background: "#hex", surface: "#hex", surfaceMuted: "#hex", text: "#hex", textMuted: "#hex", border: "#hex" }
   - tokens.typography.fontFamilyBase: ONLY "sans" | "serif" | "mono"
   - tokens.typography.fontFamilyHeadings: ONLY "sans" | "serif" | "mono"
   - tokens.typography.headingWeight: ONLY "normal" | "medium" | "semibold" | "bold" | "extrabold"
   - tokens.typography.baseSize: ONLY "sm" | "base" | "lg"
   - tokens.typography.letterSpacing: ONLY "normal" | "wide" | "widest"
   - tokens.layout.containerMaxWidth: ONLY "4xl" | "5xl" | "7xl" | "full"
   - tokens.layout.sectionSpacing: ONLY "compact" | "comfortable" | "relaxed"
   - tokens.layout.gridGap: ONLY "sm" | "md" | "lg"
   - tokens.shapes.buttonRadius: ONLY "none" | "sm" | "md" | "lg" | "xl" | "full"
   - tokens.shapes.cardRadius: ONLY "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"
   - tokens.shapes.imageRadius: ONLY "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full"
   - tokens.shadows.card: ONLY "none" | "sm" | "md" | "lg" | "xl"
   - tokens.shadows.dropdown: ONLY "none" | "sm" | "md" | "lg" | "xl" | "2xl"
   - tokens.shadows.button: ONLY "none" | "sm" | "md" | "lg"
   - tokens.motion.duration: ONLY "fast" | "normal" | "slow"
   - tokens.motion.easing: ONLY "linear" | "ease-in" | "ease-out" | "ease-in-out" | "bounce"
   - tokens.iconography.strokeWidth: ONLY "1" | "1.5" | "2" | "2.5"
   - tokens.iconography.style: ONLY "solid" | "outline"
   - tokens.media.productImageAspect: ONLY "auto" | "square" | "video" | "portrait"

4. COMPONENT VARIANTS ENUMS:
   - variants.productCard: ONLY "classic" | "glass" | "minimal" | "custom"
   - variants.heroSlider: ONLY "carousel" | "split" | "fullbleed"
   - variants.categoryCarousel: ONLY "square" | "capsules" | "pills"
   - variants.header: ONLY "classic" | "search_focused" | "luxury" | "warm"
   - variants.footer: ONLY "classic" | "luxury" | "warm"
   - variants.bottomNav: ONLY "docked_ai" | "docked_cart" | "none"
   - variants.productDetailLayout: ONLY "sticky" | "two_column" | "stacked"
   - variants.productGallery: ONLY "vertical" | "horizontal" | "grid"
   - variants.productTabs: ONLY "tabs" | "accordion" | "minimal"

5. HOMEPAGE RECIPE SECTIONS:
   - Allowed 12 section types: "hero_slider", "products_grid", "category_carousel", "flash_sale", "banner", "text_block", "brand_carousel", "countdown_timer", "testimonials", "video_embed", "custom_html", "newsletter".
   - Put custom product card design into customProductCardHtml at root with variants.productCard: "custom".

Production Theme JSON Example

Velvet Obsidian Atelier: A complete luxury theme definition ready for import.

json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{ "id": "velvet_obsidian_atelier", "name": "Velvet Obsidian Atelier", "tagline": "Dark luxury vibe, metallic gold accents & split showcase", "description": "Designed for premium jewelry, haute perfumery, luxury watches, and exclusive fashion boutiques.", "badge": "Luxury & Gold", "previewBadgeColor": "bg-slate-900 text-amber-300 border-amber-600/40", "tag": "special", "schemaVersion": "1.0", "tokens": { "colors": { "primary": "#d4af37", "secondary": "#b8860b", "accent": "#ffd700", "background": "#0b0b0f", "surface": "#14141a", "surfaceMuted": "#1c1c24", "text": "#f8fafc", "textMuted": "#94a3b8", "border": "#272732" }, "typography": { "fontFamilyBase": "sans", "fontFamilyHeadings": "serif", "headingWeight": "bold", "baseSize": "base", "letterSpacing": "wide" }, "layout": { "containerMaxWidth": "7xl", "sectionSpacing": "relaxed", "gridGap": "lg" }, "shapes": { "buttonRadius": "full", "cardRadius": "3xl", "imageRadius": "xl" }, "shadows": { "card": "xl", "dropdown": "2xl", "button": "md" }, "motion": { "duration": "slow", "easing": "ease-out" }, "iconography": { "strokeWidth": "1.5", "style": "outline" }, "media": { "productImageAspect": "portrait", "hoverEffect": "swap" } }, "variants": { "productCard": "glass", "heroSlider": "split", "categoryCarousel": "capsules", "header": "luxury", "footer": "luxury", "productDetailLayout": "sticky", "productGallery": "vertical", "productTabs": "accordion" }, "capabilities": { "productCard": { "showWishlist": true, "showCategory": false, "showBadge": true, "showQuickView": true }, "heroSlider": { "showDescription": true, "showBadge": true, "showArrows": true, "showDots": true, "showProgressBar": false }, "header": { "showWishlist": true, "showSearchInline": false }, "footer": { "showNewsletter": true, "showCategories": true }, "productDetail": { "showBreadcrumb": true, "showStars": true, "showWhatsApp": true, "showShare": true, "stickyBuyBarOnMobile": true } }, "recipes": { "homepage": [ { "id": "hero-split-obsidian", "type": "hero_slider", "config": { "variant": "split", "slides": [ { "title": "Timeless Haute Joaillerie", "subtitle": "Private Atelier Edition 2026", "desc": "Handcrafted with ethically sourced conflict-free diamonds and 24-karat gold.", "ctaText": "Explore High Jewelry", "ctaUrl": "/jewelry", "image": "https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?auto=format&fit=crop&q=80&w=1200", "badge": "Rare Collector" } ] } }, { "id": "bespoke-luxury-grid", "type": "custom_html", "config": { "html": "<style>.obsidian-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 30px 0; } .obsidian-card { background: var(--theme-surface, #14141a); border: 1px solid var(--theme-border, #272732); border-radius: var(--theme-card-radius, 24px); padding: 18px; display: flex; flex-direction: column; transition: transform 0.25s ease, border-color 0.25s ease; position: relative; } .obsidian-card:hover { transform: translateY(-5px); border-color: var(--theme-primary, #d4af37); } .obsidian-badge { position: absolute; top: 26px; left: 26px; background: var(--theme-primary, #d4af37); color: #000; font-size: 11px; font-weight: 900; padding: 4px 10px; border-radius: 999px; } .obsidian-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: calc(var(--theme-card-radius, 24px) - 8px); margin-bottom: 14px; } .obsidian-title { font-size: 16px; font-weight: 700; color: var(--theme-text, #f8fafc); margin: 0 0 8px; line-height: 1.3; } .obsidian-price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; margin-bottom: 14px; } .obsidian-price { font-size: 20px; font-weight: 900; color: var(--theme-accent, #ffd700); } .obsidian-old { font-size: 13px; color: var(--theme-text-muted, #94a3b8); text-decoration: line-through; } .obsidian-btn { width: 100%; background: var(--theme-primary, #d4af37); color: #0b0b0f; border: none; font-weight: 800; font-size: 13px; padding: 12px 16px; border-radius: var(--theme-btn-radius, 9999px); cursor: pointer; transition: opacity 0.2s; min-height: 44px; } .obsidian-btn:hover { opacity: 0.9; }</style><div class=\"obsidian-grid\"><!-- {{#products category=\"all\" limit=\"8\" sort=\"price-desc\"}} --><div class=\"obsidian-card\"><span class=\"obsidian-badge\">{{badge}}</span><a href=\"{{url}}\" style=\"text-decoration:none;\"><img src=\"{{image}}\" alt=\"{{title}}\" class=\"obsidian-img\" loading=\"lazy\" /><h4 class=\"obsidian-title\">{{title}}</h4></a><div class=\"obsidian-price-row\"><span class=\"obsidian-price\">৳{{price}}</span><del class=\"obsidian-old\">৳{{oldPrice}}</del></div><button type=\"button\" class=\"obsidian-btn\" data-add-to-cart=\"{{id}}\" aria-label=\"{{accessibleActionLabel}}\">Order Now</button></div><!-- {{/products}} --></div>" } }, { "id": "featured-masterpieces", "type": "products_grid", "config": { "title": "Masterpiece Creations", "limit": 8, "showViewAll": true } } ] } }

WCAG Contrast Compliance Rules

All custom themes must pass WCAG 2.2 AA contrast standards (minimum 4.5:1 for body text, 3:1 for large text and UI components):

Light Backgrounds (#ffffff, #fafafa)

Text must be dark slate (#0f172a, #1e293b). Avoid light grey text on white cards.

Dark Backgrounds (#0b0b0f, #14141a)

Text must be high-contrast light (#f8fafc). Accents must maintain 3:1 against surface.

Was this documentation page helpful?
PreviousDocumentation HubNext Google Search Console Guide
On this page
  • Overview & Architecture
  • The 4 Architectural Pillars
  • Store Products & Custom Card Guide
  • Global Custom Product Card (Recommended)
  • Dynamic Product Loop Engine (custom_html)
  • 29+ Safe Placeholders & 8 Conditionals
  • Interactive Triggers & Theme CSS Variables
  • Allowed Settings Matrix
  • AI Master Theme Architect Studio
  • Production Theme JSON Example
  • WCAG Contrast Compliance Rules
NextiPress
NextiPress

The high-performance multi-tenant e-commerce platform designed for speed, scale, and modern automated merchandising.

All Systems Operational (99.99%)

Product

  • Platform Capabilities
  • Pricing Plans
  • Documentation & Guides
  • FAQ

Merchants

  • Launch Your Store
  • Merchant Login
  • Store Dashboard

Platform

  • Edge Subdomains
  • bKash & Nagad Rails
  • AI Store Copilot
  • Steadfast API Ready
© 2026 NextiPress. All rights reserved.
TLS 1.3 256-bit Encrypted•100% Data Isolation