a34d406375
- Add user contribution system (memories, timeline entries) - Add AI content moderation with Ollama (bad word detection + qwen3:4b) - Add family photo/video upload with admin approval - Add candle lighting feature - Add timeline and recipe sections - Add QR code page and OG image - Add site authentication (password-protected access) - Add proxy middleware for auth routing - Add admin dashboard for content management - Remove email fields, make name optional (default: Anonym) - Add CI/CD pipeline for Gitea Actions - Add Docker deployment configuration - Optimize Ollama RAM usage (42GB → 2.9GB) - Fix API routes accessibility through proxy middleware Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1.7 KiB
1.7 KiB
Oma Memorial - Performance Optimizations
Für 20-40 gleichzeitige Benutzer optimiert
Implementierte Optimierungen:
-
ISR (Incremental Static Regeneration)
- Homepage wird alle 60 Sekunden neu generiert
- Reduziert DB-Abfragen drastisch
- Schnellere Ladezeiten für Besucher
-
Caching
- Static Assets: 1 Jahr Cache
- API Files: Immutable Cache
- DB-Verbindungen: Connection Pooling
-
Timeline-Fotos in Galerie
- Fotos aus Timeline werden automatisch zur Hauptgalerie hinzugefügt
- Keine Duplikate in der DB
- Virtuelle MediaItems mit hohen IDs
-
Formular-Optimierung
- 3 klare, getrennte Upload-Bereiche:
- Foto-Upload (nur Bilder)
- Erinnerungen (Name + Titel + Text Pflicht)
- Zeitstrahl (Generell/Persönlich, Jahr Pflicht)
- Kompakte Darstellung
- Thumbnail-Previews
- 3 klare, getrennte Upload-Bereiche:
-
SQLite Optimierungen
- WAL Mode für bessere Concurrency
- Increased Cache Size
- Temp Store in Memory
-
Next.js Config
- Gzip/Brotli Compression
- Optimierte Image Formats (AVIF, WebP)
- Security Headers
Deployment-Empfehlungen:
Für 20-40 User:
- ✅ Aktuelles Setup reicht aus
- SQLite mit WAL Mode ist performant genug
- ISR reduziert Last erheblich
Optional (bei mehr Traffic):
- Redis für Session-Caching
- CDN für Static Assets
- PostgreSQL statt SQLite (ab 100+ User)
Monitoring:
# Memory usage prüfen
npm run build && npm start
# Öffne http://localhost:3000
# Watch memory: htop oder Activity Monitor
Load Testing:
# Install k6 or artillery
npm install -g artillery
# Test with 40 concurrent users
artillery quick --count 40 --num 10 http://localhost:3000