How guzheng3/snow-shot works
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: page.tsx Draw workspace · plugin_service.rs Plugin service · App.tsx Application shell · index.tsx Home
Components 22
App interface
- Application shell
src/App.tsx - Route layouts
src/routes/_layout/route.tsx - Home
src/pages/home/index.tsx
Capture and editing
- Draw workspace
src/pages/draw/page.tsx - Annotation tools
src/pages/draw/components/drawToolbar/index.tsx - Full-screen capture
src/pages/fullScreenDraw/page.tsx - Scroll capture
src-tauri/src-crates/app-scroll-screenshot-service/src/scroll_screenshot_service.rs - Image rendering
src/components/imageLayer/workers/renderWorker.ts - Screenshot actions
src/functions/screenshot.ts - Capture history
src/utils/captureHistory.ts
Desktop services
- Tauri command bridge
src/commands/index.ts - Native app
src-tauri/src/lib.rs - Screenshot commands
src-tauri/src-crates/tauri-commands/screenshot/src/lib.rs
Plugin capabilities
- OCR services
src-tauri/src-crates/app-services/src/ocr_service.rs - Plugin service
src-tauri/src-crates/plugin-service/src/plugin_service.rs - Video recording
src-tauri/src-crates/app-services/src/video_record_service.rs - Translation
src/services/tools/translation.ts - AI chat
src/pages/tools/chat/page.tsx
Configuration
- Shortcut settings
src/pages/settings/hotKeySettings/page.tsx - App settings
src/pages/settings/functionSettings/page.tsx
Other components
- User
- Operating system
Connections 22
- 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