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>
70 lines
1.7 KiB
Markdown
70 lines
1.7 KiB
Markdown
# Oma Memorial - Performance Optimizations
|
|
|
|
## Für 20-40 gleichzeitige Benutzer optimiert
|
|
|
|
### Implementierte Optimierungen:
|
|
|
|
1. **ISR (Incremental Static Regeneration)**
|
|
- Homepage wird alle 60 Sekunden neu generiert
|
|
- Reduziert DB-Abfragen drastisch
|
|
- Schnellere Ladezeiten für Besucher
|
|
|
|
2. **Caching**
|
|
- Static Assets: 1 Jahr Cache
|
|
- API Files: Immutable Cache
|
|
- DB-Verbindungen: Connection Pooling
|
|
|
|
3. **Timeline-Fotos in Galerie**
|
|
- Fotos aus Timeline werden automatisch zur Hauptgalerie hinzugefügt
|
|
- Keine Duplikate in der DB
|
|
- Virtuelle MediaItems mit hohen IDs
|
|
|
|
4. **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
|
|
|
|
5. **SQLite Optimierungen**
|
|
- WAL Mode für bessere Concurrency
|
|
- Increased Cache Size
|
|
- Temp Store in Memory
|
|
|
|
6. **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:
|
|
|
|
```bash
|
|
# Memory usage prüfen
|
|
npm run build && npm start
|
|
# Öffne http://localhost:3000
|
|
# Watch memory: htop oder Activity Monitor
|
|
```
|
|
|
|
### Load Testing:
|
|
|
|
```bash
|
|
# Install k6 or artillery
|
|
npm install -g artillery
|
|
|
|
# Test with 40 concurrent users
|
|
artillery quick --count 40 --num 10 http://localhost:3000
|
|
```
|