# The Booth A dead-simple standing web server for shuttling **ephemeral files** between the operator and CC sessions — A/B renders, smoke-test screenshots, audio/video samples, or anything you want to hand off. It works both directions: - **Session → operator:** a session drops a folder of files on disk; the Booth renders it as a browsable "booth". - **Operator/anyone → pickup:** upload files through the browser (or `curl -F`) and get a **human-readable pickup id** like `4-wombat` or `star-84`. Either way it **wipes 24h after the last activity**. No database — the filesystem *is* the state. - **Live:** http://10.100.10.50:8090/ (nh3-dev) · linked from Homepage → *Apps → The Booth* - **Data dir:** `~/booth-data/` on nh3-dev (one subfolder per booth) - **TTL:** 24h, measured from the newest mtime in a booth's tree (it lives while you're touching it, self-destructs 24h after you stop) ## How a session posts A booth is **just a folder** under the data dir. Three ways, cheapest first: ```bash # 1. On nh3-dev — the helper (services/booth/scripts/booth): booth add my-run out/a.png out/b.png # creates booth + copies, prints URL booth new my-run # empty booth, then cp/mv into ~/booth-data/my-run/ booth url my-run # just print the URL booth ls # list booths booth rm my-run # wipe now (TTL would anyway) # 2. On nh3-dev — raw, no helper: mkdir -p ~/booth-data/my-run && cp out/*.png ~/booth-data/my-run/ # -> http://10.100.10.50:8090/b/my-run/ # 3. From another host — rsync into the data dir: rsync -a ./out/ nh3-dev:booth-data/my-run/ ``` Then hand the operator `http://10.100.10.50:8090/b/my-run/`. ## Upload for pickup The reverse direction — put files in through the web, pick them up by id: - **Browser:** the index page has an *Upload files for pickup* panel (drag-drop or click). Submit → you land on a booth with a **human-readable id** (`4-wombat`, `star-84`) whose files each have a ⬇ download link. - **curl (a remote session with no ssh to nh3-dev can use this too):** ```bash curl -sS -i -F 'files=@out/a.png' -F 'files=@out/b.png' \ http://10.100.10.50:8090/upload | grep -i location # Location: /b/star-84/ <- the pickup id ``` - **Pick up** at `http://10.100.10.50:8090/b//` (download links), or on nh3-dev straight off disk at `~/booth-data//`. Uploads are stamped as pickup booths (a `⬆ pickup` badge in the UI) and expire on the same 24h TTL. Limits: `BOOTH_MAX_FILES` files (default 50) and `BOOTH_MAX_UPLOAD_MB` total per submission (default 1024); filenames are reduced to a safe basename (no path traversal). ## What a booth renders - **Has its own `index.html`?** → served **verbatim** (its relative assets — `chart.png`, `report.css` — resolve out of the same folder). Build whatever page you want. - **No `index.html`?** → **auto-gallery** of the folder's media: - images (`png jpg jpeg gif webp avif svg bmp`) → `` (click → full-screen viewer with **Fit** / **1:1** — the toggle only appears when the image is larger than the viewport — plus download and ✕/Esc back to the gallery) - video (`webm mp4 ogv m4v mov`) → `