RFD 1076: usd_viewer_app, its own app, reached through a port

lib/weftspun_studio/adapters/http_gallery.ex, lib/weftspun_studio/router.ex, deploy/quadlet/, Dockerfile, Dockerfile.fly

Problem

priv/static/gallery/, what router.ex served at /gallery, was a hand-copied snapshot of usd_viewer_app/, kept in sync by no script. No Dockerfile ran npm, and the copy carried a real, unrecorded fix to the usd-viewer npm package. usd_viewer_app itself had no deploy of its own.

Decision

usd_viewer_app becomes its own deployed app, the separation character_taxonomy/ already has: its own Dockerfile, fly.toml, and Quadlet pair, served by server.js, a small static server.

weftspun_studio stops holding the gallery’s bytes on disk. RFD 1022/0023’s ports-and-adapters split gives the shape: WeftspunStudio.Ports.GallerySource (one fetch/2), and WeftspunStudio.Adapters.HttpGallery, a plain reverse-proxy adapter, the shape Adapters.ReplicateJobs already has. router.ex’s gallery routes forward through the port at an unchanged path; GALLERY_URL (env) names the deployed app.

The usd-viewer fix stays as a patch-package patch, applied by npm ci’s own postinstall. See DETAILS.md for the fix, a Vite base-path bug Playwright caught live, and what verified end to end.

Details

The measurements and the retractions