push to maple-street
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Media Team Hub — Planning Docs
|
||||
# Media Team Hub
|
||||
|
||||
Architecture and build documentation for a church media team scheduling and training platform. No application code yet — these are the documents you review, approve, and hand to whoever builds it.
|
||||
Scheduling and training platform for a church media team.
|
||||
|
||||
> **Current state:** the app is built and running (Next.js 15 + Postgres, containerised). For the live code map, phase status, the security/correctness repair pass, remaining gaps and next steps, read **[docs/PROJECT-STATE.md](docs/PROJECT-STATE.md)**. The sections below are the original planning docs and describe intended behaviour; the stack notes are historical (the build targets a portable Node container, not Cloudflare Workers).
|
||||
|
||||
## Read in this order
|
||||
|
||||
@@ -11,6 +13,52 @@ Architecture and build documentation for a church media team scheduling and trai
|
||||
| **[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)** | How is it built — stack, data model, scheduling and reminder logic, security. | ~25 min |
|
||||
| **[docs/BUILD-PLAN.md](docs/BUILD-PLAN.md)** | The order to build it in: 56 units across 10 phases (plus 5 deferred media-library units), 7 checkpoints, and the rules that stop an AI agent looping. Give this to the agent. | ~15 min |
|
||||
|
||||
## Media library & video
|
||||
|
||||
**Media** is an ad-free library of the event photos and videos the signed-in
|
||||
person can access. Event photos remain private to assigned photographers and
|
||||
managers; the library does not publish them.
|
||||
|
||||
Videos are uploaded from an event page or the Media page:
|
||||
|
||||
- The untouched camera original is written to
|
||||
`<ARCHIVE_DIR>/<Archive folder>/videos/<event>/<video>/original.*` on the NFS
|
||||
mount.
|
||||
- FFmpeg probes the file and creates a web H.264/AAC MP4 plus a poster under the
|
||||
uploads volume. The original is never changed.
|
||||
- Processing runs after the upload response; the video page polls until the
|
||||
video is ready. A failed encode can be retried without re-uploading.
|
||||
- The editor supports title, description, visibility, and a non-destructive
|
||||
start/end trim. Saving a trim re-renders the web MP4 and poster.
|
||||
|
||||
Visibility is `Media team only` by default. Coordinators/admins can choose
|
||||
`Unlisted link` or `Public`. Those ready videos get a public `/watch/<id>` page
|
||||
with Open Graph video tags, a minimal `/embed/<id>` iframe, and an oEmbed endpoint
|
||||
at `/api/oembed?url=...`. Social platforms still require the deployment to have
|
||||
a public HTTPS origin (`PUBLIC_ORIGIN` or the request host).
|
||||
|
||||
## Backup & restore
|
||||
|
||||
Admins get **Admin → Backup & restore**. The download is one ZIP containing:
|
||||
|
||||
- `dump.sql` — a complete Postgres dump (schema, data, constraints, indexes, and migration ledger)
|
||||
- `uploads/` — training attachments, event photos, and video derivatives
|
||||
- `archive/` — the mounted NFS media archive, including original videos
|
||||
- `manifest.json` — timestamp, app version, SHA-256 checksum, and included areas
|
||||
|
||||
The manifest excludes `.env` and the console outbox. Store `NEXTAUTH_SECRET`
|
||||
with the backup: it decrypts runtime settings such as the Gmail app password.
|
||||
|
||||
To restore after a redeploy, bring up the new stack, run migrations/seed, sign in
|
||||
as the bootstrap admin (`admin@glenloch.local` when using the seed), open
|
||||
**Admin → Backup & restore**, upload the ZIP, type `RESTORE`, and confirm. If the
|
||||
new deployment has no mail provider, keep `MAGIC_LINK_DEV_TRANSPORT=true`
|
||||
temporarily and read the bootstrap sign-in link from `docker compose logs app`.
|
||||
|
||||
A restore replaces the current database and the file areas listed in the
|
||||
manifest. The database load is one transaction, so a bad or incompatible dump
|
||||
rolls back rather than leaving a half-restored schema.
|
||||
|
||||
## The 60-second version
|
||||
|
||||
**The problem.** Three roles — Audio, Livestream, Slides — every week, managed by memory and group texts.
|
||||
|
||||
Reference in New Issue
Block a user