4.1 KiB
4.1 KiB
Phokus Roadmap
Purpose
This file tracks the agreed implementation phases for Phokus so work can continue cleanly across sessions and machines.
Product Direction
Phokus is a local-first desktop media library for images and videos with:
- fast folder indexing
- rich browsing and preview UX
- background thumbnail and metadata processing
- CLIP-powered similarity search via
sqlite-vec
Phase 1: Core Indexing And Gallery Stability
Status: done
Goals:
- fix folder add/index so media actually appears
- fix gallery rendering/layout issues
- stream indexed items into the gallery incrementally
- stop full-gallery refresh churn during indexing
Completed:
- fixed broken DB image queries
- fixed blank gallery rendering path
- simplified the grid rendering path
- changed indexing updates to stream into the current gallery
Phase 2: Media Model And UI Expansion
Status: mostly done
Goals:
- support images and videos as first-class media types
- expand the shell UI so future features fit naturally
- add favorites, ratings, context actions, and richer preview behavior
Completed:
- media kind support in backend and frontend
- favorites and ratings persisted in SQLite
- top menu bar and richer toolbar
- right-click context menu in the gallery
- improved lightbox with zoom, rating, favorite controls, and video playback
Remaining polish:
- broader UI redesign pass later
- continue refining background task presentation
Phase 3: Media Processing Foundation
Status: in progress
Goals:
- stable thumbnail pipeline for images and videos
- video metadata extraction
- visible background task tracking
- optimized indexing and reindexing, especially for large/external drives
- stable shipping story for FFmpeg/FFprobe
Completed:
- image thumbnail generation upgraded to
fast_image_resize - EXIF orientation handling added for images
- stable thumbnail cache hashing via
xxh3 - video poster generation via sidecar-managed FFmpeg
- video metadata extraction via FFprobe
- background task panel added
- reindexing changed from rebuild-from-zero to reconciliation against DB state
- active folder indexing is prioritized over thumbnail/metadata workers
- cold-index path optimized by moving image dimension extraction out of the scan path
- FFmpeg/FFprobe provisioning now uses
ffmpeg-sidecar
Still to do before moving on fully:
- optimize thumbnail throughput further
- optimize cold indexing on large/external drives further if needed
- validate that fresh indexing, reindexing, video posters, and metadata all behave well at scale
Current next optimization pass:
- atomic thumbnail job claiming
- multiple thumbnail workers
- batch DB writes in thumbnail worker
- switch image thumbnails from WebP to JPEG if benchmarking confirms it helps
Phase 4: Embeddings And Similarity Search
Status: not started
Goals:
- CLIP embedding worker
sqlite-vecwrites- image-to-image similarity search
- later text-to-image search
Foundation already in place:
sqlite-vectable scaffold exists- embedding status columns exist
- embedding jobs table exists
Implementation plan:
- add CLIP runtime/inference path
- process embedding jobs in background
- write embeddings to
sqlite-vec - add
find_similar_images(image_id, limit)command - expose similar-image action in gallery/lightbox UI
Phase 5: Discovery And Library Features
Status: later
Planned areas:
- tags
- albums / collections
- richer metadata filters
- better search UX
- similarity-driven browsing workflows
Immediate Priorities
Work these in order:
- finish indexing/thumbnail throughput optimization
- validate media processing behavior on large folders and external drives
- move into embeddings
Notes
Current backend direction is fixed as:
- SQLite for source-of-truth metadata and job state
sqlite-vecfor vector search- sidecar-managed FFmpeg/FFprobe for video poster/metadata processing
Current architectural principle:
- scan fast first
- queue expensive downstream work
- process heavy work after active indexing when possible