How eddyxorb/fotobuch works
fotobuch turns photo collections into print-ready photobooks through either a GUI or CLI, sharing a Rust project engine. The main workflow imports and organizes photos, assigns and optimizes page layouts, then renders a PDF; users can refine pages, configure projects, and undo changes. The README documents the product capabilities and shared workflow; sampled source and the SOURCE INDEX support selected internal relationships. Some GUI and command internals were not sampled, so those connections are shown only where documented.
Main entry points: commands.rs Project Commands · app.rs Desktop App · scan.rs Photo Import · cli.rs Command Line
Components 20
User Interfaces
- Command Line
cli/cli.rs - Desktop App
gui/app.rs - Page Editing
gui/app/input_handler/drag.rs
Project Management
- Project Models
src/models.rs - Project State
src/state_manager.rs - Git History
src/git.rs - Project Commands
src/commands.rs - Project Configuration
src/models/config.rs
Layout Engine
- Book Layout Solver
src/solver/book_layout_solver/local_search.rs - Page Assignment
src/solver/algorithms/bellman_dp.rs - Page Layout Solver
src/solver/page_layout_solver.rs - Genetic Search
src/solver/algorithms/genetic_algorithm/engine.rs
Media Pipeline
- Photo Import
src/input/scan.rs - Photo Metadata
src/input/exif.rs - Preview Cache
src/cache/preview_cache.rs - Release Cache
src/cache/final_cache.rs
Rendering
- Typst Document
src/output/typst.rs - Print PDF
src/output/render.rs
Other components
- Photographer
- Print Service
Connections 24
- Photographer → Desktop App: uses app
- Photographer → Command Line: runs commands
- Desktop App → Photo Import: imports photos
- Command Line → Photo Import: adds photos
- Photo Import → Photo Metadata: reads metadata
src/input/scan.rs - Photo Import → Project Models: creates photo groups
src/input/scan.rs - Desktop App → Project Commands: dispatches actions
- Command Line → Project Commands: dispatches commands
cli/cli.rs - Project Commands → Project State: updates project
src/commands.rs - Project State → Project Models: loads and saves
src/state_manager.rs - Project State → Git History: tracks commits
src/state_manager.rs - Photographer → Project Configuration: sets preferences
- Project Commands → Book Layout Solver: rebuilds layout
- Book Layout Solver → Page Assignment: assigns pages
- Book Layout Solver → Page Layout Solver: optimizes pages
src/solver/book_layout_solver/local_search.rs - Page Layout Solver → Genetic Search: evolves layouts
- Desktop App → Page Editing: handles gestures
- Page Editing → Project Commands: saves refinements
- Project Commands → Preview Cache: builds preview
- Project Commands → Release Cache: builds release cache
- Preview Cache → Photo Metadata: uses metadata
src/cache/preview_cache.rs - Project Commands → Typst Document: generates document
- Typst Document → Print PDF: compiles PDF
src/output/typst.rs - Print PDF → Print Service: provides print file