feat: flatten output into variants/ and intermediates/

Drop per-job subdirs for phone-friendly Syncthing layout with
stem-suffixed filenames; keep web state in meta/.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-18 14:52:47 +02:00
parent 9a9a3e3afe
commit b925b151f0
11 changed files with 289 additions and 220 deletions
+16 -11
View File
@@ -23,17 +23,22 @@ Syncthing runs on the host — not in this compose.
Prod path: `/home/frank/sync.schwenk.online/data/livef12`
```
incoming/ # phone drop — worker only ever reads/copies from here
jobs/<job_id>/
original.<ext> # private copy of the uploaded photo
rembg.png # background removed (computed once, reused)
intermediates/ # every intermediate step, kept for inspection
variants/ # final composed images ({stem}_v1.png, …)
manifest.json # filter names/commands/blends per variant
status.json # pending | processing | done | error
processed.json # worker bookkeeping: which incoming files were handled
incoming/ # phone drop — worker only ever reads/copies from here
variants/
{stem}_original.jpg # preprocessed private copy
{stem}_rembg.png
{stem}_v1.png # final composed images
intermediates/
{stem}_v1_bg_filtered.png
{stem}_v1_post_0.png # …
meta/
{stem}.json # status + manifest for the web UI
processed.json # worker bookkeeping: which incoming files were handled
```
Phone tip: `.stignore` can drop `meta/` and `processed.json` if you only
want images on the device.
`assets/` (filter lists + trimmed `filters.json`) lives in the repo and is
bind-mounted read-only into `worker`/`web` at `/data/assets`.
@@ -47,8 +52,8 @@ docker compose up -d --build
```
Drop a photo into `incoming/` (via Syncthing or locally). After a few
seconds (poll interval + processing time) it shows up on the web UI as a
new job; the full `jobs/<id>/` tree syncs back to the phone.
seconds (poll interval + processing time) it shows up on the web UI; flat
files land in `variants/` and `intermediates/` for the phone.
## Configuration (`.env`, see `.env.example`)