How loopfruits/fizz-demo works
Main System Components
a) Client Layer
• Next.js Frontend (React Components)
• Three.js 3D Rendering System
• Client-side State Management
b) API Layer
• Next.js API Routes
• Prismic Integration
• Preview/Revalidation Systems
c) CMS Layer
• Prismic Content Management System
• Slice Machine
• Custom Types
Component Organization
Create distinct sections showing:
a) Page Components
• Layout Structure (/src/app/layout.tsx)
• Dynamic Routes (/src/app/[uid])
• Static Pages
b) Slice Components (Group these visually)
• AlternatingText
• BigText
• Carousel
• Hero
• SkyDive
c) 3D Components (Highlight these specially)
• SodaCan
• Bubbles
• FloatingCan
• ViewCanvas
Data Flow Representation
• Content flow from Prismic CMS to Next.js
• API routes handling (preview, revalidate)
• Client-side state management (useStore)
• 3D model loading and rendering pipeline
Specific Implementation Details
Create dedicated sections for:
a) Three.js Integration
• Model loading pipeline (/public/*.gltf, *.bin)
• Scene management
• 3D component hierarchy
b) Prismic Integration
• Custom types
• Slice Machine configuration
• Preview system
Important Connections to Highlight
• How the preview system connects components
• Relationship between Slice Machine and component generation
• Demonstrate how 3D models integrate with regular React components
• State management flow using useStore
Technical Stack Indicators
• Next.js 13+ (App Router)
• Prismic CMS
• Three.js
• TypeScript
• Tailwind CSS
Special Considerations:
Build/deploy pipeline
This system design should provide a clear understanding of how the application's various components interact while maintaining a focus on the unique aspects of this project, particularly the integration of 3D elements with a headless CMS.