docs: cleanup and update documentation for January 2026

- Delete redundant TODO.md (consolidated into PROJECT_STATUS.md)
- Simplify STAGING-DEPLOYMENT.md to quick reference format
- Update PROJECT_STATUS.md with January 2026 status:
  - Add Community Management System section
  - Document Payload 3.72.0 login bug (#15243)
  - Update roadmap and changelog
- Update framework-monitoring.md with current versions and bug warning
- Add YouTube/Meta collections to CLAUDE.md:
  - YouTubeChannels, YouTubeContent, YtSeries, YtNotifications
  - MetaAccounts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2026-01-17 15:29:34 +00:00
parent cb035d209d
commit a923d3ecb4
5 changed files with 148 additions and 605 deletions

View file

@ -11,7 +11,7 @@ Multi-Tenant CMS für 4 Websites unter einer Payload CMS 3.x Instanz:
## Tech Stack
- **CMS:** Payload CMS 3.69.0
- **CMS:** Payload CMS 3.69.0 (⚠️ 3.72.0 hat Login-Bug, siehe GitHub #15243)
- **Framework:** Next.js 15.5.9
- **React:** 19.2.3
- **Sprache:** TypeScript
@ -946,6 +946,15 @@ Vollwertiger Hero-Slider mit:
| Favorites | favorites | Affiliate-Produkte mit Kategorien und Badges |
| Series | series | YouTube-Serien mit Branding (Logo, Farben) |
### YouTube & Community Management
| Collection | Slug | Beschreibung |
|------------|------|--------------|
| YouTubeChannels | youtube-channels | Multi-Kanal-Verwaltung mit OAuth |
| YouTubeContent | youtube-content | Videos + Shorts mit Kommentaren |
| YtSeries | yt-series | Serien mit Branding (Logo, Farben, Playlist) |
| YtNotifications | yt-notifications | Handlungsbedarf-System |
| MetaAccounts | meta-accounts | Facebook/Instagram OAuth-Verbindungen |
### System Collections
| Collection | Slug | Beschreibung |
|------------|------|--------------|
@ -1264,4 +1273,4 @@ ssh payload@162.55.85.18
### Scripts & Backup
- `scripts/backup/README.md` - Backup-System Dokumentation
*Letzte Aktualisierung: 09.01.2026*
*Letzte Aktualisierung: 17.01.2026*

View file

@ -1,15 +1,17 @@
# Projekt Status - Dezember 2025
# Projekt Status - Januar 2026
**Stand:** 29. Dezember 2025
**Stand:** 17. Januar 2026
## Zusammenfassung
Die komplette Entwicklungsinfrastruktur ist eingerichtet und funktionsfähig:
- Payload CMS Multi-Tenant (Dev + Prod)
- Payload CMS Multi-Tenant (Dev + Prod) - **v3.69.0 stabil**
- Multi-Frontend Development Environment
- AI-gestützte Entwicklungstools
- Reverse Proxy Stack (Caddy + Nginx)
- Analytics (Umami)
- **Community Management System** (YouTube, Facebook, Instagram)
- **YouTube Operations Hub** (Multi-Kanal-Verwaltung)
---
@ -54,9 +56,27 @@ Die komplette Entwicklungsinfrastruktur ist eingerichtet und funktionsfähig:
- [x] Package-Versionen synchronisiert:
- Next.js 15.5.9
- React 19.2.3
- Payload 3.69.0
- Payload 3.69.0 (⚠️ 3.72.0 hat Login-Bug bei hasMany Relationships)
- [x] GitHub Repository (complexcaresolutions/cms.c2sgmbh)
### Community Management System
- [x] **YouTube Integration:**
- YouTubeChannels Collection (Multi-Kanal-Verwaltung)
- YouTubeContent Collection (Videos + Shorts)
- YtSeries Collection (Serien mit Branding)
- YtNotifications Collection (Handlungsbedarf)
- YouTube Operations Dashboard
- Automatische Kommentar-Synchronisation
- [x] **Meta Integration (Facebook + Instagram):**
- MetaAccounts Collection (OAuth-Verbindungen)
- Meta OAuth Flow mit Token-Refresh
- Geplant: Kommentar-Synchronisation
- [x] **Community Reports:**
- Tägliche/wöchentliche E-Mail-Reports
- Konfigurierbare Report-Settings
- Cron-basierter Versand
### sv-frontend (Multi-Project)
- [x] Node.js 22.x + pnpm
@ -90,9 +110,9 @@ Organisation: **complexcaresolutions** (Internal)
| Priorität | Aufgabe | Status |
|-----------|---------|--------|
| 🔴 | Umami Dev Admin-Passwort ändern | Offen |
| 🔴 | auth.zh3.de - 502 Bad Gateway beheben | Offen |
| 🟡 | pve04/pve05/Backup: Enterprise Repo | Offen |
| 🔴 | Payload 3.72.0+ Login-Bug - hasMany Relationships | Bug-Report: #15243 |
| 🟡 | Meta (Facebook/Instagram) Kommentar-Sync | In Entwicklung |
| 🟡 | YouTube Thumbnail-Download für Offline-Anzeige | Geplant |
---
@ -100,23 +120,23 @@ Organisation: **complexcaresolutions** (Internal)
### Kurzfristig (diese Woche)
1. [ ] Porwoll.de Frontend-Entwicklung starten
2. [ ] VS Code Remote-SSH testen
3. [ ] Claude Code auf sv-frontend authentifizieren
1. [ ] Meta (Facebook/Instagram) Kommentar-Synchronisation fertigstellen
2. [ ] YouTube Analytics-Dashboard implementieren
3. [ ] Payload 3.72+ Update testen (nach Bug-Fix)
### Mittelfristig (Januar 2025)
### Mittelfristig (Januar/Februar 2026)
4. [ ] Frontend-Staging auf Hetzner 3 einrichten
5. [ ] GitHub Actions für Deployment
6. [ ] Content Collections in Payload erweitern
7. [ ] Design-System (Tailwind + Shadcn/UI)
4. [ ] porwoll.de Frontend-Entwicklung
5. [ ] blogwoman.de Frontend mit YouTube-Integration
6. [ ] Design-System (Tailwind + Shadcn/UI)
7. [ ] Frontend-Staging auf Hetzner 3
### Langfristig (Q1 2025)
### Langfristig (Q1 2026)
8. [ ] Alle 9 Frontends entwickeln
9. [ ] Migration von Plesk-Domains zu neuer Infra
10. [ ] CI/CD Pipeline komplett
11. [ ] Monitoring & Alerting
10. [ ] AI-gestützte Kommentar-Moderation
11. [ ] Monitoring & Alerting Dashboard
---
@ -177,6 +197,34 @@ pm2 logs payload
## 📝 Änderungsprotokoll
### 17.01.2026
- **Dokumentation bereinigt:**
- `docs/anleitungen/TODO.md` gelöscht (redundant mit PROJECT_STATUS.md)
- `docs/STAGING-DEPLOYMENT.md` auf Quick Reference reduziert
- **Payload 3.72.0 Login-Bug identifiziert:**
- Bug: Login schlägt fehl bei Usern mit hasMany Relationships (tenants, youtubeChannels)
- GitHub Issue erstellt: #15243
- Empfehlung: Bei 3.69.0 bleiben bis Fix verfügbar
### 09.01.2026
- **YtSeries Collection implementiert:**
- YouTube-Serien mit eigenem Branding (Logo, Farben)
- Relationship zu YouTubeChannels
- YouTube-Playlist-Integration
- **Community Management Phase 2:**
- Meta (Facebook/Instagram) OAuth-Integration
- MetaAccounts Collection für Kontoverwaltung
- Geplant: Kommentar-Synchronisation für Meta-Plattformen
### 05.01.2026
- **Community Management Phase 1:**
- YouTubeChannels Collection (Multi-Kanal-Verwaltung)
- YouTubeContent Collection (Videos + Shorts)
- YtNotifications Collection (Handlungsbedarf-System)
- YouTube Operations Dashboard
- Kommentar-Synchronisation via YouTube Data API
- Community Reports (E-Mail)
### 29.12.2025
- **Dokumentation konsolidiert und aktualisiert:**
- CLAUDE.md: Collections (40+) und Blocks (37) vollständig dokumentiert

View file

@ -1,254 +1,59 @@
# Staging Deployment
# Staging Deployment - Quick Reference
> **Staging URL:** https://pl.porwoll.tech
> **Server:** sv-payload (37.24.237.181)
> **Server:** sv-payload (10.10.181.100 intern / 37.24.237.181 extern)
> **Branch:** `develop`
> **Siehe auch:** [DEPLOYMENT_STRATEGY.md](./DEPLOYMENT_STRATEGY.md) für die vollständige Deployment-Strategie (Dev → Prod)
> **Vollständige Dokumentation:** [DEPLOYMENT.md](./DEPLOYMENT.md)
---
## Übersicht
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ STAGING DEPLOYMENT WORKFLOW │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────────────┐│
│ │ Developer │ │ GitHub │ │ Staging Server ││
│ │ │ │ Actions │ │ pl.porwoll.tech ││
│ └──────┬───────┘ └──────┬───────┘ └──────────────┬───────────────┘│
│ │ │ │ │
│ │ git push │ │ │
│ │ develop │ │ │
│ ├───────────────────►│ │ │
│ │ │ │ │
│ │ │ 1. Lint Check │ │
│ │ │ 2. Unit Tests │ │
│ │ │ ↓ │ │
│ │ │ [Pre-checks OK?] │ │
│ │ │ ↓ │ │
│ │ │ 3. SSH Connect ──────────►│ │
│ │ │ │ 4. git pull │
│ │ │ │ 5. pnpm install│
│ │ │ │ 6. migrate │
│ │ │ │ 7. build │
│ │ │ │ 8. pm2 restart │
│ │ │ │ ↓ │
│ │ │◄───────────────────────── │ 9. Health Check│
│ │ │ │ │
│ │ ✅ Success │ │ │
│ │◄───────────────────│ │ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
```
---
## Trigger
| Trigger | Beschreibung |
|---------|--------------|
| **Push auf `develop`** | Automatisches Deployment |
| **workflow_dispatch** | Manuelles Deployment via GitHub UI |
---
## Workflow-Ablauf
### 1. Pre-deployment Checks (~1 Min)
```yaml
Jobs: pre-checks
```
- ESLint prüfen
- Unit Tests ausführen
- Bei Fehler: Deployment wird abgebrochen
### 2. Deploy to Staging (~2-3 Min)
```yaml
Jobs: deploy
```
1. SSH-Verbindung zum Server herstellen
2. `git fetch origin develop && git reset --hard origin/develop`
3. `pnpm install --frozen-lockfile`
4. `pnpm payload migrate`
5. `pnpm build` (mit Memory-Limit 2GB)
6. `pm2 restart payload queue-worker`
7. Health Check auf `http://localhost:3000/admin`
### 3. Verify Deployment
- HTTP-Status von https://pl.porwoll.tech/admin prüfen
- Bei Fehler: Benachrichtigung im Workflow-Summary
---
## Manuelles Deployment
### Via GitHub UI
1. Gehe zu: https://github.com/c2s-admin/cms.c2sgmbh/actions
2. Wähle "Deploy to Staging"
3. Klicke "Run workflow"
4. Optional: "Skip tests" aktivieren für schnelleres Deployment
### Via CLI (auf dem Server)
## Quick Commands
### Automatisch (Push auf develop)
```bash
# Vollständiges Deployment
git push origin develop # Triggert GitHub Actions
```
### Manuell auf Server
```bash
ssh payload@10.10.181.100
cd ~/payload-cms
./scripts/deploy-staging.sh
# Nur Code-Update (ohne Build)
./scripts/deploy-staging.sh --skip-build
# Ohne Migrationen
./scripts/deploy-staging.sh --skip-migrations
# Anderer Branch
DEPLOY_BRANCH=feature/xyz ./scripts/deploy-staging.sh
```
### Via SSH (Remote)
### Optionen
```bash
ssh payload@37.24.237.181 'cd ~/payload-cms && ./scripts/deploy-staging.sh'
./scripts/deploy-staging.sh --skip-build # Nur Code-Update
./scripts/deploy-staging.sh --skip-migrations # Ohne Migrationen
DEPLOY_BRANCH=feature/xyz ./scripts/deploy-staging.sh # Anderer Branch
```
---
## Konfiguration
### GitHub Secrets
| Secret | Beschreibung |
|--------|--------------|
| `STAGING_SSH_KEY` | SSH Private Key für `payload@37.24.237.181` |
### Environment
| Variable | Wert |
|----------|------|
| `STAGING_HOST` | 37.24.237.181 |
| `STAGING_USER` | payload |
| `STAGING_PATH` | /home/payload/payload-cms |
---
## Dateien
| Datei | Beschreibung |
|-------|--------------|
| `.github/workflows/deploy-staging.yml` | GitHub Actions Workflow |
| `scripts/deploy-staging.sh` | Manuelles Deploy-Script |
---
## Logs & Debugging
### GitHub Actions Logs
## Status prüfen
```bash
# Letzte Workflow-Runs anzeigen
gh run list --workflow=deploy-staging.yml
# GitHub Actions Status
gh run list --workflow=deploy-staging.yml --limit=5
# Details eines Runs
gh run view <run-id>
# Logs eines Jobs
gh run view <run-id> --job=<job-id> --log
```
### Server Logs
```bash
# Deployment Log
tail -f /home/payload/logs/deploy-staging.log
# PM2 Logs
pm2 logs payload --lines 50
pm2 logs queue-worker --lines 50
# Server Status
pm2 status
pm2 logs payload --lines 20
```
---
## Troubleshooting
### Build schlägt fehl (OOM)
```bash
# PM2 stoppen um RAM freizugeben
pm2 stop all
# Build mit reduziertem Memory
NODE_OPTIONS="--max-old-space-size=1536" pnpm build
# Services wieder starten
pm2 start ecosystem.config.cjs
```
### SSH-Verbindung fehlgeschlagen
1. Prüfen ob `STAGING_SSH_KEY` Secret korrekt ist
2. Prüfen ob Public Key in `~/.ssh/authorized_keys` auf dem Server ist
3. Prüfen ob Server erreichbar ist: `ping 37.24.237.181`
### Migrations fehlgeschlagen
```bash
# Direkt auf dem Server
cd /home/payload/payload-cms
pnpm payload migrate:status
pnpm payload migrate
```
### Service startet nicht
```bash
# PM2 Status prüfen
pm2 status
# Logs prüfen
pm2 logs payload --err --lines 100
# Manuell starten
pm2 start ecosystem.config.cjs
```
| Problem | Lösung |
|---------|--------|
| OOM beim Build | `pm2 stop all` → Build → `pm2 start ecosystem.config.cjs` |
| Migration fehlgeschlagen | `pnpm payload migrate:status``pnpm payload migrate` |
| Service startet nicht | `pm2 logs payload --err --lines 100` |
---
## Branching-Strategie
*Für detaillierte Anleitungen siehe [DEPLOYMENT.md](./DEPLOYMENT.md)*
```
main (Produktion)
└── develop (Staging) ◄── Feature-Branches
├── feature/xyz
├── fix/abc
└── ...
```
| Branch | Deployment | URL |
|--------|------------|-----|
| `main` | Produktion (manuell) | cms.c2sgmbh.de |
| `develop` | Staging (automatisch) | pl.porwoll.tech |
---
## Workflow-Status prüfen
```bash
# CLI
gh run list --workflow=deploy-staging.yml --limit=5
# Oder im Browser
# https://github.com/c2s-admin/cms.c2sgmbh/actions/workflows/deploy-staging.yml
```
---
*Letzte Aktualisierung: 29.12.2025*
*Letzte Aktualisierung: 17.01.2026*

View file

@ -1,343 +0,0 @@
# To-Do-Liste - Payload CMS Multi-Tenant Projekt
> **Server:** sv-payload (LXC 700) - 10.10.181.100
> **Frontend-Tasks:** Siehe `FRONTEND.md` (sv-frontend, LXC 704)
---
## Zusammenfassung: Offene Tasks (Payload-Server)
### Hohe Priorität
| Status | Task | Bereich |
|--------|------|---------|
| [ ] | SMTP-Credentials in `.env` konfigurieren | E-Mail |
### Mittlere Priorität
| Status | Task | Bereich |
|--------|------|---------|
| [ ] | Media-Backup zu S3/MinIO | Backup |
| [ ] | CDN-Integration (Cloudflare) | Caching |
| [x] | CI/CD Pipeline erweitern (Lint/Test/Build) | DevOps |
| [x] | Security Scanning (CodeQL, Dependency Audit) | DevOps |
| [x] | Staging-Deployment | DevOps |
| [x] | Memory-Problem lösen (Swap) | Infrastruktur |
| [ ] | PM2 Cluster Mode testen | Infrastruktur |
| [ ] | Payload/Next Releases auf Next.js 16 Support beobachten *(siehe `framework-monitoring.md`)* | Tech Debt |
### Niedrige Priorität
| Status | Task | Bereich |
|--------|------|---------|
| [ ] | Monitoring: Sentry, Prometheus, Grafana | Monitoring |
| [x] | AuditLogs Retention (90 Tage Cron) | Data Retention |
| [x] | Email-Log Cleanup Cron | Data Retention |
| [x] | Media-Orphan-Cleanup | Data Retention |
| [x] | Consent-Logs Archivierung | Data Retention |
| [ ] | Dashboard-Widget für Email-Status | Admin UX |
| [ ] | TypeScript Strict Mode | Tech Debt |
| [x] | E2E Tests für kritische Flows | Testing |
### Dokumentation
| Status | Task |
|--------|------|
| [x] | DEPLOYMENT.md erstellen |
---
## Legende
- [ ] Offen
- [x] Erledigt
- [~] In Bearbeitung
- [!] Hohe Priorität
- [→] Ausgelagert (siehe FRONTEND.md)
---
## Offene Aufgaben
### Hohe Priorität
- [ ] **SMTP-Credentials in `.env` konfigurieren**
- Echte SMTP-Zugangsdaten für Produktion hinterlegen
### Mittlere Priorität
#### Analytics Integration
- [ ] **Umami Analytics (cookieless, ohne Consent)**
- [ ] Umami-Server auf sv-analytics (10.10.181.103) einrichten
- [ ] Website-IDs für alle 4 Tenants in Umami erstellen
- [ ] `src/config/analytics.ts` mit Website-IDs anlegen
- [ ] `src/components/analytics/UmamiScript.tsx` implementieren
- [ ] Umami Script in Root Layout einbinden (Multi-Tenant)
- [ ] `src/hooks/useAnalytics.ts` Hook für Custom Events
- [ ] `src/lib/analytics.server.ts` für Server-Side Events
- [ ] Event-Tracking in Newsletter-Formular integrieren
- [ ] Event-Tracking in CTA-Buttons integrieren
- [ ] TrackedButton & TrackedDownload Komponenten erstellen
- [ ] **Google Ads Conversion (mit Consent)**
- [ ] `src/components/analytics/GoogleConsentMode.tsx` implementieren
- [ ] Google Consent Mode v2 mit Orestbida Cookie-Banner integrieren
- [ ] `src/hooks/useGclid.ts` Hook für GCLID-Erfassung
- [ ] `src/lib/google-ads.ts` Client-Side Conversion Tracking
- [ ] `src/lib/google-ads.server.ts` Server-Side Conversion API
- [ ] Enhanced Conversions mit gehashten E-Mails
- [ ] **Cookie Inventory**
- [ ] Google Ads Cookies (_gcl_au, _gcl_aw, IDE) zur Cookie Inventory Collection hinzufügen
- [ ] **Environment Variables**
- [ ] NEXT_PUBLIC_UMAMI_HOST in .env.local
- [ ] NEXT_PUBLIC_GOOGLE_ADS_ID in .env.local (pro Tenant)
- [ ] UMAMI_HOST, UMAMI_WEBSITE_ID in Backend .env
- [ ] Google Ads API Credentials in Backend .env
- [ ] **CDN-Integration (Cloudflare)**
- [~] **Backup-System**
- [ ] Media-Backup zu S3/MinIO
- [ ] Disaster Recovery Plan
### Niedrige Priorität
- [ ] **Monitoring & Logging**
- Sentry Error Tracking
- Prometheus Metrics
- Grafana Dashboard
---
## Build & Infrastructure
- [x] **Memory-Problem lösen** *(erledigt: 4GB Swap via ZFS ZVOL auf Proxmox Host)*
- [x] Swap auf Server aktivieren (4GB)
- [x] Container Swap-Limit konfiguriert (`pct set 700 -swap 4096`)
- [ ] **PM2 Cluster Mode**
- [ ] Multi-Instanz Konfiguration testen
- [ ] Shared State via Redis sicherstellen
---
## Testing & CI/CD
- [x] **CI/CD Pipeline** *(erledigt: `.github/workflows/ci.yml`)*
- [x] Automatisches Lint/Test/Build Workflow
- [x] Staging-Deployment *(erledigt: `.github/workflows/deploy-staging.yml`)*
- [x] **E2E Tests für kritische Flows** *(erledigt: `tests/e2e/`)*
---
## Data Retention
- [x] **Automatische Datenbereinigung** *(erledigt: `src/lib/retention/`)*
- [x] Cron-Job für Email-Log Cleanup (90 Tage default)
- [x] AuditLogs Retention Policy (90 Tage)
- [x] Consent-Logs Archivierung (3 Jahre, expiresAt-basiert)
- [x] Media-Orphan-Cleanup (30 Tage Mindestalter)
---
## Tenant-spezifische Features
> **Hinweis:** Backend-Collections hier, Frontend-Komponenten in `FRONTEND.md`
### porwoll.de
- [ ] Immobilien-Collection (falls benötigt) *(Backend)*
- [→] Objektsuche *(Frontend)*
- [→] Kontaktformular mit Objekt-Referenz *(Frontend)*
### complexcaresolutions.de (C2S)
- [→] Leistungs-Übersicht *(Frontend)*
- [→] Karriere-Seite mit Stellenangeboten *(Frontend)*
### gunshin.de / Fotografin-Portfolio
- [→] Projekt-Galerie Frontend *(Frontend)*
- [→] Referenzen-Slider *(Frontend)*
### zweitmein.ng
- [ ] Produkt-Collection (falls E-Commerce) *(Backend)*
- [→] Preistabellen *(Frontend)*
---
## Technische Schulden
- [ ] TypeScript Strict Mode aktivieren
- [x] E2E Tests für kritische Flows
- [x] Code-Review für Security-relevante Bereiche *(erledigt: 17.12.2025)*
- [ ] Performance-Audit der Datenbank-Queries
---
## Dokumentation
- [x] DEPLOYMENT.md (Deployment-Prozess) *(erledigt: 18.12.2025)*
---
## Regelmäßige Wartung
### Wöchentlich
- [ ] PM2 Logs prüfen
- [ ] Datenbank-Größe überwachen
- [ ] Media-Storage prüfen
### Monatlich
- [ ] Dependencies aktualisieren (`pnpm update`)
- [ ] Sicherheitsupdates prüfen (`pnpm audit`)
- [ ] Backup-Restore testen
### Quartalsweise
- [ ] Performance-Review
- [ ] Security-Audit
- [ ] Dokumentation aktualisieren
---
## Notizen
### Bekannte Probleme
1. **Tenant-Isolation bei localhost:** API gibt 403 zurück, wenn kein Tenant zur Domain passt. Das ist gewolltes Verhalten für Multi-Tenant-Sicherheit.
2. **GraphQL Playground deaktiviert:** Route wurde entfernt. Bei Bedarf wieder aktivieren.
3. **PM2 Cluster Mode:** Aktuell 1 Instanz. Für Skalierung `instances: "max"` setzen.
### Nächste Schritte (Priorisiert)
1. **[MITTEL]** Media-Backup zu S3 einrichten
2. **[NIEDRIG]** Monitoring (Sentry/Prometheus)
3. **[NIEDRIG]** Analytics Integration (Umami)
---
## Kontakte & Ressourcen
- **Payload CMS Docs:** https://payloadcms.com/docs
- **GitHub Issues:** https://github.com/payloadcms/payload/issues
- **Discord Community:** https://discord.com/invite/payload
---
*Letzte Aktualisierung: 29.12.2025*
---
## Changelog
### 29.12.2025
- **Dokumentation konsolidiert und aktualisiert:**
- CLAUDE.md: Collections (40+) und Blocks (37) vollständig dokumentiert
- CLAUDE.md: Neue Collections hinzugefügt (Products, Tags, Authors, Locations, Partners, Jobs, Downloads, Events)
- CLAUDE.md: Neue Blocks hinzugefügt (ImageSlider, Blogging, Team-Filter, Feature, Interactive Blocks)
- CLAUDE.md: Globals-Abschnitt korrigiert (SiteSettings/Navigations sind jetzt Collections)
- docs/INFRASTRUCTURE.md aktualisiert
- docs/DEPLOYMENT.md aktualisiert
- docs/STAGING-DEPLOYMENT.md: URLs korrigiert (pl.porwoll.tech)
- docs/anleitungen/API_ANLEITUNG.md: URLs korrigiert (pl.porwoll.tech)
- docs/anleitungen/SECURITY.md: Custom Login Page Abschnitt entfernt
### 27.12.2025
- **Production Deployment-Strategie implementiert:**
- GitHub Actions Workflow `deploy-production.yml` für manuelles Production-Deployment
- Deploy-Script `scripts/deploy-production.sh` mit Backup, Health Check, Rollback
- Umfassende Dokumentation in `docs/DEPLOYMENT_STRATEGY.md`
- Features: Pre-flight Checks, DB-Backup, automatischer Rollback bei Fehler
- Neues GitHub Secret erforderlich: `PRODUCTION_SSH_KEY`
- **Payload CMS Update 3.68.4 → 3.69.0:**
- Login Redirect Loop behoben (formatAdminURL generiert keine absoluten URLs mehr)
- Update aller @payloadcms/* Pakete
- **Admin Panel Bug-Fixes:**
- Speichern-Button für User-Account repariert: `canUpdateOwnAccount` Access Control in Users.ts
- Einstellungen-Gruppe in Navigation sichtbar: Explizite `read`/`update` Access Controls in SEOSettings.ts
- **Datenbank-Schema aktualisiert:**
- `site_settings_id` und `navigations_id` Spalten zu `payload_locked_documents_rels` hinzugefügt
- **Code-Cleanup:**
- Custom Login Page entfernt (verursachte Rendering-Fehler)
- migrations_backup Ordner entfernt
- Unbenutzte Dateien entfernt (cache-keys.ts, my-route)
- ImportMap regeneriert
- **Git Remote aktualisiert:** `github.com/complexcaresolutions/cms.c2sgmbh.git`
### 18.12.2025
- **Dokumentation konsolidiert:**
- CLAUDE.md: Tech-Stack auf aktuelle Versionen aktualisiert (Payload 3.68.4, Next.js 15.5.9, React 19.2.3)
- CLAUDE.md: Architektur-Diagramm erweitert (sv-caddy, sv-frontend hinzugefügt)
- CLAUDE.md: Videos/VideoCategories Collections hinzugefügt
- docs/INFRASTRUCTURE.md: Komplett aktualisiert mit neuer Infrastruktur
- docs/PROJECT_STATUS.md: Neues Statusdokument behalten
- Obsolete Dateien entfernt: INFRASTRUCTURE_COMPLETE_DECEMBER_2025.md, TECHSTACK_COMPLETE_DECEMBER_2025.md
### 17.12.2025
- **Security Code-Review abgeschlossen:**
- **IP Header Spoofing behoben:** `X-Forwarded-For`/`X-Real-IP` werden nur bei `TRUST_PROXY=true` vertraut
- **CSRF Secret-Fallback behoben:** Server startet nicht ohne `CSRF_SECRET` oder `PAYLOAD_SECRET` in Production
- **IP-Allowlist Warnungen:** Startup-Warnungen wenn Allowlists leer und `allowAllIfEmpty=true`
- Neue Umgebungsvariable: `TRUST_PROXY=true` (Pflicht hinter Reverse-Proxy)
- Dateien: `src/lib/security/rate-limiter.ts`, `src/lib/security/ip-allowlist.ts`, `src/lib/security/csrf.ts`
- Unit Tests und Integration Tests aktualisiert (177 Tests passed)
- CLAUDE.md Dokumentation aktualisiert
### 16.12.2025
- **CI/CD Pipeline stabilisiert:**
- Job-Level Timeouts (30 Minuten) für Tests und E2E hinzugefügt
- Step-Level Timeouts: Unit Tests (10min), Integration Tests (15min), E2E Tests (15min)
- Vitest testTimeout (30s) und hookTimeout (30s) konfiguriert
- Verhindert 6-Stunden-Hänger bei fehlgeschlagenen DB-Verbindungen
- drizzle-kit als Dev-Dependency hinzugefügt (früherer Commit)
- drizzle-kit push statt Migrations für CI (früherer Commit)
### 15.12.2025
- **Data Retention System implementiert:**
- Automatische Datenbereinigung für DSGVO-Compliance
- Email-Logs Cleanup (90 Tage default)
- AuditLogs Retention (90 Tage default)
- Consent-Logs Archivierung (3 Jahre, expiresAt-basiert)
- Media-Orphan-Cleanup (unreferenzierte Dateien)
- Scheduler: Täglich um 03:00 Uhr via BullMQ
- API-Endpoint `/api/retention` für manuellen Trigger
- Dateien: `src/lib/retention/`, `src/lib/queue/workers/retention-worker.ts`
- **E2E Tests stabilisiert:**
- Rate-Limit Handling (429) zu allen API-Tests hinzugefügt
- `networkidle` durch `domcontentloaded` + explizite Waits ersetzt
- Status-Code-Erwartungen für protected APIs erweitert
- 105 Tests passed, 7 skipped (vorher 28 failures)
- **Security Scanning Pipeline repariert:**
- CodeQL im GitHub Repository aktiviert (Advanced Setup)
- Gitleaks durch GitHub Native Secret Scanning ersetzt (423 Patterns)
- CodeQL Action v3 → v4 aktualisiert
- 0 Security Vulnerabilities gefunden
### 14.12.2025
- **Tenant-spezifische Collections implementiert:**
- Bookings Collection für porwoll.de (Fotografie-Buchungen)
- Certifications Collection für C2S (Zertifizierungen)
- Projects Collection für gunshin.de (Game-Development-Projekte)
- BeforeAfterBlock für porwoll.de (Vorher/Nachher Bildvergleich)
- Migration: `20251214_010000_tenant_specific_collections.ts`
- 28 neue Datenbank-Tabellen erstellt
- **TODO.md bereinigt:** Alle erledigten Tasks entfernt
### 12.12.2025
- **PgBouncer Connection Pooling eingerichtet**
- **Unit Tests für Access Control implementiert**
- **Rate-Limits auf Redis migriert**
### 11.12.2025
- **Automatisierte Datenbank-Backups eingerichtet**
- **Offsite-Backup zu Hetzner Object Storage**
- **Dokumentierter Restore-Prozess**
### 10.12.2025
- **Newsletter Double Opt-In implementiert**
- **OpenAPI-Dokumentation hinzugefügt**
- **Audit-Fixes durchgeführt**
### 09.12.2025
- **Full-Text-Search aktiviert**
- **BullMQ Queue-System implementiert**
- **PDF-Queue-System implementiert**
- **Index-Audit durchgeführt**

View file

@ -1,33 +1,57 @@
# Framework Monitoring Next.js & Payload
# Framework Monitoring Payload CMS
Dieser Leitfaden beschreibt, wie wir beobachten, wann Payload offiziell Next.js 16 (oder spätere) Versionen unterstützt und wann wir die Upgrades wieder aufnehmen können.
Dieser Leitfaden beschreibt, wie wir Payload-Updates evaluieren und wann wir Upgrades durchführen können.
## 1. Wöchentlicher Versions-Check
**Aktueller Stand (Januar 2026):**
- Payload: **3.69.0** (stabil)
- Next.js: **15.5.9**
- React: **19.2.3**
```
> ⚠️ **Payload 3.72.0 Bug:** Login schlägt fehl bei Usern mit hasMany Relationships (tenants, youtubeChannels). GitHub Issue: #15243. Bei 3.69.0 bleiben bis Fix verfügbar.
---
## 1. Versions-Check
```bash
pnpm check:frameworks
```
Der Befehl führt `pnpm outdated` nur für Payload-Core und alle Payload-Plugins sowie Next.js aus. Damit sehen wir sofort, ob es neue Veröffentlichungen gibt, die wir evaluieren sollten.
Der Befehl führt `pnpm outdated` für Payload-Core, Plugins und Next.js aus.
> Falls du den Check auf CI ausführen möchtest, stelle sicher, dass `pnpm` installiert ist und das Repository bereits `pnpm install` ausgeführt hat.
---
## 2. Release Notes verfolgen
- Payload Releases: https://github.com/payloadcms/payload/releases
Abonniere die Repo-Releases („Watch → Releases only“), damit du automatisch benachrichtigt wirst, wenn ein neues Release Next.js 16 als kompatibel markiert.
- Next.js Blog: https://nextjs.org/blog
Relevant, um Breaking Changes zu erkennen, die Payload evtl. erst später unterstützt.
- **Payload Releases:** https://github.com/payloadcms/payload/releases
Abonniere „Watch → Releases only" für automatische Benachrichtigungen.
- **Next.js Blog:** https://nextjs.org/blog
Breaking Changes, die Payload evtl. erst später unterstützt.
---
## 3. Vorgehen bei neuem Payload-Release
1. `pnpm check:frameworks` ausführen und prüfen, ob `@payloadcms/next` oder `@payloadcms/ui` eine neue Version anbieten, deren Peer-Dependencies `next@16` erlauben.
2. Falls ja:
- Branch erstellen (`feature/upgrade-next16`)
- `package.json` anpassen (Next.js + Payload) und `pnpm install`
- `pnpm lint`, `pnpm typecheck`, `pnpm test` und ein Test-Build (`pnpm build && pnpm test:e2e` falls vorhanden) ausführen.
3. Läuft alles fehlerfrei, kann das Update über PR/Merge in `develop`.
1. **Changelog prüfen** auf Breaking Changes und Bug-Fixes
2. **Branch erstellen:** `feature/upgrade-payload-X.Y.Z`
3. **Lokales Upgrade:**
```bash
pnpm up @payloadcms/next @payloadcms/db-postgres @payloadcms/richtext-lexical
pnpm install
```
4. **Tests ausführen:**
```bash
pnpm lint && pnpm typecheck && pnpm test && pnpm build
```
5. **Login-Test mit User mit Relationships** (kritisch nach 3.72.0 Bug)
6. Bei Erfolg: PR in `develop`
## 4. Erinnerung
---
In der To-Do-Liste (`docs/anleitungen/TODO.md`) gibt es einen Eintrag „Payload/Next Releases auf Next.js 16 Support beobachten“. Wenn das Upgrade abgeschlossen ist, kann dieser Task auf erledigt gesetzt werden.
## 4. Bekannte Probleme
| Version | Problem | Status |
|---------|---------|--------|
| 3.72.0 | Login-Bug bei hasMany Relationships | Offen (GitHub #15243) |
*Letzte Aktualisierung: 17.01.2026*