Architecture

AutoShade — the architecture, drawn from its own source

This picture is generated, not drawn: scripts/architecture_diagram.py reads docs/architecture/autoshade.architecture.json, the checked-in model of the program's own parts, and emits the SVG spliced into this page. The shared canvas in scripts/diagram_check.py records the box of every label and every connector as it draws and refuses to write the file when two of them overlap, so this layout is a measurement rather than a judgement.

AutoShade architecture: three front ends over one Rust library holding RAW decode, the AI advisor, the recipe, the render engine, the style index, reverse-fit, the local producers and the local-field analyzer; five local Python sidecars below it; two opt-in external AI services above itAutoShade — the architecture, drawn from its own source20 components (2 external, 3 frontend, 12 backend, 3 database) · 19 connections · 3 boundaries, all read from docs/architecture/autoshade.architecture.jsonResponses APIOpenAI-compatible visionclaude CLIsubprocess · OAuth · data onlyno API keyDesktop GUIautoshade-gui · eframe 0.29CLIautoshade · clap 4.6Local web UIserve · tiny_http · loopbackper-run tokenRAW decodedecode.rs · rawler 0.7.224 formats · 725 bodiesAI advisorpropose · verify · judgeEditReciperecipe.rs · bounded JSONrationale + confidenceRender enginerender.rs · measured LR paritybyte-identicalStyle index14-d + 12 settings + SigLIP 2k = 4 retrievalDevelop storestore.rs · versions + variantsXMP sidecarxmp.rs · hand-rolled crs: mergebyte-preservingReverse-fitCDF inverse rendering · D gateFull / AtmosphereLocal producerszones · bands · quadtree tilesfree-form masks: designedLocal-field analyzer12x8x8 bilateral grid · CGceiling, read-onlyEmbedding sidecarembed.py · SigLIP 2 base/16768-d, pinnedCorrespondence sidecarcorrespond.py · DIFT on SD 2.148x48 fieldSegmentation sidecarBiRefNet · OneFormer · SAM 2.1guided refineDescription sidecardescribe.py · Qwen3-VL-2Bone grade sentenceDenoise sidecardenoise.py · SCUNet × 5opt-in, before toneExternal AI services — opt-in, only on user requestOne process, one binary — the AI returns a recipe, not pixelsLocal sidecars — subprocess, weights pinned to the byte, never in the repopreview·EXIF·histogramHTTPS · strict json_schemabounded slider setverify (data, never pixels)accepted recipe.xmp + rendered imagesaved per photo path4 nearest edits as soft reference768-d image embeddingglobal fit · modeceiling · cap · band proposalsrecovered recipe + maskswhere content movedsky/land · subject · objectone sentence per photodenoised pixelsEvery box is a directory or a module in this repository; every arrow is a call that exists. Generated by scripts/architecture_diagram.py — no position in this picture was chosen by hand.