How mdhvg/miscible works
Miscible is an offline local-media gallery with semantic search and filtering. Users add a directory, which the app scans and indexes; the UI then queries and displays images, while semantic search uses downloaded model files and inference embeddings. The graph separates startup, media indexing/storage, inference, and presentation/platform services. Some subsystem links are documented in the README or supported by the source index; unsampled implementation details are not assumed.
Main entry points: miscible.cpp App orchestration · view.cpp Gallery query views · scan_dirs.cpp Directory scanning · ui_core.cpp UI coordination
Components 22
Application lifecycle
- Application startup
src/main.cpp - App orchestration
src/app/miscible.cpp - Settings and models
src/config.cpp - YAML settings
src/yaml.cpp
Media indexing and storage
- Directory scanning
src/scan/scan_dirs.cpp - Thumbnail atlas
src/scan/scan_atlas.cpp - Image metadata fetch
src/db/fetch.cpp - Gallery query views
src/db/view.cpp - SQLite database
src/db/db_helpers.cpp
Semantic search
- Model management
src/inference/model.cpp - CLIP embeddings
src/inference/clip.cpp - Inference engine
src/inference/inference.cpp - Model downloads
src/network/download.cpp
Gallery interface
- Gallery and filters
src/ui/pages/menu/menu.cpp - Image preview
src/ui/pages/preview/preview.cpp - UI coordination
src/ui/ui_core.cpp - Window and rendering
src/window/window.cpp
Platform services
- OS directory scanner
src/os/win32/win32_scan_dirs.cpp - OS services
src/os/os_inc.cpp - Logging
src/base/log.cpp
Other components
- Gallery user
- Model host
Connections 40
- Gallery user → Gallery and filters: searches and filters
- Gallery user → Directory scanning: adds directory
- Application startup → App orchestration: starts
src/main.cpp - App orchestration → Settings and models: initializes
src/app/miscible.cpp - App orchestration → Directory scanning: starts
src/app/miscible.cpp - App orchestration → Thumbnail atlas: starts
src/app/miscible.cpp - App orchestration → Inference engine: initializes
src/app/miscible.cpp - App orchestration → Model management: initializes
src/app/miscible.cpp - App orchestration → Window and rendering: starts
src/app/miscible.cpp - App orchestration → UI coordination: initializes
src/app/miscible.cpp - App orchestration → Image metadata fetch: starts
src/app/miscible.cpp - App orchestration → Gallery query views: initializes
src/app/miscible.cpp - App orchestration → YAML settings: uses
src/app/miscible.cpp - App orchestration → Model downloads: starts
src/app/miscible.cpp - App orchestration → Logging: initializes
src/app/miscible.cpp - Directory scanning → OS directory scanner: dispatches
src/scan/scan_dirs.cpp - Directory scanning → Gallery query views: updates
src/scan/scan_dirs.cpp - Directory scanning → Image metadata fetch: uses
src/scan/scan_dirs.cpp - Directory scanning → Model management: uses
src/scan/scan_dirs.cpp - Thumbnail atlas → Image metadata fetch: reads
src/scan/scan_atlas.cpp - Image metadata fetch → SQLite database: queries
src/db/fetch.cpp - Gallery query views → SQLite database: queries
src/db/view.cpp - Gallery query views → Image metadata fetch: uses
src/db/view.cpp - Gallery query views → Inference engine: uses
src/db/view.cpp - Gallery query views → Model management: uses
src/db/view.cpp - Gallery and filters → Gallery query views: queries
src/ui/pages/menu/menu.cpp - Gallery and filters → Directory scanning: uses
src/ui/pages/menu/menu.cpp - Gallery and filters → Inference engine: uses
src/ui/pages/menu/menu.cpp - Image preview → Image metadata fetch: loads metadata
src/ui/pages/preview/preview.cpp - UI coordination → Gallery query views: uses
src/ui/ui_core.cpp - UI coordination → Window and rendering: uses
src/ui/ui_core.cpp - UI coordination → Gallery and filters: dispatches
src/ui/ui_core.cpp - UI coordination → OS services: uses
src/ui/ui_core.cpp - Window and rendering → UI coordination: renders
src/window/window.cpp - Model management → Settings and models: reads settings
- Model management → CLIP embeddings: uses
- Inference engine → Model management: uses
src/inference/inference.cpp - Inference engine → CLIP embeddings: uses
src/inference/inference.cpp - Model downloads → Model host: downloads model
- OS services → OS directory scanner: provides OS services