# haichaolihc/create-photo-flipbook-ui architecture

> Architecture diagram of the GitHub repository haichaolihc/create-photo-flipbook-ui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/haichaolihc/create-photo-flipbook-ui
- Repository: https://github.com/haichaolihc/create-photo-flipbook-ui

## Overview

This repository combines a photo-to-photobook creation skill with a website and a set of optional reader and gallery templates. The principal workflow is to understand a photo collection, choose an art direction and sequence, then produce an interactive book using the bundled 2D runtime. The graph also preserves documented search, contact-sheet, and Pinterest tools, plus the distinct template families. Several template implementations are represented at their exact tree paths but were not sampled; their internal connections are therefore omitted.

Main entry points: [`skills/create-photo-flipbook-ui`](https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/skills/create-photo-flipbook-ui) (Photo understanding), [`ui-collections/3d-book-1/src/PhotoFlipbook.tsx`](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-1/src/PhotoFlipbook.tsx) (React 3D reader), [`skills/create-photo-flipbook-ui/scripts/photo_library.py`](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/photo_library.py) (Photo search adapter), [`skills/create-photo-flipbook-ui/scripts/make_contact_sheet.py`](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/make_contact_sheet.py) (Contact sheet renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creation["Book creation"]
  node_understand["Photo understanding"]
  node_design["Style and sequencing"]
  node_build["Book building"]
  node_website["Project website<br/>[language.js]"]
end

subgraph group_tools["Skill tools"]
  node_search["Photo search adapter<br/>[photo_library.py]"]
  node_contact["Contact sheet renderer"]
  node_pinterest["Pinterest helper<br/>[engine.mjs]"]
end

subgraph group_readers["Book readers"]
  node_runtime2d["Bundled 2D runtime<br/>[flipbook.js]"]
  node_reader3dreact["React 3D reader<br/>[PhotoFlipbook.tsx]"]
  node_react_pages["Page texture loader<br/>[book-textures.ts]"]
  node_react_books["Reader book data<br/>[book-pages.ts]"]
  node_reader3dthree["Three.js 3D reader<br/>[main.js]"]
  node_drag["Drag interaction<br/>[drag.js]"]
  node_book_library["Mock book library<br/>[books.js]"]
  node_shelf["Reorderable shelf<br/>[shelf-order.js]"]
end

subgraph group_galleries["Photo galleries"]
  node_card_gallery["Card gallery<br/>[app.js]"]
  node_atlas["Spatial image atlas<br/>[app.js]"]
  node_atlas_data["Atlas image records<br/>[gallery.js]"]
  node_photo_ring["Photo ring layouts<br/>[app.js]"]
  node_stream["Photo stream"]
end

subgraph group_archive["Film archive"]
  node_archive_builder["Archive builder<br/>[build_archive.py]"]
  node_archive_ui["Film archive reader<br/>[flipbook.js]"]
  node_archive_search["Paginated archive search<br/>[archive-search.js]"]
end

node_user(("Photobook requester"))
node_photo_mcp(("Photo-search MCP"))

node_user -->|"requests book"| node_understand
node_understand -->|"informs design"| node_design
node_design -->|"defines book"| node_build
node_build -->|"uses runtime"| node_runtime2d
node_understand -->|"searches photos"| node_search
node_understand -->|"creates contact sheets"| node_contact
node_photo_mcp -->|"provides search"| node_understand
node_design -->|"uses references"| node_pinterest
node_search -->|"renders selections"| node_contact
node_reader3dreact -->|"loads textures"| node_react_pages
node_reader3dreact -.->|"renders pages"| node_react_books
node_reader3dthree -->|"uses drag logic"| node_drag
node_shelf -->|"orders books"| node_book_library
node_atlas -->|"reads records"| node_atlas_data
node_archive_builder -.->|"produces archive"| node_archive_ui
node_website -->|"introduces workflow"| node_understand

click node_understand "https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/skills/create-photo-flipbook-ui"
click node_design "https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/skills/create-photo-flipbook-ui"
click node_build "https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/skills/create-photo-flipbook-ui"
click node_search "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/photo_library.py"
click node_contact "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/make_contact_sheet.py"
click node_pinterest "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/pinterest/engine.mjs"
click node_runtime2d "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/2d-book/flipbook.js"
click node_reader3dreact "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-1/src/PhotoFlipbook.tsx"
click node_react_pages "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-1/src/book-textures.ts"
click node_react_books "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-1/src/book-pages.ts"
click node_reader3dthree "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-2/src/main.js"
click node_drag "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-2/src/drag.js"
click node_book_library "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/library/books.js"
click node_shelf "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/library/shelf-order.js"
click node_card_gallery "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/card-gallery/app.js"
click node_atlas "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/image-atlas/app.js"
click node_atlas_data "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/image-atlas/gallery.js"
click node_photo_ring "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/photo-ring/app.js"
click node_stream "https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/ui-collections/stream-implement-3d"
click node_archive_builder "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/film-negative-flipbook/build_archive.py"
click node_archive_ui "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/film-negative-flipbook/flipbook.js"
click node_archive_search "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/film-negative-flipbook/archive-search.js"
click node_website "https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/website/src/language.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_understand,node_design,node_build,node_website toneBlue
class node_search,node_contact,node_pinterest toneAmber
class node_runtime2d,node_reader3dreact,node_react_pages,node_react_books,node_reader3dthree,node_drag,node_book_library,node_shelf,node_user toneMint
class node_card_gallery,node_atlas,node_atlas_data,node_photo_ring,node_stream toneRose
class node_archive_builder,node_archive_ui,node_archive_search,node_photo_mcp toneIndigo
```

## Components

### Book creation

- [Photo understanding](https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/skills/create-photo-flipbook-ui): `skills/create-photo-flipbook-ui`
- [Style and sequencing](https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/skills/create-photo-flipbook-ui): `skills/create-photo-flipbook-ui`
- [Book building](https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/skills/create-photo-flipbook-ui): `skills/create-photo-flipbook-ui`
- [Project website](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/website/src/language.js): `website/src/language.js`

### Skill tools

- [Photo search adapter](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/photo_library.py): `skills/create-photo-flipbook-ui/scripts/photo_library.py`
- [Contact sheet renderer](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/make_contact_sheet.py): `skills/create-photo-flipbook-ui/scripts/make_contact_sheet.py`
- [Pinterest helper](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/skills/create-photo-flipbook-ui/scripts/pinterest/engine.mjs): `skills/create-photo-flipbook-ui/scripts/pinterest/engine.mjs`

### Book readers

- [Bundled 2D runtime](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/2d-book/flipbook.js): `ui-collections/2d-book/flipbook.js`
- [React 3D reader](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-1/src/PhotoFlipbook.tsx): `ui-collections/3d-book-1/src/PhotoFlipbook.tsx`
- [Page texture loader](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-1/src/book-textures.ts): `ui-collections/3d-book-1/src/book-textures.ts`
- [Reader book data](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-1/src/book-pages.ts): `ui-collections/3d-book-1/src/book-pages.ts`
- [Three.js 3D reader](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-2/src/main.js): `ui-collections/3d-book-2/src/main.js`
- [Drag interaction](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/3d-book-2/src/drag.js): `ui-collections/3d-book-2/src/drag.js`
- [Mock book library](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/library/books.js): `ui-collections/library/books.js`
- [Reorderable shelf](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/library/shelf-order.js): `ui-collections/library/shelf-order.js`

### Photo galleries

- [Card gallery](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/card-gallery/app.js): `ui-collections/card-gallery/app.js`
- [Spatial image atlas](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/image-atlas/app.js): `ui-collections/image-atlas/app.js`
- [Atlas image records](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/image-atlas/gallery.js): `ui-collections/image-atlas/gallery.js`
- [Photo ring layouts](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/photo-ring/app.js): `ui-collections/photo-ring/app.js`
- [Photo stream](https://github.com/haichaolihc/create-photo-flipbook-ui/tree/main/ui-collections/stream-implement-3d): `ui-collections/stream-implement-3d`

### Film archive

- [Archive builder](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/film-negative-flipbook/build_archive.py): `ui-collections/film-negative-flipbook/build_archive.py`
- [Film archive reader](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/film-negative-flipbook/flipbook.js): `ui-collections/film-negative-flipbook/flipbook.js`
- [Paginated archive search](https://github.com/haichaolihc/create-photo-flipbook-ui/blob/main/ui-collections/film-negative-flipbook/archive-search.js): `ui-collections/film-negative-flipbook/archive-search.js`

### Other components

- **Photobook requester**
- **Photo-search MCP**

## Connections

- Photobook requester → Photo understanding: requests book (evidence: `README.md`)
- Photo understanding → Style and sequencing: informs design (evidence: `README.md`)
- Style and sequencing → Book building: defines book (evidence: `README.md`)
- Book building → Bundled 2D runtime: uses runtime (evidence: `README.md`)
- Photo understanding → Photo search adapter: searches photos (evidence: `README.md`)
- Photo understanding → Contact sheet renderer: creates contact sheets (evidence: `README.md`)
- Photo-search MCP → Photo understanding: provides search (evidence: `README.md`)
- Style and sequencing → Pinterest helper: uses references (evidence: `README.md`)
- Photo search adapter → Contact sheet renderer: renders selections (evidence: `skills/create-photo-flipbook-ui/scripts/photo_library.py`)
- React 3D reader → Page texture loader: loads textures (evidence: `ui-collections/3d-book-1/src/PhotoFlipbook.tsx`)
- React 3D reader → Reader book data: renders pages (evidence: `ui-collections/3d-book-1/src/PhotoFlipbook.tsx`)
- Three.js 3D reader → Drag interaction: uses drag logic (evidence: `ui-collections/3d-book-2/src/main.js`)
- Reorderable shelf → Mock book library: orders books (evidence: `ui-collections/library/shelf-order.js`)
- Spatial image atlas → Atlas image records: reads records (evidence: `ui-collections/image-atlas/app.js`)
- Archive builder → Film archive reader: produces archive
- Project website → Photo understanding: introduces workflow (evidence: `README.md`)
