# phuctruongasbn86-creator/photofilteringhelper architecture

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

- Interactive diagram: https://gitdiagram.com/phuctruongasbn86-creator/photofilteringhelper
- Repository: https://github.com/phuctruongasbn86-creator/photofilteringhelper

## Overview

Photo Culler takes a shoot folder through RAW/JPEG pairing and preview extraction, CV quality triage, and burst-to-Hero clustering, then presents stacks for human review and writes decisions to XMP. The graph captures the documented audit, rescue, sample-shoot, and reject-cleanup capabilities; several route details and UI links are inferred only where README documents them, so uncertain relationships are omitted.

Main entry points: [`frontend/src/App.tsx`](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/App.tsx) (Culling workspace), [`backend/src/services/pipeline_runner.py`](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/pipeline_runner.py) (Scan orchestrator), [`frontend/src/components/StackReviewStage.tsx`](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/StackReviewStage.tsx) (Stack review), [`backend/src/api/routes.py`](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/api/routes.py) (API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Review interface"]
  node_app["Culling workspace<br/>[App.tsx]"]
  node_session_hook["Session workflow"]
  node_api_client["HTTP client<br/>[client.ts]"]
  node_review_stage["Stack review"]
  node_filmstrip["Stack filmstrip<br/>[StackFilmstrip.tsx]"]
  node_burst_drawer["Burst drawer<br/>[BurstDrawer.tsx]"]
  node_burst_compare["Burst compare"]
  node_audit_grid["Auto-reject audit<br/>[AuditGrid.tsx]"]
  node_zoom_pan["Image zoom/pan<br/>[useImageZoomPan.ts]"]
  node_hotkeys["Keyboard controls<br/>[useHotkeys.ts]"]
  node_progress_ui["Scan progress"]
  node_reject_modal["Reject cleanup"]
end

subgraph group_backend["Analysis services"]
  node_pipeline["Scan orchestrator<br/>[pipeline_runner.py]"]
  node_preview["Pairing and previews"]
  node_quality["Eye quality scoring<br/>[quality_scorer.py]"]
  node_model_loader["CV model loader<br/>[model_loader.py]"]
  node_clusterer["Burst clustering<br/>[burst_clusterer.py]"]
  node_xmp["XMP sidecars<br/>[xmp_sync.py]"]
end

subgraph group_runtime["Session and API"]
  node_schema["Photo and stack model<br/>[schema.py]"]
  node_routes["API routes<br/>[routes.py]"]
  node_store[("Session cache<br/>[session_store.py]")]
  node_picker["Folder picker<br/>[system_picker.py]"]
  node_sandbox["Sample shoot<br/>[sample_sandbox.py]"]
end

node_photographer(("Photographer"))
node_photo_folder[("Shoot folder")]
node_desktop_user(("Desktop user"))

node_photographer -->|"reviews with"| node_app
node_app -->|"uses session"| node_session_hook
node_app -->|"renders"| node_review_stage
node_app -->|"renders"| node_audit_grid
node_app -->|"renders"| node_progress_ui
node_app -->|"renders"| node_reject_modal
node_session_hook -->|"requests"| node_api_client
node_api_client -->|"calls HTTP API"| node_routes
node_routes -->|"starts analysis"| node_pipeline
node_pipeline -->|"runs Stage A"| node_preview
node_pipeline -->|"runs Stage B"| node_quality
node_quality -->|"loads model"| node_model_loader
node_pipeline -->|"runs Stage C"| node_clusterer
node_pipeline -->|"publishes results"| node_store
node_pipeline -->|"syncs auto-rejects"| node_xmp
node_preview -->|"creates assets"| node_schema
node_quality -->|"scores assets"| node_schema
node_clusterer -->|"forms stacks"| node_schema
node_store -->|"caches analysis"| node_photo_folder
node_routes -->|"reads and updates"| node_store
node_routes -->|"writes decisions"| node_xmp
node_review_stage -.->|"shows stacks"| node_filmstrip
node_review_stage -.->|"opens alternates"| node_burst_drawer
node_review_stage -->|"compares frames"| node_burst_compare
node_review_stage -->|"uses zoom"| node_zoom_pan
node_audit_grid -->|"uses zoom"| node_zoom_pan
node_app -->|"registers controls"| node_hotkeys
node_session_hook -->|"streams progress"| node_routes
node_photographer -.->|"chooses folder"| node_picker
node_picker -.->|"selects"| node_photo_folder
node_photographer -->|"requests demo"| node_sandbox
node_app -->|"prepares sample"| node_api_client
node_photographer -->|"moves rejects"| node_reject_modal
node_desktop_user -.->|"uses desktop UI"| node_app

click node_app "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/App.tsx"
click node_session_hook "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/hooks/useCullerSession.ts"
click node_api_client "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/api/client.ts"
click node_review_stage "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/StackReviewStage.tsx"
click node_filmstrip "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/StackFilmstrip.tsx"
click node_burst_drawer "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/BurstDrawer.tsx"
click node_burst_compare "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/BurstCompareView.tsx"
click node_audit_grid "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/AuditGrid.tsx"
click node_zoom_pan "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/hooks/useImageZoomPan.ts"
click node_hotkeys "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/hooks/useHotkeys.ts"
click node_progress_ui "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/ProgressOverlay.tsx"
click node_schema "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/models/schema.py"
click node_routes "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/api/routes.py"
click node_pipeline "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/pipeline_runner.py"
click node_preview "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/preview_extractor.py"
click node_quality "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/quality_scorer.py"
click node_model_loader "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/model_loader.py"
click node_clusterer "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/burst_clusterer.py"
click node_store "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/session_store.py"
click node_xmp "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/xmp_sync.py"
click node_picker "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/system_picker.py"
click node_sandbox "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/sample_sandbox.py"
click node_reject_modal "https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/MoveRejectsModal.tsx"

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_session_hook,node_api_client,node_review_stage,node_filmstrip,node_burst_drawer,node_burst_compare,node_audit_grid,node_zoom_pan,node_hotkeys,node_progress_ui,node_reject_modal,node_desktop_user toneBlue
class node_pipeline,node_preview,node_quality,node_model_loader,node_clusterer,node_xmp,node_photo_folder toneAmber
class node_schema,node_routes,node_store,node_picker,node_sandbox toneMint
class node_photographer toneIndigo
```

## Components

### Review interface

- [Culling workspace](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session workflow](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/hooks/useCullerSession.ts): `frontend/src/hooks/useCullerSession.ts`
- [HTTP client](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [Stack review](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/StackReviewStage.tsx): `frontend/src/components/StackReviewStage.tsx`
- [Stack filmstrip](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/StackFilmstrip.tsx): `frontend/src/components/StackFilmstrip.tsx`
- [Burst drawer](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/BurstDrawer.tsx): `frontend/src/components/BurstDrawer.tsx`
- [Burst compare](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/BurstCompareView.tsx): `frontend/src/components/BurstCompareView.tsx`
- [Auto-reject audit](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/AuditGrid.tsx): `frontend/src/components/AuditGrid.tsx`
- [Image zoom/pan](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/hooks/useImageZoomPan.ts): `frontend/src/hooks/useImageZoomPan.ts`
- [Keyboard controls](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/hooks/useHotkeys.ts): `frontend/src/hooks/useHotkeys.ts`
- [Scan progress](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/ProgressOverlay.tsx): `frontend/src/components/ProgressOverlay.tsx`
- [Reject cleanup](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/frontend/src/components/MoveRejectsModal.tsx): `frontend/src/components/MoveRejectsModal.tsx`

### Analysis services

- [Scan orchestrator](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/pipeline_runner.py): `backend/src/services/pipeline_runner.py`
- [Pairing and previews](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/preview_extractor.py): `backend/src/services/preview_extractor.py`
- [Eye quality scoring](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/quality_scorer.py): `backend/src/services/quality_scorer.py`
- [CV model loader](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/model_loader.py): `backend/src/services/model_loader.py`
- [Burst clustering](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/burst_clusterer.py): `backend/src/services/burst_clusterer.py`
- [XMP sidecars](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/xmp_sync.py): `backend/src/services/xmp_sync.py`

### Session and API

- [Photo and stack model](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/models/schema.py): `backend/src/models/schema.py`
- [API routes](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/api/routes.py): `backend/src/api/routes.py`
- [Session cache](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/session_store.py): `backend/src/services/session_store.py`
- [Folder picker](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/system_picker.py): `backend/src/services/system_picker.py`
- [Sample shoot](https://github.com/phuctruongasbn86-creator/photofilteringhelper/blob/main/backend/src/services/sample_sandbox.py): `backend/src/services/sample_sandbox.py`

### Other components

- **Photographer**
- **Shoot folder**
- **Desktop user**

## Connections

- Photographer → Culling workspace: reviews with (evidence: `README.md`)
- Culling workspace → Session workflow: uses session (evidence: `frontend/src/App.tsx`)
- Culling workspace → Stack review: renders (evidence: `frontend/src/App.tsx`)
- Culling workspace → Auto-reject audit: renders (evidence: `frontend/src/App.tsx`)
- Culling workspace → Scan progress: renders (evidence: `frontend/src/App.tsx`)
- Culling workspace → Reject cleanup: renders (evidence: `frontend/src/App.tsx`)
- Session workflow → HTTP client: requests (evidence: `frontend/src/hooks/useCullerSession.ts`)
- HTTP client → API routes: calls HTTP API (evidence: `frontend/src/api/client.ts`)
- API routes → Scan orchestrator: starts analysis (evidence: `backend/src/api/routes.py`)
- Scan orchestrator → Pairing and previews: runs Stage A (evidence: `backend/src/services/pipeline_runner.py`)
- Scan orchestrator → Eye quality scoring: runs Stage B (evidence: `backend/src/services/pipeline_runner.py`)
- Eye quality scoring → CV model loader: loads model (evidence: `backend/src/services/quality_scorer.py`)
- Scan orchestrator → Burst clustering: runs Stage C (evidence: `backend/src/services/pipeline_runner.py`)
- Scan orchestrator → Session cache: publishes results (evidence: `backend/src/services/pipeline_runner.py`)
- Scan orchestrator → XMP sidecars: syncs auto-rejects (evidence: `backend/src/services/pipeline_runner.py`)
- Pairing and previews → Photo and stack model: creates assets (evidence: `backend/src/services/preview_extractor.py`)
- Eye quality scoring → Photo and stack model: scores assets (evidence: `backend/src/services/quality_scorer.py`)
- Burst clustering → Photo and stack model: forms stacks (evidence: `backend/src/services/burst_clusterer.py`)
- Session cache → Shoot folder: caches analysis (evidence: `backend/src/services/session_store.py`)
- API routes → Session cache: reads and updates (evidence: `backend/src/api/routes.py`)
- API routes → XMP sidecars: writes decisions (evidence: `backend/src/api/routes.py`)
- Stack review → Stack filmstrip: shows stacks
- Stack review → Burst drawer: opens alternates
- Stack review → Burst compare: compares frames (evidence: `frontend/src/components/StackReviewStage.tsx`)
- Stack review → Image zoom/pan: uses zoom (evidence: `frontend/src/components/StackReviewStage.tsx`)
- Auto-reject audit → Image zoom/pan: uses zoom (evidence: `frontend/src/components/AuditGrid.tsx`)
- Culling workspace → Keyboard controls: registers controls (evidence: `frontend/src/App.tsx`)
- Session workflow → API routes: streams progress
- Photographer → Folder picker: chooses folder (evidence: `README.md`)
- Folder picker → Shoot folder: selects
- Photographer → Sample shoot: requests demo
- Culling workspace → HTTP client: prepares sample (evidence: `frontend/src/App.tsx`)
- Photographer → Reject cleanup: moves rejects (evidence: `README.md`)
- Desktop user → Culling workspace: uses desktop UI (evidence: `README.md`)
