# guzheng3/snow-shot architecture

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

- Interactive diagram: https://gitdiagram.com/guzheng3/snow-shot
- Repository: https://github.com/guzheng3/snow-shot

## Overview

Snow Shot is a desktop screenshot and annotation application. The main workflow begins when a user invokes capture, proceeds through the draw interface and its annotation tools, and produces an image that can be saved, copied, or pinned. The README also documents full-screen, window, scroll, and focus-window capture, customizable shortcuts, and plugin-backed OCR, video recording, translation, and AI chat. The graph reflects the frontend/native boundary and major capability areas; most implementation excerpts were not sampled, so uncertain internal call links are omitted.

Main entry points: [`src/pages/draw/page.tsx`](https://github.com/guzheng3/snow-shot/blob/main/src/pages/draw/page.tsx) (Draw workspace), [`src-tauri/src-crates/plugin-service/src/plugin_service.rs`](https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/plugin-service/src/plugin_service.rs) (Plugin service), [`src/App.tsx`](https://github.com/guzheng3/snow-shot/blob/main/src/App.tsx) (Application shell), [`src/pages/home/index.tsx`](https://github.com/guzheng3/snow-shot/blob/main/src/pages/home/index.tsx) (Home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App interface"]
  node_app["Application shell<br/>[App.tsx]"]
  node_routes["Route layouts<br/>[route.tsx]"]
  node_home["Home<br/>[index.tsx]"]
end

subgraph group_capture["Capture and editing"]
  node_draw["Draw workspace<br/>[page.tsx]"]
  node_drawtools["Annotation tools<br/>[index.tsx]"]
  node_fullscreen["Full-screen capture<br/>[page.tsx]"]
  node_scroll["Scroll capture"]
  node_image["Image rendering<br/>[renderWorker.ts]"]
  node_output["Screenshot actions<br/>[screenshot.ts]"]
  node_history[("Capture history<br/>[captureHistory.ts]")]
end

subgraph group_native["Desktop services"]
  node_commands["Tauri command bridge<br/>[index.ts]"]
  node_nativeapp["Native app<br/>[lib.rs]"]
  node_screenshotcmd["Screenshot commands<br/>[lib.rs]"]
end

subgraph group_extensions["Plugin capabilities"]
  node_ocr["OCR services<br/>[ocr_service.rs]"]
  node_plugin["Plugin service<br/>[plugin_service.rs]"]
  node_video["Video recording"]
  node_translation["Translation<br/>[translation.ts]"]
  node_chat["AI chat<br/>[page.tsx]"]
end

subgraph group_settings["Configuration"]
  node_hotkeys["Shortcut settings<br/>[page.tsx]"]
  node_settingspage["App settings<br/>[page.tsx]"]
end

node_user(("User"))
node_os(("Operating system"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_home
node_user -->|"starts capture"| node_home
node_home -->|"opens capture"| node_draw
node_draw -->|"provides tools"| node_drawtools
node_draw -->|"renders image"| node_image
node_draw -->|"supports mode"| node_fullscreen
node_draw -->|"requests capture"| node_scroll
node_draw -->|"exports image"| node_output
node_output -->|"records capture"| node_history
node_draw -->|"invokes commands"| node_commands
node_commands -->|"dispatches"| node_nativeapp
node_nativeapp -->|"registers commands"| node_screenshotcmd
node_screenshotcmd -->|"captures screen"| node_os
node_draw -.->|"requests recognition"| node_ocr
node_app -->|"initializes plugins"| node_plugin
node_plugin -.->|"enables feature"| node_video
node_plugin -.->|"enables feature"| node_translation
node_plugin -.->|"enables feature"| node_chat
node_user -->|"configures"| node_hotkeys
node_user -->|"configures"| node_settingspage

click node_app "https://github.com/guzheng3/snow-shot/blob/main/src/App.tsx"
click node_routes "https://github.com/guzheng3/snow-shot/blob/main/src/routes/_layout/route.tsx"
click node_home "https://github.com/guzheng3/snow-shot/blob/main/src/pages/home/index.tsx"
click node_draw "https://github.com/guzheng3/snow-shot/blob/main/src/pages/draw/page.tsx"
click node_drawtools "https://github.com/guzheng3/snow-shot/blob/main/src/pages/draw/components/drawToolbar/index.tsx"
click node_fullscreen "https://github.com/guzheng3/snow-shot/blob/main/src/pages/fullScreenDraw/page.tsx"
click node_scroll "https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/app-scroll-screenshot-service/src/scroll_screenshot_service.rs"
click node_image "https://github.com/guzheng3/snow-shot/blob/main/src/components/imageLayer/workers/renderWorker.ts"
click node_output "https://github.com/guzheng3/snow-shot/blob/main/src/functions/screenshot.ts"
click node_history "https://github.com/guzheng3/snow-shot/blob/main/src/utils/captureHistory.ts"
click node_commands "https://github.com/guzheng3/snow-shot/blob/main/src/commands/index.ts"
click node_nativeapp "https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src/lib.rs"
click node_screenshotcmd "https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/tauri-commands/screenshot/src/lib.rs"
click node_ocr "https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/app-services/src/ocr_service.rs"
click node_plugin "https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/plugin-service/src/plugin_service.rs"
click node_video "https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/app-services/src/video_record_service.rs"
click node_translation "https://github.com/guzheng3/snow-shot/blob/main/src/services/tools/translation.ts"
click node_chat "https://github.com/guzheng3/snow-shot/blob/main/src/pages/tools/chat/page.tsx"
click node_hotkeys "https://github.com/guzheng3/snow-shot/blob/main/src/pages/settings/hotKeySettings/page.tsx"
click node_settingspage "https://github.com/guzheng3/snow-shot/blob/main/src/pages/settings/functionSettings/page.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_routes,node_home,node_user toneBlue
class node_draw,node_drawtools,node_fullscreen,node_scroll,node_image,node_output,node_history toneAmber
class node_commands,node_nativeapp,node_screenshotcmd toneMint
class node_ocr,node_plugin,node_video,node_translation,node_chat toneRose
class node_hotkeys,node_settingspage,node_os toneIndigo
```

## Components

### App interface

- [Application shell](https://github.com/guzheng3/snow-shot/blob/main/src/App.tsx): `src/App.tsx`
- [Route layouts](https://github.com/guzheng3/snow-shot/blob/main/src/routes/_layout/route.tsx): `src/routes/_layout/route.tsx`
- [Home](https://github.com/guzheng3/snow-shot/blob/main/src/pages/home/index.tsx): `src/pages/home/index.tsx`

### Capture and editing

- [Draw workspace](https://github.com/guzheng3/snow-shot/blob/main/src/pages/draw/page.tsx): `src/pages/draw/page.tsx`
- [Annotation tools](https://github.com/guzheng3/snow-shot/blob/main/src/pages/draw/components/drawToolbar/index.tsx): `src/pages/draw/components/drawToolbar/index.tsx`
- [Full-screen capture](https://github.com/guzheng3/snow-shot/blob/main/src/pages/fullScreenDraw/page.tsx): `src/pages/fullScreenDraw/page.tsx`
- [Scroll capture](https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/app-scroll-screenshot-service/src/scroll_screenshot_service.rs): `src-tauri/src-crates/app-scroll-screenshot-service/src/scroll_screenshot_service.rs`
- [Image rendering](https://github.com/guzheng3/snow-shot/blob/main/src/components/imageLayer/workers/renderWorker.ts): `src/components/imageLayer/workers/renderWorker.ts`
- [Screenshot actions](https://github.com/guzheng3/snow-shot/blob/main/src/functions/screenshot.ts): `src/functions/screenshot.ts`
- [Capture history](https://github.com/guzheng3/snow-shot/blob/main/src/utils/captureHistory.ts): `src/utils/captureHistory.ts`

### Desktop services

- [Tauri command bridge](https://github.com/guzheng3/snow-shot/blob/main/src/commands/index.ts): `src/commands/index.ts`
- [Native app](https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Screenshot commands](https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/tauri-commands/screenshot/src/lib.rs): `src-tauri/src-crates/tauri-commands/screenshot/src/lib.rs`

### Plugin capabilities

- [OCR services](https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/app-services/src/ocr_service.rs): `src-tauri/src-crates/app-services/src/ocr_service.rs`
- [Plugin service](https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/plugin-service/src/plugin_service.rs): `src-tauri/src-crates/plugin-service/src/plugin_service.rs`
- [Video recording](https://github.com/guzheng3/snow-shot/blob/main/src-tauri/src-crates/app-services/src/video_record_service.rs): `src-tauri/src-crates/app-services/src/video_record_service.rs`
- [Translation](https://github.com/guzheng3/snow-shot/blob/main/src/services/tools/translation.ts): `src/services/tools/translation.ts`
- [AI chat](https://github.com/guzheng3/snow-shot/blob/main/src/pages/tools/chat/page.tsx): `src/pages/tools/chat/page.tsx`

### Configuration

- [Shortcut settings](https://github.com/guzheng3/snow-shot/blob/main/src/pages/settings/hotKeySettings/page.tsx): `src/pages/settings/hotKeySettings/page.tsx`
- [App settings](https://github.com/guzheng3/snow-shot/blob/main/src/pages/settings/functionSettings/page.tsx): `src/pages/settings/functionSettings/page.tsx`

### Other components

- **User**
- **Operating system**

## Connections

- User → Application shell: opens
- Application shell → Route layouts: renders
- Route layouts → Home: routes to
- User → Home: starts capture
- Home → Draw workspace: opens capture
- Draw workspace → Annotation tools: provides tools
- Draw workspace → Image rendering: renders image
- Draw workspace → Full-screen capture: supports mode
- Draw workspace → Scroll capture: requests capture
- Draw workspace → Screenshot actions: exports image
- Screenshot actions → Capture history: records capture
- Draw workspace → Tauri command bridge: invokes commands
- Tauri command bridge → Native app: dispatches
- Native app → Screenshot commands: registers commands
- Screenshot commands → Operating system: captures screen
- Draw workspace → OCR services: requests recognition
- Application shell → Plugin service: initializes plugins
- Plugin service → Video recording: enables feature
- Plugin service → Translation: enables feature
- Plugin service → AI chat: enables feature
- User → Shortcut settings: configures
- User → App settings: configures
