A high-performance, ultra-luxury 3D product showcase built with the modern React stack. Features a real-time 3D configurator, seamless dark/light mode switching, and procedural material generation.
graph TD
Client[User Browser] -->|Routes| Router[React Router]
subgraph State Management
ThemeStore[Zustand Theme Store]
LocalState[Home Page State]
end
Router --> Layout[Main Layout]
Layout --> Nav[Navigation & Theme Toggle]
Layout -->|/| Home[Home Page]
Layout -->|/shop| Shop[Shop Page]
Home --> Canvas[3D Canvas (R3F)]
Home --> UI[HTML Overlay]
subgraph 3D Scene
Canvas --> Cam[Camera Rig]
Canvas --> Lights[Studio Lighting]
Canvas --> Bottle[Procedural Bottle]
Canvas --> Env[Environment & Post-Pro]
end
subgraph Interface
UI --> Hero[Hero Section]
UI --> Config[Configurator Panel]
UI --> Features[Scroll Features]
end
%% Interactions
Nav -->|Toggles| ThemeStore
ThemeStore -->|Updates Styles| Layout
ThemeStore -->|Updates Colors| Canvas
Config -->|Selects Color/Mat| LocalState
LocalState -->|Updates| Bottle
- Framework: Vite + React + TypeScript
- 3D Engine: React Three Fiber (Three.js 0.160)
- Styling: Tailwind CSS
- Animation: GSAP + Framer Motion
- State Management: Zustand
- Quality: Vitest, ESLint, Prettier
npm installNote: We rely on specific peer dependencies for postprocessing. If you encounter issues, try npm install --legacy-peer-deps.
npm run devnpm run build- Models: Place your
.glbfiles inpublic/models/. - Compression: Use
gltf-pipelineto Draco compress your models for production:gltf-pipeline -i input.glb -o bottle-draco.glb -d
- Fallback: The project uses a procedural cylinder fallback (
src/scene/BottleModel.tsx) if no GLTF is loaded, ensuring the dev server works immediately.
To capture a promotional video or OG image:
npm run captureThis runs a Headless Chrome instance via Puppeteer to screenshot the landing state.
Run the utility test suite:
npm run test