LyAhn df17497808 feat: add region-based similarity search
Adds a "Search within image" button to the lightbox that lets the user
draw a crop region on an image and find visually similar results using
that crop's embedding. The crop is embedded in-memory without a temp
file via a new embed_image_crop method on ClipImageEmbedder.

Introduces a folder-scoped cosine search (search_image_ids_by_embedding_in_folder)
to support the current-folder scope option, and wires up the new
find_similar_by_region Tauri command end-to-end from Rust through to
the Zustand store and Lightbox UI.
2026-06-02 19:39:31 +01:00
2026-04-05 19:12:48 +01:00

Phokus

Overview

Phokus is a Tauri desktop app for building a fast, local media library from folders on disk. It indexes images and videos, stores metadata in SQLite, and gives you a dense browsing workflow with filtering, favorites, ratings, and a lightbox preview.

The current app is optimized for:

  • local folders instead of cloud import flows
  • large visual libraries
  • quick review and curation
  • mixed image and video browsing

Current features

  • Add and remove media folders
  • Background indexing with progress updates
  • Browse all media or filter by folder
  • Search by filename
  • Filter by images, videos, or favorites
  • Sort by modified date, name, or file size
  • Grid density controls
  • Lightbox preview with keyboard navigation
  • Favorite and star-rating metadata saved in SQLite
  • Virtualized/local-first architecture built on Tauri + React

Supported formats

Images:

  • jpg
  • jpeg
  • png
  • gif
  • bmp
  • tiff
  • tif
  • webp
  • avif
  • heic
  • heif

Videos:

  • mp4
  • mov
  • m4v
  • webm

Stack

  • Tauri 2
  • React 19
  • TypeScript
  • Zustand
  • Rust
  • SQLite + sqlite-vec
  • Vite

Project structure

  • src/: React UI, state, and components
  • src-tauri/src/commands.rs: Tauri command surface
  • src-tauri/src/db.rs: SQLite schema and queries
  • src-tauri/src/indexer.rs: folder crawling and batch indexing
  • src-tauri/src/vector.rs: vector table setup for future semantic workflows

Development

Prerequisites

  • Node.js 20+
  • pnpm
  • Rust toolchain
  • Tauri system prerequisites for Windows

Install

pnpm install

Run in development

pnpm tauri dev

Build

pnpm tauri build

How it works

  1. Add a folder from the sidebar or Library menu.
  2. The Rust indexer walks the directory recursively.
  3. Supported files are written into SQLite with metadata such as path, size, dimensions, media type, rating, and favorite state.
  4. Progress events stream back to the UI while the gallery updates incrementally.
  5. The gallery view loads media in pages and opens items in a lightbox for review.

Notes

  • This is currently a local desktop library, not a sync product.
  • Search is filename-based right now.
  • The vector table and embedding fields exist, but semantic search is not wired into the UI yet.
  • Some visible UI copy may still use the old working name until the frontend text is updated.

Positioning

The clearest product description today is:

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

That description is more accurate than "gallery" alone and gives you a better base for future branding, onboarding copy, and a landing page.

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%