karim
8404165f5c
perf/ops: Auth-Latenz, Zähl-View, DB-Backup, Schreib-Limit, Asset-Cache
...
- auth: Supabase-JWT lokal verifizieren (hono/jwt, HS256) statt GoTrue-
Roundtrip pro Request; JWT_SECRET in cms-env, Remote-Fallback wenn ungesetzt
- dialog: comment_stats-View (group by thread) ersetzt Full-Table-Scan +
JS-Aggregation bei jedem Forum-Aufruf
- ops: scripts/backup-db.sh (pg_dump, rotiert) + täglicher Cron im Proxmox-
Script — Dialog-Daten liegen nur in Postgres, nicht in Git
- security: Rate-Limit auf Schreib-Endpunkte (/api non-GET, 60/min je Nutzer)
- perf: Cache-Control (1 Woche) auf statische Assets, HTML bleibt frisch
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-01 23:01:12 +02:00
karim
6d20be036a
dialog: Position/Rolle + Breadcrumb-Nav + nüchterne Wortmeldungen, Footer voll-breit
...
- comments: author_role (Position bei OPENBUREAU) aus authors.json gespeichert/ausgeliefert
- schema: comments.author_role hinzugefügt
- dialog.js: Breadcrumb (Dialoge › Forum), volles Datum/Uhrzeit, Box→Trennlinien-Layout
- css: Footer voll-breit (Flex statt Grid), Balken zwischen Header/main/Footer entfernt
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-01 19:37:50 +02:00
karim
bd85570259
dialog: Diskussionsplattform mit Foren, Rollen & Moderation + RLS-Fix
...
Auth/RLS-Fix (Schreiben gab 400):
- supabase.js: eigener supabaseAuth-Client für Login/Token-Check, damit
signInWithPassword den Service-Daten-Client nicht prozessweit aufs
User-Token umstellt (sonst lief insert als role=authenticated → RLS-Block).
Rollen (admin > editor > user):
- auth.js: roleOf() aus app_metadata.role + ADMIN_EMAILS, requireModerator.
- users.js: Rolle anzeigen/setzen über GoTrue app_metadata; .env-Admins fix.
Datenmodell (schema.sql):
- forums (Kategorien) + threads; Seed Allgemein/Projekte/Technik/Off-Topic
und Sonder-Kategorie Beiträge. Library-Beiträge werden als Threads
gespiegelt (dialog-store.syncLibrary).
API (routes/dialog.js, dialog-store.js):
- öffentlich: /api/forums, /api/forums/:slug, /api/recent, /api/thread
- eingeloggt: POST /api/threads (Thread starten, nur in Foren)
- Moderation: /api/mod/* (sperren/ausblenden), Admin: /api/admin/forums CRUD
- comments: Lock-Prüfung beim Schreiben, Moderation darf jede löschen.
Frontend:
- static/dialog.js: Router (Übersicht-Split-View | Forum | Thread),
neuer Thread, Mod-Leiste, subtiles Login (dezente Zeile statt Formular).
- Admin-UI: Tabs Foren + Moderation, Rollen-Dropdown bei Autor:innen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-31 16:09:19 +02:00
karim
e787961059
dialog: eigene Diskussion pro Beitrag (MVP, flach, eingeladene-only)
...
- DB: public.comments (thread, parent_id, user_id, author_name/-avatar, body, deleted)
- API: GET /api/comments (öffentlich lesen), POST/DELETE (eingeloggt),
POST /api/auth/login (Token fürs Widget)
- Vanilla-Widget static/dialog.js: Karten mit Name+Bild, flacher Dialog mit
optionalem Bezug (↳ Antwort auf), Inline-Login, Löschen (eigene/Admin)
- eingebettet in single.html (thread = Beitrags-Pfad), Styling im Theme-Look
- Autorname/-bild kommen aus dem Profil (data/authors.json)
Realtime (Supabase) folgt als nächster Schritt.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-31 14:02:59 +02:00
karim
60e5ef6844
cms: headless CMS vor Hugo (Supabase + Node-API + React-Admin)
...
All-in-One docker-compose-Stack (Muster von RAPPORT-SERVER gespiegelt):
db/auth/rest/kong + cms-Service (Node-API + Hugo-Binary 0.161.1 + Admin-SPA).
- DB-backed: posts-Tabelle kanonisch, MD ist generiertes Artefakt
- echte Hugo-Vorschau via draft:true + --buildDrafts → /_preview
- Publish: DB → content/library/<section>/<slug>.md → hugo build → live
- Bild-Upload nach static/images/, Supabase-Auth schützt /api/*
- Proxmox-LXC-Script: legt Container an, generiert Secrets, startet Stack
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-31 00:21:04 +02:00