# rohitz999/cinematic-3d-shop architecture

> Architecture diagram of the GitHub repository rohitz999/cinematic-3d-shop, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohitz999/cinematic-3d-shop
- Repository: https://github.com/rohitz999/cinematic-3d-shop

## Overview

Shop3D is a browser-based, scroll-driven 3D storefront prototype. A visitor scrolls through eight shop-story chapters; the app uses chapter data and timeline functions to update text, camera, shutter, and mascot, while rendering a Three.js shop scene. The chapters describe planned product browsing, making, gifting, billing/QR, and visit details, but these are placeholder copy rather than implemented shopping flows. Product, contact, and payment data exist separately and are not wired into the sampled runtime. The graph reflects sampled calls; the README is empty.

Main entry points: [`shop3d/src/main.js`](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/main.js) (Browser app), [`shop3d/src/animations/timeline.js`](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/animations/timeline.js) (Scroll timeline), [`shop3d/src/data/chapters.js`](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/chapters.js) (Story chapters), [`shop3d/src/scenes/world.js`](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/scenes/world.js) (World builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Storefront experience"]
  node_app["Browser app<br/>[main.js]"]
  node_scroll["Scroll and navigation<br/>[main.js]"]
  node_chapter_panels["Chapter panels<br/>[main.js]"]
  node_timeline["Scroll timeline<br/>[timeline.js]"]
end

subgraph group_scene["3D presentation"]
  node_world_builder["World builder<br/>[world.js]"]
  node_shop_scene["Shop scene<br/>[world.js]"]
end

subgraph group_content["Shop content"]
  node_brand["Brand identity<br/>[brand.js]"]
  node_chapters["Story chapters<br/>[chapters.js]"]
end

subgraph group_catalog["Commerce data"]
  node_products["Product catalog<br/>[products.js]"]
  node_shop_config["Contact and payment settings<br/>[config.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"scrolls"| node_scroll
node_app -->|"reads identity"| node_brand
node_app -->|"builds panels and navigation"| node_chapters
node_app -->|"builds scene"| node_world_builder
node_app -->|"samples progress"| node_timeline
node_scroll -->|"updates progress"| node_app
node_app -->|"updates visibility and text"| node_chapter_panels
node_timeline -->|"reads chapter ranges"| node_chapters
node_app -->|"moves and renders"| node_shop_scene

click node_app "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/main.js"
click node_scroll "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/main.js"
click node_chapter_panels "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/main.js"
click node_timeline "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/animations/timeline.js"
click node_world_builder "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/scenes/world.js"
click node_shop_scene "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/scenes/world.js"
click node_brand "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/brand.js"
click node_chapters "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/chapters.js"
click node_products "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/products.js"
click node_shop_config "https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/config.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_scroll,node_chapter_panels,node_timeline toneBlue
class node_world_builder,node_shop_scene toneAmber
class node_brand,node_chapters toneMint
class node_products,node_shop_config toneRose
class node_visitor toneIndigo
```

## Components

### Storefront experience

- [Browser app](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/main.js): `shop3d/src/main.js`
- [Scroll and navigation](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/main.js): `shop3d/src/main.js`
- [Chapter panels](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/main.js): `shop3d/src/main.js`
- [Scroll timeline](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/animations/timeline.js): `shop3d/src/animations/timeline.js`

### 3D presentation

- [World builder](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/scenes/world.js): `shop3d/src/scenes/world.js`
- [Shop scene](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/scenes/world.js): `shop3d/src/scenes/world.js`

### Shop content

- [Brand identity](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/brand.js): `shop3d/src/data/brand.js`
- [Story chapters](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/chapters.js): `shop3d/src/data/chapters.js`

### Commerce data

- [Product catalog](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/products.js): `shop3d/src/data/products.js`
- [Contact and payment settings](https://github.com/rohitz999/cinematic-3d-shop/blob/main/shop3d/src/data/config.js): `shop3d/src/data/config.js`

### Other components

- **Visitor**

## Connections

- Visitor → Scroll and navigation: scrolls (evidence: `shop3d/src/main.js`)
- Browser app → Brand identity: reads identity (evidence: `shop3d/src/main.js`)
- Browser app → Story chapters: builds panels and navigation (evidence: `shop3d/src/main.js`)
- Browser app → World builder: builds scene (evidence: `shop3d/src/main.js`)
- Browser app → Scroll timeline: samples progress (evidence: `shop3d/src/main.js`)
- Scroll and navigation → Browser app: updates progress (evidence: `shop3d/src/main.js`)
- Browser app → Chapter panels: updates visibility and text (evidence: `shop3d/src/main.js`)
- Scroll timeline → Story chapters: reads chapter ranges (evidence: `shop3d/src/animations/timeline.js`)
- Browser app → Shop scene: moves and renders (evidence: `shop3d/src/main.js`)
