feat(editor): bridge the advanced photo editor into the event workflow
CI / build (push) Has been cancelled

Event photos can now be opened in Lumenroom, a WebGL2 develop module, from the
photo editor's Advanced button. The dashboard signs a short-lived token scoped
to one user and event; Lumenroom exchanges it, imports the event's photo list
and proxies bytes on demand, so nothing is copied and the temporary catalog
expires with the bridge session. Saving in Lumenroom renders the photo and
writes it back as the event's edited JPEG, with the advanced recipe kept in
event_photos.advanced_edit_json.

Lumenroom is vendored under lumenroom/ and built as a second compose service,
so one clone and `docker compose up -d --build` deploys both apps.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-21 01:34:20 +00:00
parent 982f9048e1
commit 0cb315ea88
89 changed files with 22087 additions and 1 deletions
+51
View File
@@ -0,0 +1,51 @@
import os from 'node:os';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const here = path.dirname(fileURLToPath(import.meta.url));
export const ROOT = path.resolve(here, '..');
export const DATA_DIR = process.env.LUMENROOM_DATA
? path.resolve(process.env.LUMENROOM_DATA)
: path.join(here, 'data');
export const ORIGINAL_DIR = path.join(DATA_DIR, 'originals');
export const PREVIEW_DIR = path.join(DATA_DIR, 'previews');
export const THUMB_DIR = path.join(DATA_DIR, 'thumbs');
export const DB_PATH = path.join(DATA_DIR, 'lumenroom.db');
export const DIST_DIR = path.join(ROOT, 'dist');
export const PORT = Number(process.env.PORT || 8787);
export const HOST = process.env.HOST || '0.0.0.0';
/** Shared invite code required to register after the first account exists. */
export const INVITE = process.env.LUMENROOM_INVITE || '';
/** Base URL of the dashboard this editor is bridged to, e.g. http://hub:3000. */
export const GLENLOCH_URL = (process.env.GLENLOCH_URL || '').replace(/\/+$/, '');
/** Shared HMAC secret for bridge tokens; must match the dashboard's value. */
export const BRIDGE_SECRET = process.env.BRIDGE_SECRET || '';
/** How long an imported bridge event survives without being reopened. */
export const BRIDGE_TTL_HOURS = Number(process.env.LUMENROOM_BRIDGE_TTL_HOURS || 12);
/** Upload ceiling in bytes (300 MB default, bigger than any consumer raw). */
export const MAX_UPLOAD = Number(process.env.LUMENROOM_MAX_UPLOAD || 300 * 1024 * 1024);
/** Long edge used for the editable proxy of raw files. */
export const RAW_PREVIEW_EDGE = Number(process.env.LUMENROOM_RAW_EDGE || 6000);
export const SESSION_DAYS = 30;
/** How many raws decode at once. One core is left for the HTTP server. */
export const RAW_WORKERS = Math.max(
1,
Number(
process.env.LUMENROOM_RAW_WORKERS ||
Math.min(4, Math.max(1, (os.availableParallelism?.() ?? os.cpus().length) - 1)),
),
);
/** Idle decoder workers are disposed after this long to release memory. */
export const RAW_IDLE_MS = Number(process.env.LUMENROOM_RAW_IDLE_MS || 90_000);