# yujin923/storybooth architecture

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

- Interactive diagram: https://gitdiagram.com/yujin923/storybooth
- Repository: https://github.com/yujin923/storybooth

## Overview

The visible application is a React photo-booth flow: choose a layout, capture photos using gesture-guided shooting, select shots, choose a frame style, then compose and download the result. The README also describes an AI frame-generation backend, but its documented Express entry point and routes are absent from the supplied tree; the two Python server files cannot be confidently identified as that backend from the available evidence. The graph therefore focuses on evidenced UI behavior and calls out that evidence limit rather than inventing integration edges.

Main entry points: [`figma_ui/src/app/App.tsx`](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/App.tsx) (Workflow coordinator), [`figma_ui/src/app/components/FrameSelectionScreen.tsx`](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/FrameSelectionScreen.tsx) (Frame selection), [`figma_ui/src/app/components/ShootingScreen.tsx`](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/ShootingScreen.tsx) (Gesture-guided capture), [`figma_ui/src/app/components/CompletionScreen.tsx`](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/CompletionScreen.tsx) (Result and download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Photo Booth Flow"]
  node_app["Workflow coordinator<br/>[App.tsx]"]
  node_start["Start and layout<br/>[StartScreen.tsx]"]
end

subgraph group_capture["Capture and Selection"]
  node_shoot["Gesture-guided capture<br/>[ShootingScreen.tsx]"]
  node_selection["Photo selection"]
end

subgraph group_frame["Frame and Output"]
  node_frame["Frame selection"]
  node_completion["Result and download"]
end

subgraph group_logic["Domain Logic"]
  node_gesture["Gesture recognition<br/>[handDetection.ts]"]
  node_themes["Theme presets<br/>[themes.ts]"]
  node_university["University lookup<br/>[university.ts]"]
  node_compose["Canvas composition<br/>[compose.ts]"]
end

node_visitor(("Photobooth user"))
node_python_demo["Demo server<br/>[server.py]"]
node_python_ai["AI4Cut server<br/>[server.py]"]

node_visitor -.->|"uses"| node_app
node_app -->|"renders"| node_start
node_app -->|"renders"| node_shoot
node_app -->|"renders"| node_selection
node_app -->|"renders"| node_frame
node_app -.->|"renders"| node_completion
node_shoot -->|"checks gestures"| node_gesture
node_frame -->|"looks up themes"| node_themes
node_frame -->|"searches universities"| node_university
node_completion -->|"composes photos"| node_compose

click node_app "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/App.tsx"
click node_start "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/StartScreen.tsx"
click node_shoot "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/ShootingScreen.tsx"
click node_gesture "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/handDetection.ts"
click node_selection "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/SelectionScreen.tsx"
click node_frame "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/FrameSelectionScreen.tsx"
click node_themes "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/themes.ts"
click node_university "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/university.ts"
click node_completion "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/CompletionScreen.tsx"
click node_compose "https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/compose.ts"
click node_python_demo "https://github.com/yujin923/storybooth/blob/main/4cut_demo/server.py"
click node_python_ai "https://github.com/yujin923/storybooth/blob/main/ai4cut/server.py"

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_start,node_visitor toneBlue
class node_shoot,node_selection toneAmber
class node_frame,node_completion,node_python_demo,node_python_ai toneMint
class node_gesture,node_themes,node_university,node_compose toneRose
```

## Components

### Photo Booth Flow

- [Workflow coordinator](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/App.tsx): `figma_ui/src/app/App.tsx`
- [Start and layout](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/StartScreen.tsx): `figma_ui/src/app/components/StartScreen.tsx`

### Capture and Selection

- [Gesture-guided capture](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/ShootingScreen.tsx): `figma_ui/src/app/components/ShootingScreen.tsx`
- [Photo selection](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/SelectionScreen.tsx): `figma_ui/src/app/components/SelectionScreen.tsx`

### Frame and Output

- [Frame selection](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/FrameSelectionScreen.tsx): `figma_ui/src/app/components/FrameSelectionScreen.tsx`
- [Result and download](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/components/CompletionScreen.tsx): `figma_ui/src/app/components/CompletionScreen.tsx`

### Domain Logic

- [Gesture recognition](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/handDetection.ts): `figma_ui/src/app/lib/handDetection.ts`
- [Theme presets](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/themes.ts): `figma_ui/src/app/lib/themes.ts`
- [University lookup](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/university.ts): `figma_ui/src/app/lib/university.ts`
- [Canvas composition](https://github.com/yujin923/storybooth/blob/main/figma_ui/src/app/lib/compose.ts): `figma_ui/src/app/lib/compose.ts`

### Other components

- **Photobooth user**
- [Demo server](https://github.com/yujin923/storybooth/blob/main/4cut_demo/server.py): `4cut_demo/server.py`
- [AI4Cut server](https://github.com/yujin923/storybooth/blob/main/ai4cut/server.py): `ai4cut/server.py`

## Connections

- Photobooth user → Workflow coordinator: uses
- Workflow coordinator → Start and layout: renders (evidence: `figma_ui/src/app/App.tsx`)
- Workflow coordinator → Gesture-guided capture: renders (evidence: `figma_ui/src/app/App.tsx`)
- Workflow coordinator → Photo selection: renders (evidence: `figma_ui/src/app/App.tsx`)
- Workflow coordinator → Frame selection: renders (evidence: `figma_ui/src/app/App.tsx`)
- Workflow coordinator → Result and download: renders (evidence: `figma_ui/src/app/App.tsx`)
- Gesture-guided capture → Gesture recognition: checks gestures (evidence: `figma_ui/src/app/components/ShootingScreen.tsx`)
- Frame selection → Theme presets: looks up themes (evidence: `figma_ui/src/app/components/FrameSelectionScreen.tsx`)
- Frame selection → University lookup: searches universities (evidence: `figma_ui/src/app/components/FrameSelectionScreen.tsx`)
- Result and download → Canvas composition: composes photos (evidence: `figma_ui/src/app/components/CompletionScreen.tsx`)
