How storytold/photocraft works
PhotoCraft is a native Rust image editor, with CLI, web, and automation interfaces. Its main workflow is user interaction through the editor (or an automation client), command execution against an editing session, and document rendering or file output. The README documents broad editing features and shared command-driven access; the source index confirms key UI, session, automation, and platform-service modules. Some domain links below are documented rather than verified in sampled implementation, so those are marked dashed or omitted.
Main entry points: cmd Editor commands · app.rs Editor UI · main.rs Desktop application · services.rs Native services
Components 22
Product interfaces
- Desktop application
apps/photocraft/src/main.rs - Editor UI
crates/ui-egui/src/app.rs - Web application
apps/photocraft-web/src/web.rs - Web preset bridge
apps/photocraft-web/src/preset_bridge.rs - Indexed presets
apps/photocraft-web/src/indexed_presets.rs - CLI
apps/photocraft-cli/src/main.rs - MCP server
crates/automation/src/server.rs - UI state
crates/ui-egui/src/state.rs
Editing and documents
- Editing session
crates/engine/src/session.rs - Editor commands
crates/engine/src/cmd - Image editing
crates/algo/src - Layer composition
crates/compose/src
Image and file handling
- PSD and documents
crates/format/src/store.rs - Image codecs
crates/codecs/src - Color management
crates/cms/src/pipeline.rs - External SVG
apps/photocraft/src/external_svg.rs
Platform services
- Native services
apps/photocraft/src/services.rs - App directories
apps/photocraft/src/app_dirs.rs - File dialog probe
apps/photocraft/src/file_dialog_probe.rs - Linux libraries
apps/photocraft/src/linux_libs.rs
Other components
- Editor user
- Automation client
Connections 21
- Editor user → Editor UI: edits in
README.md - Desktop application → Editor UI: starts
apps/photocraft/src/main.rs - Editor UI → Editor commands: issues commands
README.md - CLI → Editor commands: drives commands
README.md - Automation client → MCP server: requests tools
README.md - MCP server → Editor commands: runs commands
crates/automation/src/server.rs - Editor UI → UI state: uses state
crates/ui-egui/src/app.rs - Editing session → Editor commands: dispatches
crates/engine/src/session.rs - Editor commands → Image editing: applies edits
- Editor commands → Layer composition: renders layers
- Editing session → PSD and documents: edits documents
README.md - PSD and documents → Image codecs: reads and writes images
- Layer composition → Color management: uses profiles
- Web application → Web preset bridge: uses bridge
apps/photocraft-web/src/main.rs - Web application → Indexed presets: loads presets
apps/photocraft-web/src/main.rs - Indexed presets → Web preset bridge: references bridge
apps/photocraft-web/src/indexed_presets.rs - Desktop application → Native services: configures services
apps/photocraft/src/main.rs - Native services → App directories: uses directories
apps/photocraft/src/services.rs - Native services → File dialog probe: probes dialogs
apps/photocraft/src/services.rs - File dialog probe → Linux libraries: checks libraries
apps/photocraft/src/file_dialog_probe.rs - Desktop application → External SVG: registers support
apps/photocraft/src/main.rs