Architecture of storytold/photocraft
storytold/photocraft is 1,600 source files holding 44,916 symbols across 7 modules, written mainly in Rust, Shell, Python. The largest module is crates, with 1,326 files, and 34 files are entry points into the dependency graph.
How photocraft fits together
The desktop app starts from apps/photocraft/src/main.rs, which connects the UI, OS integration and a local control interface. The command-line tool starts from apps/photocraft-cli/src/main.rs and drives the same engine without a window. Input documents and assets are read into a pure-data document model, and crates/affinity converts Affinity-format data into internal representations for rendering and previews. Edits run through a shared command pipeline, where crates/algo holds the image and selection operations and exposes its public entry in crates/algo/src/lib.rs. Pixel data is split into tiles, with crates/geom defining the tile size and related types and crates/raster defining the surface abstraction.
Largest modules
- crates: 1,326 files and 477,942 lines of code
- apps: 45 files and 11,939 lines of code
- packaging: 14 files and 1,003 lines of code
- xtask: 12 files and 4,284 lines of code
- examples: 2 files and 64 lines of code
- scripts: 2 files and 103 lines of code
- root: 1 file and 65 lines of code
Languages
By file count: Rust 1,384 files, Shell 15 files, Python 2 files, Dockerfile 1 file.
Documentation
Repowise documents photocraft in 2,256 pages generated from the source, 56 of them written explanations of the repository and its modules. Module guides include:
- crates/affinity: Affinity Overview
- crates/affinity/fuzz/fuzz_targets: Affinity Preview Target
- crates/affinity/src: Affinity and Geometry Types
More on photocraft: summary and FAQ, codebase overview, code health.