LyAhn 183cdff6b1 fix: address all 6 P2 review issues from PR #8 round 4
- BackgroundTasks: per-task Retry now dispatches to the correct backend —
  retryFailedEmbeddings for embedding failures, queueTaggingJobs for tagging
  failures, or both; previously always called embedding retry only

- commands: tag-cloud cache key now hashes both image IDs and embedding bytes
  (xxh3) so re-embedding a file after reindex correctly invalidates the cache;
  removed now-dead fnv_hash_ids helper

- db: update_folder_path uses SUBSTR instead of replace() to rewrite only the
  leading path prefix, preventing corruption when the old folder name also
  appears in a subdirectory name

- db: add_user_tag promotes an existing AI-owned tag to user-owned on conflict
  instead of DO NOTHING, preventing the tagger from deleting a manually added
  tag that coincides with an AI tag

- db/commands: add clear_duplicate_scan_cache / invalidate_duplicate_scan_cache
  so deletion removes the stale persisted cache entry; without this a restart
  would reload groups containing deleted images

- store: setSimilarScope re-runs loadSimilarByRegion (with saved crop) when the
  active collection is Region Search Results, instead of silently switching to
  whole-image similarity and discarding the crop
2026-06-07 09:45:57 +01:00
2026-04-05 19:12:48 +01:00

Phokus

A local-first desktop media library for browsing, filtering, and curating image and video folders.

Features

  • Add and remove media folders; background indexing with live progress
  • Browse all media or filter by folder, type (image/video), favorites, or star rating
  • Filename search, semantic search (/s query), and tag search (/t tag)
  • Similar image search — find visually similar media by image or selected region
  • AI tagging via WD tagger (ONNX, CPU/DirectML) with confidence threshold control
  • Explore view — visual cluster map and tag cloud for browsing by theme
  • Duplicate finder — scan for exact duplicates by file hash with bulk delete
  • Lightbox preview with keyboard navigation, inline tag editing, and rating controls
  • Sort by date, name, size, rating, or duration
  • Grid density controls (compact / comfortable / detail)

Supported formats

Images Videos
jpg, jpeg, png, gif, bmp mp4, mov, m4v
tiff, tif, webp, avif, heic, heif webm

Stack

  • Tauri 2 + Rust backend
  • React 19 + TypeScript + Zustand
  • SQLite + sqlite-vec (vector search)
  • ONNX Runtime (ort) for AI tagging
  • Candle (Rust ML) for visual embeddings
  • FFmpeg sidecar for video thumbnails and metadata
  • Vite + Tailwind CSS v4

Development

Prerequisites: Node.js 20+, pnpm, Rust toolchain, Tauri system prerequisites for Windows.

pnpm install

# Run with hot-reload (frontend + Rust)
pnpm dev:app

# Frontend only
pnpm dev:vite

# Production build
pnpm build:app

How it works

  1. Add a folder from the sidebar — the Rust indexer walks it recursively.
  2. Supported files are written to SQLite with metadata (path, dimensions, media type, etc.).
  3. Background workers generate thumbnails, compute visual embeddings, and run AI tagging.
  4. Progress events stream back to the UI while the gallery updates incrementally.
  5. Embeddings power semantic search and the similar images feature via an HNSW index.
S
Description
Local-first image gallery with semantic search and AI tagging (Tauri + React + Rust)
Readme MIT 14 MiB
Languages
TypeScript 60.4%
Rust 37.5%
CSS 1.3%
Shell 0.4%
JavaScript 0.2%
Other 0.2%