Records package viewer: read-only, no account needed

SAM_VIEWER=true (set only by the records package's
viewer/docker-compose.yml) makes the app a read-only copy of an archive,
for whoever receives the records: `docker compose up`, then open
http://localhost:3000.

- At start (bin/docker-entrypoint → sam:viewer:prepare) the package's
  .sam.zip, mounted read-only, is imported once.
- No sign-in: everyone browses as a built-in account. Nothing can be
  changed: any request but GET/HEAD is refused, no role permission
  applies (so no edit buttons), and there's no sign-out or profile. A
  banner names the archive and when it was exported.
- It refuses to start, and every page answers 503, when the database
  has any other account, so turning it on for a real installation stops
  the app instead of exposing its records.
- The viewer listens on 127.0.0.1 only, and skips scheduled jobs
  (reminders, backups, AD searches).
- Docs: the package README (three steps now), Access & sharing, README
  settings and features, the suggested recordkeeping procedures.

Checked end to end with a built image and a real records package: the
archive imported at start, pages browsed without an account, a change
refused, and the container refusing to start once an account existed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-15 20:03:56 -05:00
1 parent 34e3232350
commit d956cfbe83
14 files changed
+229 -33

No files matched your search

+3 -1
View File
@@ -23,7 +23,9 @@ Give it a label and optionally an expiry. Documents only appear if their visibil
## Records package
**Download records package** builds a zip for the FAA, a buyer or a new maintainer: every logbook entry as a PDF with its signatures, a signature register, the change history, the status report, the current recordkeeping procedures, and the data archive. Its README explains each file, links to the source code, and includes a ready-to-run `viewer/docker-compose.yml`: with Docker Desktop, the recipient can run the app on their own computer and import the archive to browse everything.
**Download records package** builds a zip for the FAA, a buyer or a new maintainer: every logbook entry as a PDF with its signatures, a signature register, the change history, the status report, the current recordkeeping procedures, and the data archive. Its README explains each file, links to the source code, and includes a ready-to-run `viewer/docker-compose.yml`. With Docker Desktop, the recipient runs `docker compose up` in that folder and opens http://localhost:3000 to browse everything the way you see it: the archive is imported by itself, and no account is needed.
That copy is a **read-only viewer**: nothing in it can be changed, it can only be reached from their own computer, and it isn't connected to your system. It runs the release of the app that made the package, and shows a banner naming the archive and when it was exported. Electronic signatures appear as imported, to compare with the PDF and signature register.
## Backup and transfer