A roll of a hundred thousand frames is read by a walk that tells the screen about every frame it lands. The column is redrawn out of that count, so the telling was a whole tree rebuilt a frame at a time — on the large library that is the reading spending its afternoon drawing itself, and to the reader it looks like a scan that has started over from the top every time the column breathes. Five tellings a second is a counter that still moves to the eye and a page that is doing the reading instead; every frame still lands in the counts, and only the copy the screen reads waits. What the counter said was wrong twice over, and both were the same mistake told two ways. The total was the frames already reached plus the frames still in the queue, so a roll whose catalogue already holds most of it announced itself as `29980/61211` — the numbers of the reading underneath, printed as if they were the numbers of the roll. The reading now measures itself against the frames the catalogue already holds of the folder it was pointed at: the roll's own size while the walk is still up in its first folders, and the frames under a subfolder alone when it was kept to one. And a row says at least what the catalogue holds of it, never less — where the reading's number alone had the head of the tree count 29980 while the line above it counted a hundred thousand, one question with two answers. Nor is a scan of nothing announced as `0/0` before its first pass has come back; the line waits until it knows what it is reading. The third thing is not a number but a weight. The tile kept for a frame is the tile the grid cell and the strip both paint, and there is one of them per frame of a roll that reaches six figures. At 512 on the long edge a tile weighed 42KB and a hundred and sixty thousand of them weighed six and a half gigabytes of the reader's disk — for a grid cell that is ~240px wide and a strip tile that is 132. A quarter of the pixels at the quality Lightroom keeps its own grid previews at puts the same picture in the same cell: the tile is now ~12KB and the roll a quarter of the disk it was. The canvas a tile is drawn onto is told it is opaque, so it no longer carries a channel of noughts through every draw and every encode. The stage loses a little softness at 2.4x, which is the trade and is known.
RecipesCam web — self-contained stack
A Docker-hosted web build of RecipesCam. Everything it needs is in this folder: move it to another machine, run two commands, and the app is up. It does not need the React Native project around it.
cp .env.example .env
docker compose up -d --build
# → http://localhost:8090
What runs where
| Service | Image | Role |
|---|---|---|
frontend |
nginx:1.27-alpine (built by frontend/Dockerfile) |
Static SPA + /api/ reverse proxy |
api |
node:22-slim (built by backend/Dockerfile) |
Accounts + saved recipes, SQLite on ./data |
frontend resolves api through Docker's embedded DNS and proxies /api/* to
it — that is why the API container is named api and why it is not published on
the host. Only ${WEB_PORT:-8090} is exposed.
Photos never leave the browser. The CanvasKit render pipeline (grade, frame, watermarks, JPEG encode) runs in the visitor's tab; the API only stores recipes as JSON.
Layout
docker-compose.yml the stack
.env.example WEB_PORT
data/ SQLite (created on first run, gitignored)
backend/ Fastify + better-sqlite3 API, own Dockerfile
frontend/ Vite + React + CanvasKit SPA, own Dockerfile + nginx.conf
shared/ vendored copies of the app's types + utils (see below)
src/engine/ skiaShim.ts (CanvasKit) + exportEngine.ts (render pipeline)
+ session.ts (localStorage/IndexedDB studio persistence)
Vendored files
frontend/shared/{types/index.ts,utils/*.ts} are byte-identical copies of
src/types/index.ts and ten src/utils/*.ts files from the React Native
project (@shopify/react-native-skia is aliased to src/engine/skiaShim.ts in
vite.config.ts + tsconfig.json, so those files compile unchanged):
cinemaShader colorUtils defaultRecipes exifWrite frameUtils jpegDpi
paramDefs recipeShare skiaImage toneShader.
The landing page needs no CDN: frontend/public/assets/fonts/*.woff2 are the
seven self-hosted faces behind the three font groups the Themes menu offers
(Plus Jakarta Sans / Inter / JetBrains Mono, Fraunces / Be Vietnam Pro /
Courier Prime, Be Vietnam Pro / Space Mono — all SIL OFL, pulled from Google
Fonts, vietnamese + latin + latin-ext subsets), and
frontend/public/assets/samples/s*.jpg are the six placeholder negatives the
film strip, preset tester and QR card show (swap them for real graded stills
whenever we have them). Its one foreign request is the QR image from
api.qrserver.com, which degrades to an empty slot offline.
When the app changes one of them, copy it back in — the renderer is only "parity" for as long as these stay in sync:
cd <repo>/docker/frontend/shared/utils
cp <repo>/src/utils/<name>.ts .
Operations
docker compose logs -f api # API log
docker compose restart api # after backend/src changes (rebuild: --build)
docker compose down # stop; ./data survives
Backup is the ./data folder — that is the whole database.
Checks
curl -s http://localhost:8090/api/health # {"ok":true}
curl -sI http://localhost:8090/ # 200, index.html
Then open the UI, drop a photo in, and confirm the preview shows the picture and
EXPORT downloads a JPEG that opens. The preview going solid black while the
export still reports a plausible size is the one failure mode worth knowing: it
means the CanvasKit GPU surfaces lost their shared GrDirectContext (see
frontend/src/engine/skiaShim.ts), and with no GPU the raster fallback renders
the same pipeline correctly, just slower.