$ show CyberTimon/RapidRAW
RapidRAW is a production-quality, non-destructive RAW image editor built as a Tauri v2 desktop application with a Rust backend and React/TypeScript frontend. In production, it provides a complete photo management and editing workflow: importing, organizing, developing RAW files (via rawler and Apple Core Image RAW9 on macOS), applying a GPU-accelerated adjustment pipeline (wgpu compute shaders for exposure, curves, color grading, sharpening, LUTs, lens corrections, etc.), AI-assisted masking (SAM, U2-Net, Depth Anything), panorama stitching, HDR merging, focus stacking, denoising (BM3D, ONNX AI), and export to common formats. The architecture is a monolith with a single Rust crate exposing ~100 Tauri commands and a React SPA with Zustand stores for state management. Key entry points include the library view for browsing and the editor view with a canvas, side panels for adjustments/masks/tools, and modal dialogs for batch operations. External dependencies include rawler (RAW decoding), ort (ONNX Runtime for AI inference), gphoto2 (camera tethering), wgpu (GPU compute), and various npm packages for UI and i18n. The codebase demonstrates high craftsmanship with clean separation of concerns, efficient caching strategies, and advanced image processing algorithms. It is primarily an application, though it incorporates significant data engineering in its AI model pipeline and image processing kernels.
The LLM identified 3 files worth highlighting for reuse:
A self-contained LRU cache class that stores Blob URLs (or any values) with a configurable capacity, eviction policy, and protection mechanism to prevent eviction of in-use URLs. It exposes get, set, delete, and clear methods and gracefully handles missing keys. This pattern is reusable in any TypeScript application needing a bounded in-memory cache with eviction, especially for resource-heavy objects like image blobs.
A highly customizable slider component supporting drag, keyboard navigation, scroll wheel, fine adjustment (with modifier key), animation, and touch. It accepts a wide range of props (value, min, max, step, vertical/horizontal, size, color, tooltip, etc.) and emits onChange callbacks. The implementation uses refs and pointer events for smooth interaction and avoids external animation libraries for the thumb movement. This component can be extracted into any React project requiring a rich slider input.
Implements camera white balance estimation and correction using Robertson isotherms for correlated color temperature, CIE xy chromaticity to temperature/tint conversion, Bradford chromatic adaptation, and dual-illuminant camera neutral estimation. The module is self-contained in its algorithmic logic (though it may reference internal types) and demonstrates rigorous color science. The core computations (e.g., isotherm interpolation, adaptation matrix computation) could be extracted into a standalone color science library.