Web and PWA
The web host runs the shared Angular renderer directly. Its production build is also the renderer copied into every packaged host.
Develop in a browser
Section titled “Develop in a browser”pnpm startOpen the printed address, normally http://localhost:4200. Development serving does not enable the production service worker and does not prove the built PWA fallback.
Build the delivery artifact
Section titled “Build the delivery artifact”pnpm buildpnpm nx run trinity-e2e-web:production-pwaThe trinity production target writes a flat bundle to root www/; index.html sits directly in that directory. The production-PWA journey checks the built host, navigation fallback, assets, and service worker without Docker.
Releases ship this bundle as Trinity-Web-<version>.zip and as the ghcr.io/quwisky/trinity-web image built from it; see Self-host a release.
Keep browser boundaries explicit
Section titled “Keep browser boundaries explicit”Use Web Host adapters for browser implementations and expected unavailable operations. Origin storage is script-readable and must not be described as an OS-secure credential store. Browser responsive emulation proves web behavior only; it does not exercise Capacitor plugins, installed WebViews, or native lifecycle.
Run focused unit and browser journeys for product behavior, then add build, typecheck, lint, stylelint, and architecture checks as the change requires. Read component and browser tests for evidence selection.
Self-host a release
Section titled “Self-host a release”Every Trinity release ships the web app in two forms. Both contain the same files.
Container image
Section titled “Container image”docker run -d -p 8080:8080 ghcr.io/quwisky/trinity-web:nextUse :next until the first stable release is published; from then on latest follows stable releases.
Open http://localhost:8080. The image runs as a non-root user, listens on port 8080 and
answers /health for health checks. It supports linux/amd64 and linux/arm64.
| Tag | Follows |
|---|---|
latest | the newest stable release |
X.Y | the newest stable X.Y.* release |
X.Y.Z | exactly that release |
next | the newest prerelease |
Pin X.Y.Z in production and update deliberately.
Release zip
Section titled “Release zip”Download Trinity-Web-X.Y.Z.zip from the
releases page and serve
trinity-web/www/ from any static web server. The server must:
- answer unknown app routes (
/login,/rooms/…,/settings/…,/encryption/…) withindex.html, but return 404 for missing files with an extension; - send
Cache-Control: no-cacheforindex.html,ngsw.json,ngsw-worker.jsandmanifest.webmanifest, and may cache hashed*.js/*.cssfiles for a year; - serve
.wasmasapplication/wasm.
The container’s sws.toml
is a complete reference configuration.
Serve Trinity over HTTPS (or localhost). Browsers only install the app and run its service
worker on secure origins. Third-party notices are in 3rdpartylicenses.txt.