AR-ready 3D product configurators with React Three Fiber, GLTF variants, and WebXR
Spatial Commerce & 3D Configurator is the definitive AI prompt framework for ecommerce teams, product designers, and agencies building the future of online shopping. As 3D and AR become table stakes for premium product pages — driven by Apple Vision Pro, WebXR, and consumer expectations set by Nike, IKEA, and Porsche — this framework gives you the complete technical system to build them. From GLTF material variant switching that lets customers configure color and finish in real time, to WebXR AR mode that places the product in their room, to the Zustand state machine that tracks every configuration choice and maps it to a cart SKU, every prompt is production-ready and ecommerce-aware.
Full Access Unlocked
All 50 prompts · All 6 modules
"The GLTF material variant switcher prompt built our sofa configurator in 2 days instead of 3 weeks. ..."
Head of Ecommerce · Premium furniture brand, $40M revenue
Need expert implementation?
Hire an OrchestratorConnect with a certified Prompt.Doctor Orchestrator to deploy this framework for you.
No coding required. You will use ChatGPT or Claude as your AI tool. Follow these steps in order — do not skip ahead.
Purchase & download the framework
Click the buy button on this page. After checkout, go to the and hit Download .zip. Unzip it — you'll get a .md file (the full framework) and a .pdf (easy to read reference). Keep both open.
Open your project — new or existing
This dashboard is designed to integrate into any existing project or be built as a standalone app. If you already have a site in Airo (or Cursor, Bolt, etc.), open that project. If you're starting fresh, create a new project. The Orchestrator Prompt handles both cases — it scans what's already there and adds only what's missing.
Paste the Orchestrator Prompt into your builder's chat
Open the on this page. Copy the Orchestrator Prompt and paste it into your AI builder's chat. It will scaffold the full admin system — secure login, email marketing module, booking engine, and CMS — on top of your existing codebase. This takes 2–5 minutes.
Add your API keys as secrets
Critical — Novice UsersIn your builder, go to Settings → Secrets and add the keys your app needs. For this framework: STRIPE_SECRET_KEY (for booking payments — get it from your Stripe dashboard), ANTHROPIC_API_KEY (for AI-assisted content — get it from console.anthropic.com), and DATABASE_URL (your MySQL connection string). No key is needed for the admin login, CMS, or email modules — those run on your existing infrastructure.
Don't have a MySQL server?
You can purchase a shared hosting plan with cPanel and MySQL at host.esgwon.dev. Once your account is set up, follow the step-by-step guide to create your database and connect it to your AI website builder.
How to set up cPanel MySQL & connect to your AI website →Need help with Stripe?
Get your STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY from your Stripe dashboard. The guide covers test keys, webhook setup, and going live.
Need help with Anthropic?
Get your ANTHROPIC_API_KEY from console.anthropic.com. The guide covers model selection, cost management, and troubleshooting.
Prompting Airo after setup — always name the file
When asking Airo to add tables, columns, or features to the admin dashboard, always include src/server/lib/admin-db.ts in your prompt. Without it, Airo may target the wrong database. Example: "Add a bookings table in the admin database (src/server/lib/admin-db.ts) — do not touch any other database connection in this project."
Run the framework prompts inside your live app
Your app is now running in the builder's preview panel. Open the on this page, copy each prompt one at a time, and paste it into your builder's chat. Replace every [BRACKET] with your real data before sending. Work through the stages in order — each stage output feeds the next.
Test end-to-end, then publish or hand off to your client
Walk through the admin as a real user: log in, create a booking, send a test email campaign, update a CMS image, and run the Safe-to-Publish gate. Once everything passes, click Publish in your builder. Because this is a white-label dashboard, your client accesses it at /admin on their own domain — no Prompt.Doctor branding, no third-party login required.
6 modules · 50 prompts · 6 workflow stages
GLTF Model & Variants
GLTFLoader with KHR_materials_variants extension, variant switching API, Draco compression, and progressive model loading with placeholder
9 promptsMaterial Configurator
Real-time MeshStandardMaterial property editing (color, roughness, metalness, normalMap), texture swap system, and environment-aware material preview
10 promptsWebXR & AR Mode
WebXR Device API session setup, hit-test for surface detection, model placement and scaling in AR, and model-viewer web component integration as fallback
9 promptsConfiguration State
Zustand store for configuration options, undo/redo history stack, URL state encoding (base64 config in query param), and configuration persistence to localStorage
9 promptsAnnotations & Hotspots
World-space hotspot anchoring to model vertices, Drei Html overlay for callout UI, visibility culling based on camera angle, and animated pulse indicator
7 promptsCommerce Integration
Configuration-to-SKU mapping table, dynamic price calculation, add-to-cart with configuration payload, screenshot capture, and shareable configuration URL
6 promptsWrite a React Three Fiber component that loads a GLTF model with KHR_materials_variants and provides a UI to switch between material variants in real time. Requirements: (1) Use useGLTF from @react-three/drei to load the model. After loading, read the KHR_materials_variants extension data from gltf.parser.json.extensions?.KHR_materials_variants — extract the variants array (each has a name). (2) Implement a switchVariant(variantIndex: number) function: iterate gltf.scene.traverse, for each Mesh check mesh.userData.gltfExtensions?.KHR_materials_variants?.mappings, find the mapping where mapping.variants includes variantIndex, then call gltf.parser.assignFinalMaterial(mesh, mapping.material) to apply the variant material. (3) Store the active variant index in a Zustand store (provide the store definition). (4) Render the model with ContactShadows and Environment preset="studio". (5) Outside the Canvas, render a variant selector UI: a row of color swatch buttons (one per variant), styled with Tailwind, that call switchVariant on click. Highlight the active variant. (6) Animate the material transition: on variant switch, briefly animate mesh.material.opacity from 0 to 1 over 300ms using useFrame. Full TypeScript. Explain the KHR_materials_variants data structure in comments.
Write a React Three Fiber WebXR AR mode implementation that lets users place a 3D product model on a real-world surface using hit-testing. Requirements: (1) Use R3F's XR components: <XR> wrapper, useXR() hook, and ARButton from @react-three/xr (or write a custom AR session button using navigator.xr.requestSession("immersive-ar", { requiredFeatures: ["hit-test"] })). (2) Hit-test setup: on session start, request a hit-test source against the "viewer" reference space. Each frame, get hit-test results and extract the pose matrix. (3) Placement reticle: render a flat RingGeometry at the hit-test position/orientation to show where the model will be placed. Animate it with a subtle pulse scale. (4) Placement: on screen tap (select event), place the product model at the current hit-test position. Allow repositioning by tapping again. (5) Scale control: pinch gesture (two-pointer distance delta) to scale the placed model between 0.1x and 2x. (6) Exit AR: button to end the XR session and return to the 3D preview. (7) Fallback: if WebXR is not supported, show a <model-viewer> web component with the same GLTF. Full TypeScript. Include the XR session feature detection check.
system
18 prompts
workflow
16 prompts
templates
9 prompts
prompts
7 prompts
"The GLTF material variant switcher prompt built our sofa configurator in 2 days instead of 3 weeks. The KHR_materials_variants extension explanation — how the mapping array works, how to call assignFinalMaterial — is documentation that doesn't exist anywhere else in this clarity."
Head of Ecommerce
Premium furniture brand, $40M revenue
"The WebXR AR placement system is the most complete implementation I've seen in a prompt. The hit-test reticle, pinch-to-scale, and model-viewer fallback — it covers every edge case that makes AR actually work for real users, not just demos."
Creative Technologist
Luxury automotive brand
All 50 prompts across 6 modules are unlocked for your account.
Lifetime access