Architecture overview
PhotoCraft separates the document engine from presentation and transport. The desktop UI, CLI, JSON control channel, and MCP server reach editing behavior through the command registry rather than maintaining separate implementations.
desktop UI CLI JSON control MCP
| | | |
+-------------+--------------+--------------+
|
command registry
|
engine Session
|
document model + operations + compositors
|
PSD / raster / .pcraft I/O
The enforced dependency direction runs from format-independent foundation crates through the document and operation layers to composition, I/O, the engine, and finally UI/automation. cargo xtask layers checks this rule.
The complete design narrative and dependency diagram remain in docs/architecture.md. That document contains historical design material as well as implemented architecture; confirm behavior in current source when security or compatibility depends on it.
Core properties
photocraft-docholds the pure-data document model.photocraft-engine::Sessionowns open documents, active state, history, and command dispatch.photocraft-composeis the CPU reference compositor;photocraft-gpuaccelerates supported interactive paths.photocraft-iomaps between documents and PSD or flat formats.photocraft-formatreads and writes the native.pcraftbundle.photocraft-ui-eguiis a thin shell over engine commands.photocraft-automationexposes the headless engine and the live-GUI bridge.
See Crates and dependency layers for the complete workspace map.