feat: redesign portal UI with Sakani UI and add release notes
Replace the hand-rolled Tailwind/shadcn look with Sakani UI across the editorial area, the admin area and all signed-out pages. - AppShell (Sakani Sidebar + TopBar) for /redaktion and /admin, with a mobile drawer, theme toggle, sign-out, legal links and a "Was ist neu" button; PublicShell for login, registration, password, 2FA and errors. - Shared primitives (Button, Card, Input, PageHeader) now render Sakani; components/ui/sakani.tsx is the client boundary for Server Components (Sakani ships no "use client") and adds FormSelect (native form value) and DataTable (element cells from the server). - Legacy CSS variables map onto Sakani tokens; globals.css shrinks from ~2200 to ~700 lines. Geist replaces Inter. recharts/lucide-react dropped (charts via Sakani BarChart). - Release notes popup per area, shown once per version (localStorage) and reopenable from the sidebar; native <dialog> for focus trapping. - Fixes found while testing: TOTP field reused the typed password in clear text, modal dialogs sat top-left, invisible unchecked checkboxes in dark mode. - Parallel run: compose.parallel.yaml, AUTO_RULE_SYNC_DISABLED switch and docs/operations.md §8 (start, rollback, cutover). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
453bece72c
commit
9e938e4d07
79 files changed
+2266
-4316
No files matched your search
@@ -36,6 +36,7 @@ All production configuration is provided via environment variables (e.g. `.env`
|
||||
| `LEGAL_TERMS_URL` | Public Nutzungsbedingungen link | `https://leon-tonhaeuser.de/agb` |
|
||||
| `AUTO_RULE_SYNC_INTERVAL_SECONDS` | Interval of the album auto-rule sync in seconds (min 30) | `120` (default) |
|
||||
| `CRON_SECRET` | Optional bearer token for `POST /api/cron/album-sync`; unset disables the endpoint | `openssl rand -hex 32` |
|
||||
| `AUTO_RULE_SYNC_DISABLED` | `true` skips the in-process album auto-rule sync (for a second instance on the same DB, see §8) | unset (sync runs) |
|
||||
|
||||
---
|
||||
|
||||
@@ -139,3 +140,65 @@ docker compose start portal-app
|
||||
- `GET /api/health/live` -> 200 OK (Process liveness).
|
||||
- `GET /api/health/ready` -> 200 OK (Database & Immich connectivity).
|
||||
- **Audit Log Inspection**: Accessible in portal UI under `/admin/audit` (Admin role required).
|
||||
|
||||
---
|
||||
|
||||
## 8. Parallel Run of the New UI (Sakani) and Cutover
|
||||
|
||||
The Sakani redesign can run next to the live portal on its own subdomain, against
|
||||
the **same database and Immich**, until it is accepted. The branch contains no
|
||||
database migrations, so both versions work on the same schema.
|
||||
|
||||
**What "parallel" means in practice**
|
||||
|
||||
- Every action in the new UI is real: approvals, album grants, downloads, usages,
|
||||
billing reports and announcements land in the production database.
|
||||
- Sessions are per domain: users log in separately on the new subdomain.
|
||||
- E-mails sent by the parallel instance (verification, password reset, album
|
||||
notifications) link to the new subdomain (`PARALLEL_BASE_URL`).
|
||||
- Only the live instance runs the album auto-rule sync and the cron endpoint; the
|
||||
parallel one has `AUTO_RULE_SYNC_DISABLED=true` and no `CRON_SECRET`.
|
||||
|
||||
**Start the parallel instance** (on the server, next to the live checkout):
|
||||
|
||||
1. Push the branch, then check it out beside the live checkout:
|
||||
```bash
|
||||
git fetch origin && git worktree add ../portal-sakani origin/<sakani-branch>
|
||||
```
|
||||
2. Build its image:
|
||||
```bash
|
||||
docker build -t portal-app:sakani ../portal-sakani
|
||||
```
|
||||
3. In the live `.env`, add the public URL of the new subdomain:
|
||||
```bash
|
||||
PARALLEL_BASE_URL=https://neu.redaktionen.leon-tonhaeuser.de
|
||||
```
|
||||
4. Start it from the **live** checkout (so it joins the live networks and DB):
|
||||
```bash
|
||||
docker compose -f compose.yaml -f ../portal-sakani/compose.parallel.yaml up -d portal-app-next
|
||||
```
|
||||
5. DNS: point the subdomain at the server. Reverse proxy (Zoraxy): add a rule
|
||||
`neu.redaktionen…` → `localhost:3001` with the same settings as the live rule
|
||||
(no buffering for `/api/downloads/`, `X-Forwarded-For` as described in §3).
|
||||
6. Smoke test: `GET https://<subdomain>/api/health/ready` → 200, then log in as
|
||||
admin and as an editorial account.
|
||||
|
||||
**Update the parallel instance** after new commits on the branch:
|
||||
`git -C ../portal-sakani pull`, rebuild the image (step 2), re-run step 4.
|
||||
|
||||
**Roll back** at any time: stop only the parallel container — the live portal is
|
||||
untouched.
|
||||
```bash
|
||||
docker compose -f compose.yaml -f ../portal-sakani/compose.parallel.yaml rm -sf portal-app-next
|
||||
```
|
||||
|
||||
**Cutover** (the new UI replaces the old one on the main domain):
|
||||
|
||||
1. Merge the Sakani branch into `main`.
|
||||
2. In the live checkout: `git pull`, then
|
||||
`docker compose build portal-app && docker compose up -d portal-app`.
|
||||
(`BETTER_AUTH_URL` stays the main domain; no other env changes are needed.)
|
||||
3. Stop the parallel container (rollback command above), remove the Zoraxy rule
|
||||
or turn it into a redirect to the main domain, delete `PARALLEL_BASE_URL` from
|
||||
`.env`, and `git worktree remove ../portal-sakani`.
|
||||
|
||||
Reference in new issue
Block a user