Minimal, Rams‑inspired image editor focused on crop. One shared UI/logic codebase runs on:
- Web (Vite build)
- macOS / Windows desktop via Tauri v2 wrapper
- Tauri v2: native desktop shell with small binaries and OS dialogs/FS.
- React + TypeScript: fast UI iteration with strong typing for math and state.
- Vite: quick dev server + optimized web builds.
- Canvas 2D: lightweight renderer (no heavy dependencies) suitable for MVP.
- lucide-react: minimal icon set.
src/core/— pure math/logic (rect ops, crop resize, history, export pipeline)src/ui/— React components (canvas view, panels)src/platform/— Web/Tauri file IO adapterssrc-tauri/— desktop wrapper
Install:
npm installWeb:
npm run dev # dev server
npm run build # production buildDesktop (Tauri):
npm run dev:desktop # macOS/Windows dev
npm run build:desktop # macOS/Windows buildTests (core math):
npm run testresizeCropRect(src/core/crop.ts) handles handles, Shift (square), and Option/Alt (symmetric around center).- For square mode, the active edge(s) are adjusted while keeping the anchor edge(s) fixed; symmetric mode keeps the center fixed.
- All crop rects are stored in image space (oriented after rotation), not screen space.
- While moving/resizing, the rect snaps to image edges, center, and thirds within a small threshold.
- Active snap guides are drawn as dashed lines across the image.
- Export uses crop → rotate → export, with rects converted back to original image coordinates when rotation is applied.
- See
src/core/transform.tsandunrotateRectToOriginalfor the mapping.
- Add adjustments to
TransformStateinsrc/core/types.ts. - Apply them in
exportTransformedImageand render preview overlays inCanvasView.
Desktop permissions are configured in src-tauri/capabilities/default.json for dialog + filesystem.
MIT © 2026 Koz-TV