Architecture
Foldr follows a simple pipeline.
Files
↓
Scanner
↓
Categorizer
↓
Planner
↓
Preview
↓
Executor
↓
History
Scanner
Discovers candidate files.
Responsibilities:
- file discovery
- recursive traversal
- ignore handling
Categorizer
Maps file extensions to categories.
Example:
.pdf → Documents
.jpg → Images
.mp4 → Videos
Planner
Creates an operation plan.
A plan contains:
Source
Destination
Category
No files are moved during planning.
Executor
Performs file operations.
Responsibilities:
- create destination folders
- move files
- resolve conflicts
History
Records successful operations.
Used by:
foldr history
foldr undo
Watch Mode
Watch mode extends the same pipeline.
Watch mode should never bypass the normal organization flow.