How rawnakhasan/wallpaper-sorter works
Wallpaper Sorter is a local wallpaper-library organizer: it watches the library and configured intake folders, waits for files to settle, plans sorting decisions, applies filesystem changes, and records them for browsing and undo through a localhost web UI. The graph preserves the documented inbox, library, duplicate, re-sort, tag/settings, activity, origin-data, and thumbnail capabilities. Pipeline-to-engine calls are supported by the pipeline excerpt and SOURCE INDEX; several UI and daemon subsystem links are documented in the README, while unsampled implementation details are not inferred.
Main entry points: AppShell.tsx Web UI · pipeline.rs Sort pipeline · plan.rs Action planner · daemon.rs Daemon loop
Components 26
Intake and planning
- Folder watcher
daemon/src/watcher.rs - File settling
daemon/src/debounce.rs - Tags and settings
core/src/config.rs - Filename matcher
core/src/matcher.rs - Numbering rules
core/src/numbering.rs - Action planner
core/src/plan.rs
Sorting runtime
- Daemon loop
daemon/src/daemon.rs - Sort pipeline
engine/src/pipeline.rs - Filesystem executor
engine/src/exec.rs
Library records
- Library scan
engine/src/scan.rs - Action log
engine/src/log.rs - Undo actions
engine/src/undo.rs - Hash index
engine/src/index.rs - Origin records
engine/src/origins.rs
Web interface
- Local API server
daemon/src/web.rs - Thumbnail cache
daemon/src/thumbs.rs - Web UI
ui/src/components/AppShell.tsx - API client
ui/src/lib/api-client.ts - Inbox actions
ui/src/features/inbox/hooks/useInboxActions.ts - Library actions
ui/src/features/library/hooks/useLibraryActions.ts - Re-sort preview
ui/src/features/resort/hooks/useResortPage.ts - Tags and settings
ui/src/features/settings/hooks/useSettingsPage.ts - Activity and undo
ui/src/features/activity/api.ts - Origin data
ui/src/features/data/hooks/useDataPage.ts - Duplicate review
ui/src/features/duplicates/hooks/useDuplicatesPage.ts
Other components
- Library user
Connections 29
- Library user → Folder watcher: adds files
README.md - Folder watcher → Daemon loop: reports changes
README.md - Daemon loop → File settling: settles arrivals
README.md - Daemon loop → Sort pipeline: processes files
engine/src/pipeline.rs - Sort pipeline → Library scan: reconciles library
engine/src/pipeline.rs - Sort pipeline → Action planner: builds plan
engine/src/pipeline.rs - Action planner → Filename matcher: classifies names
core/src/plan.rs - Action planner → Numbering rules: plans numbering
core/src/plan.rs - Action planner → Tags and settings: uses rules
core/src/plan.rs - Sort pipeline → Filesystem executor: applies plan
engine/src/pipeline.rs - Sort pipeline → Hash index: updates hashes
engine/src/pipeline.rs - Sort pipeline → Origin records: updates records
engine/src/pipeline.rs - Filesystem executor → Action log: appends actions
engine/src/exec.rs - Library user → Web UI: uses browser
README.md - Web UI → API client: requests data
- API client → Local API server: sends JSON
README.md - Local API server → Sort pipeline: runs operations
- Local API server → Thumbnail cache: serves thumbnails
daemon/src/web.rs - Web UI → Inbox actions: manages arrivals
README.md - Web UI → Library actions: manages images
README.md - Web UI → Re-sort preview: previews resort
README.md - Web UI → Tags and settings: edits configuration
README.md - Web UI → Activity and undo: views history
README.md - Web UI → Origin data: browses origins
README.md - Web UI → Duplicate review: reviews duplicates
README.md - Activity and undo → API client: requests undo
ui/src/features/activity/api.ts - Inbox actions → Activity and undo: undoes batch
ui/src/features/inbox/hooks/useInboxActions.ts - Library actions → Activity and undo: undoes batch
ui/src/features/library/hooks/useLibraryActions.ts - Library user → Daemon loop: starts sorter
README.md