# hepengwei/visualization-collection architecture

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

- Interactive diagram: https://gitdiagram.com/hepengwei/visualization-collection
- Repository: https://github.com/hepengwei/visualization-collection

## Overview

This is a React-based visual showcase and browser-tool collection, rather than a backend service. Users enter through the application shell and navigate a menu to demonstrations spanning HTML/CSS, Canvas, charts, Three.js, AI, and media tools. The tools and demos render results in the browser; the video page excerpt, for example, assembles processing tabs. Shared locale and scroll state supports the shell. The excerpts establish shell wiring and selected feature internals, but not most route-to-page connections, so those are omitted or marked unverified.

Main entry points: [`src/layout/Menus/index.tsx`](https://github.com/hepengwei/visualization-collection/blob/master/src/layout/Menus/index.tsx) (Category menu), [`src/hooks/useGlobalContext.tsx`](https://github.com/hepengwei/visualization-collection/blob/master/src/hooks/useGlobalContext.tsx) (Locale and scroll state), [`src/App.tsx`](https://github.com/hepengwei/visualization-collection/blob/master/src/App.tsx) (React application), [`src/pages/ImageProcessingTool`](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/ImageProcessingTool) (Image processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app["React application<br/>[App.tsx]"]
  node_routes["Page routes<br/>[routes.tsx]"]
  node_header["Header controls<br/>[index.tsx]"]
  node_menus["Category menu<br/>[index.tsx]"]
  node_home["Home showcase<br/>[index.tsx]"]
end

subgraph group_visual["Visual demonstrations"]
  node_html["HTML demonstrations"]
  node_css["CSS effects"]
  node_canvas["Canvas animations"]
  node_charts["Charts"]
end

subgraph group_media["Media tools"]
  node_image_tool["Image processing"]
  node_pdf_tool["PDF processing"]
  node_video_tool["Video processing<br/>[index.tsx]"]
  node_video_tabs["Video operation tabs"]
  node_file_utils["Image and file utilities<br/>[imageUtil.ts]"]
  node_png_codec["PNG codec<br/>[UPNG.js]"]
end

subgraph group_spatial["3D and AI"]
  node_three_demos["Three.js demos"]
  node_house_scene["Interactive house scene<br/>[index.tsx]"]
  node_house_parts["House scene elements"]
  node_ai_demos["AI applications"]
end

subgraph group_shared["Shared runtime"]
  node_global_state["Locale and scroll state"]
  node_cursor_hook["Custom cursor hook<br/>[useCursorMove.ts]"]
end

node_user(("Visitor"))
node_user_browser(("Browser"))

node_user -->|"opens"| node_app
node_app -->|"renders routes"| node_routes
node_app -->|"reads locale"| node_global_state
node_menus -->|"reads state"| node_global_state
node_header -->|"updates locale"| node_global_state
node_menus -.->|"navigates to"| node_html
node_menus -.->|"navigates to"| node_css
node_menus -.->|"navigates to"| node_canvas
node_menus -.->|"navigates to"| node_charts
node_menus -.->|"navigates to"| node_three_demos
node_menus -.->|"navigates to"| node_ai_demos
node_menus -.->|"navigates to"| node_image_tool
node_menus -.->|"navigates to"| node_video_tool
node_video_tool -->|"renders tabs"| node_video_tabs
node_image_tool -.->|"uses utilities"| node_file_utils
node_file_utils -->|"uses codec"| node_png_codec
node_three_demos -.->|"includes scene"| node_house_scene
node_house_scene -->|"adds elements"| node_house_parts
node_cursor_hook -->|"reads scroll state"| node_global_state
node_html -.->|"renders effects"| node_user_browser
node_css -.->|"renders effects"| node_user_browser
node_canvas -.->|"renders animations"| node_user_browser
node_charts -.->|"renders charts"| node_user_browser
node_three_demos -.->|"renders 3D"| node_user_browser
node_ai_demos -.->|"runs demos"| node_user_browser
node_image_tool -.->|"processes images"| node_user_browser
node_pdf_tool -.->|"processes PDFs"| node_user_browser
node_video_tool -.->|"processes video"| node_user_browser

click node_app "https://github.com/hepengwei/visualization-collection/blob/master/src/App.tsx"
click node_routes "https://github.com/hepengwei/visualization-collection/blob/master/src/routes/routes.tsx"
click node_header "https://github.com/hepengwei/visualization-collection/blob/master/src/layout/Header/index.tsx"
click node_menus "https://github.com/hepengwei/visualization-collection/blob/master/src/layout/Menus/index.tsx"
click node_home "https://github.com/hepengwei/visualization-collection/blob/master/src/pages/Home/index.tsx"
click node_html "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/html"
click node_css "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/css"
click node_canvas "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/canvas"
click node_charts "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/echarts"
click node_image_tool "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/ImageProcessingTool"
click node_pdf_tool "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/PDFProcessingTool"
click node_video_tool "https://github.com/hepengwei/visualization-collection/blob/master/src/pages/VideoProcessingTool/index.tsx"
click node_video_tabs "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/VideoProcessingTool/components"
click node_file_utils "https://github.com/hepengwei/visualization-collection/blob/master/src/utils/imageUtil.ts"
click node_png_codec "https://github.com/hepengwei/visualization-collection/blob/master/src/utils/UPNG.js"
click node_three_demos "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/threejs"
click node_house_scene "https://github.com/hepengwei/visualization-collection/blob/master/src/pages/threejs/HouseDisplay/index.tsx"
click node_house_parts "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/threejs/HouseDisplay/hardDecoration"
click node_ai_demos "https://github.com/hepengwei/visualization-collection/tree/master/src/pages/AIApplication"
click node_global_state "https://github.com/hepengwei/visualization-collection/blob/master/src/hooks/useGlobalContext.tsx"
click node_cursor_hook "https://github.com/hepengwei/visualization-collection/blob/master/src/hooks/useCursorMove.ts"

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_routes,node_header,node_menus,node_home,node_user_browser toneBlue
class node_html,node_css,node_canvas,node_charts toneAmber
class node_image_tool,node_pdf_tool,node_video_tool,node_video_tabs,node_file_utils,node_png_codec toneMint
class node_three_demos,node_house_scene,node_house_parts,node_ai_demos toneRose
class node_global_state,node_cursor_hook,node_user toneIndigo
```

## Components

### Application shell

- [React application](https://github.com/hepengwei/visualization-collection/blob/master/src/App.tsx): `src/App.tsx`
- [Page routes](https://github.com/hepengwei/visualization-collection/blob/master/src/routes/routes.tsx): `src/routes/routes.tsx`
- [Header controls](https://github.com/hepengwei/visualization-collection/blob/master/src/layout/Header/index.tsx): `src/layout/Header/index.tsx`
- [Category menu](https://github.com/hepengwei/visualization-collection/blob/master/src/layout/Menus/index.tsx): `src/layout/Menus/index.tsx`
- [Home showcase](https://github.com/hepengwei/visualization-collection/blob/master/src/pages/Home/index.tsx): `src/pages/Home/index.tsx`

### Visual demonstrations

- [HTML demonstrations](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/html): `src/pages/html`
- [CSS effects](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/css): `src/pages/css`
- [Canvas animations](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/canvas): `src/pages/canvas`
- [Charts](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/echarts): `src/pages/echarts`

### Media tools

- [Image processing](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/ImageProcessingTool): `src/pages/ImageProcessingTool`
- [PDF processing](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/PDFProcessingTool): `src/pages/PDFProcessingTool`
- [Video processing](https://github.com/hepengwei/visualization-collection/blob/master/src/pages/VideoProcessingTool/index.tsx): `src/pages/VideoProcessingTool/index.tsx`
- [Video operation tabs](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/VideoProcessingTool/components): `src/pages/VideoProcessingTool/components`
- [Image and file utilities](https://github.com/hepengwei/visualization-collection/blob/master/src/utils/imageUtil.ts): `src/utils/imageUtil.ts`
- [PNG codec](https://github.com/hepengwei/visualization-collection/blob/master/src/utils/UPNG.js): `src/utils/UPNG.js`

### 3D and AI

- [Three.js demos](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/threejs): `src/pages/threejs`
- [Interactive house scene](https://github.com/hepengwei/visualization-collection/blob/master/src/pages/threejs/HouseDisplay/index.tsx): `src/pages/threejs/HouseDisplay/index.tsx`
- [House scene elements](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/threejs/HouseDisplay/hardDecoration): `src/pages/threejs/HouseDisplay/hardDecoration`
- [AI applications](https://github.com/hepengwei/visualization-collection/tree/master/src/pages/AIApplication): `src/pages/AIApplication`

### Shared runtime

- [Locale and scroll state](https://github.com/hepengwei/visualization-collection/blob/master/src/hooks/useGlobalContext.tsx): `src/hooks/useGlobalContext.tsx`
- [Custom cursor hook](https://github.com/hepengwei/visualization-collection/blob/master/src/hooks/useCursorMove.ts): `src/hooks/useCursorMove.ts`

### Other components

- **Visitor**
- **Browser**

## Connections

- Visitor → React application: opens (evidence: `src/App.tsx`)
- React application → Page routes: renders routes (evidence: `src/App.tsx`)
- React application → Locale and scroll state: reads locale (evidence: `src/App.tsx`)
- Category menu → Locale and scroll state: reads state (evidence: `src/layout/Menus/index.tsx`)
- Header controls → Locale and scroll state: updates locale (evidence: `src/layout/Header/index.tsx`)
- Category menu → HTML demonstrations: navigates to
- Category menu → CSS effects: navigates to
- Category menu → Canvas animations: navigates to
- Category menu → Charts: navigates to
- Category menu → Three.js demos: navigates to
- Category menu → AI applications: navigates to
- Category menu → Image processing: navigates to
- Category menu → Video processing: navigates to
- Video processing → Video operation tabs: renders tabs (evidence: `src/pages/VideoProcessingTool/index.tsx`)
- Image processing → Image and file utilities: uses utilities
- Image and file utilities → PNG codec: uses codec (evidence: `src/utils/imageUtil.ts`)
- Three.js demos → Interactive house scene: includes scene (evidence: `src/pages/threejs/HouseDisplay/index.tsx`)
- Interactive house scene → House scene elements: adds elements (evidence: `src/pages/threejs/HouseDisplay/index.tsx`)
- Custom cursor hook → Locale and scroll state: reads scroll state (evidence: `src/hooks/useCursorMove.ts`)
- HTML demonstrations → Browser: renders effects
- CSS effects → Browser: renders effects
- Canvas animations → Browser: renders animations
- Charts → Browser: renders charts
- Three.js demos → Browser: renders 3D
- AI applications → Browser: runs demos
- Image processing → Browser: processes images
- PDF processing → Browser: processes PDFs
- Video processing → Browser: processes video
