feat: add visual admin panel with page builder and settings editor

- Add /admin route with password-protected visual page builder
- Page Builder: manage hero images, standalone albums, subpages, and sections
- Album Picker: browse all shared Immich albums with search and filtering
- Settings Editor: theme, grid, footer, legal, SEO configuration
- YAML service with atomic writes and automatic backups (content/.backups/)
- HMAC-signed admin sessions (24h expiry, HttpOnly cookies)
- API endpoints: /api/admin/{auth,gallery,settings,albums,reload}
- Enable with ADMIN_PASSWORD env var; disabled by default
- invalidateConfigCache() export for hot-reload after saves
This commit is contained in:
ralksta
2026-05-29 17:04:37 +02:00
parent 5887706775
commit 9e52d7a0b8
18 changed files with 3127 additions and 1 deletions

View File

@@ -12,6 +12,8 @@ export interface Env {
RATE_LIMIT_RPM: number;
AUTH_SECRET?: string;
TRUSTED_PROXIES: string[];
WEBHOOK_SECRET?: string;
ADMIN_PASSWORD?: string;
}
function parseEnv(): Env {
@@ -49,6 +51,8 @@ function parseEnv(): Env {
.split(',')
.map((ip) => ip.trim())
.filter((ip) => ip !== ''),
WEBHOOK_SECRET: process.env.WEBHOOK_SECRET || undefined,
ADMIN_PASSWORD: process.env.ADMIN_PASSWORD || undefined,
};
}