feat(media): primary media storage, growth goals, retention and delivery tools
CI / build (push) Has been cancelled

Event photos and videos are now stored only on the NFS/local share named in
Settings -> Media storage. Uploads, photo editing, video processing and the
per-event filing step refuse to run until that share is configured and
writable, so nothing is silently written inside the container. Video
originals, renditions, posters and sidecars share one folder on the share.

Also adds volunteer growth goals with a mentor queue, an admin retention and
storage sweep with a cron entry point, cached gallery thumbnails with
per-folder ZIP downloads, a server-rendered booth-sheet PDF, and in-app
confirm/release for every upcoming assignment.

Service reminders now ignore the one-off event reminder rule, which had been
queueing an extra bogus reminder for each published service.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-20 23:21:34 +00:00
parent cb5976edb2
commit f7a0c8618f
68 changed files with 3237 additions and 297 deletions
+14 -7
View File
@@ -4,10 +4,8 @@ import { hasPermission } from "@/auth/permissions";
import type { SystemRole } from "@/auth/roles";
import { getEmailSettings } from "@/db/settings";
import { getUserSecurity } from "@/db/users";
import {
checkArchiveDestination,
getStorageSettings,
} from "@/db/storage-settings";
import { getStorageSettings } from "@/db/storage-settings";
import { mediaStorage } from "@/lib/media-storage";
import { CHURCH_TIMEZONE } from "@/lib/tz";
import {
Card,
@@ -34,9 +32,18 @@ export default async function SettingsPage() {
const security = userId ? await getUserSecurity(userId) : null;
const isAdmin = hasPermission(role, "admin.settings");
const emailSettings = isAdmin ? await getEmailSettings() : null;
// Keep the form populated even while the destination is unusable, so an
// admin can see and fix what is saved.
const storageSettings = isAdmin ? await getStorageSettings() : null;
const storageStatus = storageSettings
? await checkArchiveDestination(storageSettings)
const media = isAdmin ? await mediaStorage() : null;
const storageStatus = media
? {
ready: media.ok,
message: media.ok
? `Event photos and videos are stored in ${media.root}.`
: media.message,
freeBytes: media.ok ? media.freeBytes : null,
}
: null;
const emailTransport = emailSettings?.smtpConfigured
? "Gmail (SMTP)"
@@ -142,7 +149,7 @@ export default async function SettingsPage() {
{isAdmin && storageSettings && storageStatus && (
<Card>
<CardHeader>
<CardTitle className="text-lg">Media archive (NFS)</CardTitle>
<CardTitle className="text-lg">Media storage (NFS / local path)</CardTitle>
<CardDescription>
Mount an NFS export into this container. Finished event photos are
archived here, and every uploaded video keeps its camera original