/sub-packages/imgs-viewer/CLAUDE.md
CLAUDE.md at /sub-packages/imgs-viewer/CLAUDE.md
Path: sub-packages/imgs-viewer/CLAUDE.md
imgs-viewer
Tauri v2 image viewer app for browsing, previewing, and processing product images. Unlike the other tauri-* wrappers, this app has its own Rust backend with file operations, image processing, and CLI tool integration.
Quick Start
cargo tauri dev # launch the app (from src-tauri/)
pnpm tauri:dev # same, from package root
Port
Dev server: 14150
Architecture
- src-tauri/ — Rust backend (Tauri v2 app)
src/commands/files.rs— Directory listing, file watching (notify crate)src/commands/images.rs— Thumbnail generation, image data loading, HEIC conversionsrc/commands/actions.rs— CLI tool integration (orange-calibrator, product-photo-maker)src/state.rs— App state (thumbnail cache, file watcher)
- frontend/ — Loading page shown while Vite dev server starts
- src/ — React + Vite frontend (separate topic)
CLI Tool Integration
The actions module runs project CLI tools as subprocesses:
orange-calibrator— Orange background color normalizationproduct-photo-maker— Product photo processing (bg removal, shadow, trim)
Tools are located via CARGO_MANIFEST_DIR relative path resolution to the project root.
Key Files
src-tauri/Cargo.toml— Rust dependenciessrc-tauri/tauri.conf.json— Tauri configuration (port 14150)src-tauri/src/lib.rs— Command registrationpackage.json— Shared between frontend and backend