# ricky041229/picpik-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/ricky041229/picpik-desktop
- Repository: https://github.com/ricky041229/picpik-desktop

## Overview

PicPik is a local desktop photo-selection tool: users provide a source folder and paste a client’s selections, review matched and missing files, then copy the chosen photos and open the output folder. The README also documents robust filename matching and log export for feedback. The UI excerpt shows native command calls, progress events, and drag/drop handling; the Rust implementation was read but not excerpted, so internal backend responsibilities and their links are shown only where documented or marked unverified.

Main entry points: [`src/App.tsx`](https://github.com/ricky041229/picpik-desktop/blob/main/src/App.tsx) (PicPik interface), [`src-tauri/src/lib.rs`](https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs) (Photo matching), [`src/lib/utils.ts`](https://github.com/ricky041229/picpik-desktop/blob/main/src/lib/utils.ts) (Class utilities), [`src/main.tsx`](https://github.com/ricky041229/picpik-desktop/blob/main/src/main.tsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Selection workflow"]
  node_app["PicPik interface<br/>[App.tsx]"]
  node_folder["Folder selection<br/>[App.tsx]"]
  node_matching["Photo matching<br/>[lib.rs]"]
  node_review["Match review<br/>[App.tsx]"]
  node_copy["Selected photo copy<br/>[lib.rs]"]
  node_output["Output folder<br/>[lib.rs]"]
end

subgraph group_native["Native operations"]
  node_logs["Recognition logs<br/>[lib.rs]"]
  node_tauri["Tauri runtime<br/>[lib.rs]"]
end

subgraph group_interface["Desktop interface"]
  node_entry["React entry<br/>[main.tsx]"]
end

subgraph group_ui["UI components"]
  node_sidebar["Sidebar components<br/>[sidebar.tsx]"]
  node_window["Window components<br/>[window.tsx]"]
  node_ui_parts["Shared UI controls"]
  node_class_utils["Class utilities<br/>[utils.ts]"]
end

node_user(("Photographer"))

node_user -->|"provides folder and text"| node_app
node_entry -->|"mounts"| node_app
node_app -->|"chooses or drops"| node_folder
node_folder -.->|"scans selections"| node_matching
node_app -.->|"requests scan"| node_matching
node_matching -.->|"returns matches"| node_review
node_user -->|"reviews results"| node_review
node_app -.->|"requests copy"| node_copy
node_copy -.->|"writes selected files"| node_output
node_app -->|"opens folder"| node_output
node_app -->|"records scan log"| node_logs
node_user -->|"exports feedback log"| node_logs
node_tauri -.->|"hosts webview"| node_app
node_sidebar -->|"uses styles helper"| node_class_utils
node_window -->|"uses styles helper"| node_class_utils
node_ui_parts -.->|"uses styles helper"| node_class_utils

click node_app "https://github.com/ricky041229/picpik-desktop/blob/main/src/App.tsx"
click node_folder "https://github.com/ricky041229/picpik-desktop/blob/main/src/App.tsx"
click node_matching "https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs"
click node_review "https://github.com/ricky041229/picpik-desktop/blob/main/src/App.tsx"
click node_copy "https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs"
click node_output "https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs"
click node_logs "https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs"
click node_tauri "https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs"
click node_entry "https://github.com/ricky041229/picpik-desktop/blob/main/src/main.tsx"
click node_sidebar "https://github.com/ricky041229/picpik-desktop/blob/main/src/components/ui/sidebar.tsx"
click node_window "https://github.com/ricky041229/picpik-desktop/blob/main/src/components/ui/window.tsx"
click node_ui_parts "https://github.com/ricky041229/picpik-desktop/tree/main/src/components/ui"
click node_class_utils "https://github.com/ricky041229/picpik-desktop/blob/main/src/lib/utils.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_folder,node_matching,node_review,node_copy,node_output toneBlue
class node_logs,node_tauri toneAmber
class node_entry toneMint
class node_sidebar,node_window,node_ui_parts,node_class_utils toneRose
class node_user toneIndigo
```

## Components

### Selection workflow

- [PicPik interface](https://github.com/ricky041229/picpik-desktop/blob/main/src/App.tsx): `src/App.tsx`
- [Folder selection](https://github.com/ricky041229/picpik-desktop/blob/main/src/App.tsx): `src/App.tsx`
- [Photo matching](https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Match review](https://github.com/ricky041229/picpik-desktop/blob/main/src/App.tsx): `src/App.tsx`
- [Selected photo copy](https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Output folder](https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Native operations

- [Recognition logs](https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Tauri runtime](https://github.com/ricky041229/picpik-desktop/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Desktop interface

- [React entry](https://github.com/ricky041229/picpik-desktop/blob/main/src/main.tsx): `src/main.tsx`

### UI components

- [Sidebar components](https://github.com/ricky041229/picpik-desktop/blob/main/src/components/ui/sidebar.tsx): `src/components/ui/sidebar.tsx`
- [Window components](https://github.com/ricky041229/picpik-desktop/blob/main/src/components/ui/window.tsx): `src/components/ui/window.tsx`
- [Shared UI controls](https://github.com/ricky041229/picpik-desktop/tree/main/src/components/ui): `src/components/ui`
- [Class utilities](https://github.com/ricky041229/picpik-desktop/blob/main/src/lib/utils.ts): `src/lib/utils.ts`

### Other components

- **Photographer**

## Connections

- Photographer → PicPik interface: provides folder and text (evidence: `README.md`)
- React entry → PicPik interface: mounts (evidence: `src/main.tsx`)
- PicPik interface → Folder selection: chooses or drops (evidence: `src/App.tsx`)
- Folder selection → Photo matching: scans selections
- PicPik interface → Photo matching: requests scan
- Photo matching → Match review: returns matches
- Photographer → Match review: reviews results (evidence: `README.md`)
- PicPik interface → Selected photo copy: requests copy
- Selected photo copy → Output folder: writes selected files (evidence: `src-tauri/src/lib.rs`)
- PicPik interface → Output folder: opens folder (evidence: `src/App.tsx`)
- PicPik interface → Recognition logs: records scan log (evidence: `src/App.tsx`)
- Photographer → Recognition logs: exports feedback log (evidence: `README.md`)
- Tauri runtime → PicPik interface: hosts webview
- Sidebar components → Class utilities: uses styles helper (evidence: `src/components/ui/sidebar.tsx`)
- Window components → Class utilities: uses styles helper (evidence: `src/components/ui/window.tsx`)
- Shared UI controls → Class utilities: uses styles helper (evidence: `src/components/ui/sidebar.tsx`)
