From 7747ca6a36b252b00582b8db1bf36bed114515fd Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:40:37 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(devlog):=20add=20missing=20?= =?UTF-8?q?devlogs=20for=20Jan=2024-27=20and=20Feb=2014-15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 5 devlogs covering previously undocumented development days: - 2026-01-24: Guest mode improvements for Clock & Contacts - 2026-01-25: NutriPhi app, Prometheus monitoring, Watchtower - 2026-01-27: Matrix self-hosting, Stats/Doc/Ollama bots - 2026-02-14: Matrix STT bot, gift code UI, onboarding bot - 2026-02-15: Onboarding modal polish, Calendar ViewsBar --- .../2026-01-24-guest-mode-improvements.md | 115 +++++ ...1-25-nutriphi-monitoring-infrastructure.md | 366 ++++++++++++++ ...1-27-matrix-infrastructure-self-hosting.md | 363 ++++++++++++++ ...14-matrix-stt-bot-gift-codes-onboarding.md | 466 ++++++++++++++++++ ...-02-15-onboarding-polish-calendar-views.md | 238 +++++++++ 5 files changed, 1548 insertions(+) create mode 100644 apps/manacore/apps/landing/src/content/devlog/2026-01-24-guest-mode-improvements.md create mode 100644 apps/manacore/apps/landing/src/content/devlog/2026-01-25-nutriphi-monitoring-infrastructure.md create mode 100644 apps/manacore/apps/landing/src/content/devlog/2026-01-27-matrix-infrastructure-self-hosting.md create mode 100644 apps/manacore/apps/landing/src/content/devlog/2026-02-14-matrix-stt-bot-gift-codes-onboarding.md create mode 100644 apps/manacore/apps/landing/src/content/devlog/2026-02-15-onboarding-polish-calendar-views.md diff --git a/apps/manacore/apps/landing/src/content/devlog/2026-01-24-guest-mode-improvements.md b/apps/manacore/apps/landing/src/content/devlog/2026-01-24-guest-mode-improvements.md new file mode 100644 index 000000000..448ff007f --- /dev/null +++ b/apps/manacore/apps/landing/src/content/devlog/2026-01-24-guest-mode-improvements.md @@ -0,0 +1,115 @@ +--- +title: 'Guest Mode Verbesserungen für Clock & Contacts' +description: 'Session-first Guest Mode für Contacts und diverse Guest-Mode-Fixes für Clock App. Behebung von Auth-Redirect und undefined Errors.' +date: 2026-01-24 +author: 'Till Schneider' +category: 'bugfix' +tags: ['guest-mode', 'clock', 'contacts', 'session-storage', 'authentication', 'ux'] +featured: false +commits: 4 +readTime: 3 +stats: + filesChanged: 17 + linesAdded: 591 + linesRemoved: 156 +contributors: + - name: 'Till Schneider' + handle: 'Till-JS' + commits: 4 +workingHours: + start: '2026-01-24T11:00' + end: '2026-01-25T11:00' +--- + +Fokussierter Tag mit **4 Commits** zur Verbesserung des Guest-Mode-Erlebnisses: + +- **Clock Guest Mode** - Alarms/Timers ohne Auth-Redirect ladbar +- **Contacts Session-First** - Neuer Guest-Mode-Ansatz mit Session-Storage +- **Bugfixes** - undefined Error bei userSettings.nav behoben + +--- + +## Clock App Guest Mode Fixes + +Zwei kritische Fixes für das Clock App Guest-Erlebnis: + +### Alarms/Timers in Guest Mode + +```typescript +// Vorher: Daten wurden nur für eingeloggte User geladen +// Nachher: Guest Mode lädt aus localStorage +if (!session) { + // Load from localStorage for guest mode + alarms = loadAlarmsFromLocalStorage(); + timers = loadTimersFromLocalStorage(); +} +``` + +### Auth Redirect entfernt + +Das Dashboard war für Gäste unzugänglich, da ein Auth-Redirect vorhanden war: + +| Vorher | Nachher | +| -------------------- | --------------------------- | +| Redirect zu `/login` | Dashboard direkt zugänglich | +| Daten nicht geladen | LocalStorage-Fallback | + +--- + +## Contacts Session-First Guest Mode + +Neues Feature für die Contacts App: Session-first Guest Mode ermöglicht es Nutzern, die App sofort zu testen ohne Registrierung. + +### Architektur + +``` +┌─────────────────────────────────────────────────────┐ +│ Contacts App │ +├─────────────────────────────────────────────────────┤ +│ 1. Check Auth Session │ +│ ├─ Session vorhanden → Supabase-Daten laden │ +│ └─ Keine Session → SessionStorage verwenden │ +│ │ +│ 2. Guest Mode Features │ +│ ├─ Kontakte erstellen/bearbeiten │ +│ ├─ Gruppen verwalten │ +│ └─ Alles lokal gespeichert │ +│ │ +│ 3. Upgrade-Pfad │ +│ └─ Bei Registrierung: Daten zu Supabase sync │ +└─────────────────────────────────────────────────────┘ +``` + +### Implementation + +- **545 neue Zeilen** für Session-Storage-Integration +- Automatischer Sync bei späterer Registrierung +- Keine Daten gehen verloren + +--- + +## Bugfixes + +| Fix | Beschreibung | +| ---------------------------- | ---------------------------------------------- | +| `userSettings.nav undefined` | Guard für undefined userSettings in Guest Mode | +| Auth Redirect Dashboard | Entfernt für Guest-Zugänglichkeit | +| Alarms nicht geladen | LocalStorage-Fallback hinzugefügt | + +--- + +## Zusammenfassung + +| Bereich | Commits | Highlights | +| -------------------- | ------- | ----------------------- | +| **Clock Fixes** | 2 | Guest Mode funktional | +| **Contacts Feature** | 1 | Session-first Ansatz | +| **Web Fixes** | 1 | undefined Error behoben | + +--- + +## Nächste Schritte + +1. **Guest Mode für weitere Apps** ausrollen +2. **Sync-Logik** für Guest → Auth Übergang verfeinern +3. **Onboarding Flow** für Guest-Nutzer optimieren diff --git a/apps/manacore/apps/landing/src/content/devlog/2026-01-25-nutriphi-monitoring-infrastructure.md b/apps/manacore/apps/landing/src/content/devlog/2026-01-25-nutriphi-monitoring-infrastructure.md new file mode 100644 index 000000000..960706ebb --- /dev/null +++ b/apps/manacore/apps/landing/src/content/devlog/2026-01-25-nutriphi-monitoring-infrastructure.md @@ -0,0 +1,366 @@ +--- +title: 'NutriPhi App, Prometheus Monitoring & Watchtower Auto-Deploy' +description: 'AI-powered Nutrition Tracking App hinzugefügt, Prometheus Metriken für alle Backends, umfassende Grafana Dashboards, und Watchtower für automatisches Container-Deployment.' +date: 2026-01-25 +author: 'Till Schneider' +category: 'feature' +tags: + [ + 'nutriphi', + 'prometheus', + 'grafana', + 'watchtower', + 'monitoring', + 'docker', + 'ci-cd', + 'health-checks', + 'presi', + 'storage', + ] +featured: true +commits: 38 +readTime: 15 +stats: + filesChanged: 446 + linesAdded: 32534 + linesRemoved: 17786 +contributors: + - name: 'Till Schneider' + handle: 'Till-JS' + commits: 38 +workingHours: + start: '2026-01-25T11:00' + end: '2026-01-26T11:00' +--- + +Massiver Tag mit **38 Commits** und Fokus auf neue App, Monitoring und Infrastructure: + +- **NutriPhi** - AI-powered Nutrition Tracking App mit Gemini +- **Prometheus Metriken** - Für alle Backends implementiert +- **Grafana Dashboards** - Umfassende Visualisierung und Alerting +- **Watchtower** - Automatisches Docker-Image-Update auf Mac Mini +- **Presi & Storage** - Apps aus Archiv wiederhergestellt + +--- + +## NutriPhi - AI Nutrition Tracking + +Neue App für intelligentes Ernährungs-Tracking mit AI-Analyse. + +### Features + +| Feature | Beschreibung | +| --------------------- | ------------------------------------------- | +| **Foto-Analyse** | Mahlzeit fotografieren, AI erkennt Zutaten | +| **Nährwert-Tracking** | Kalorien, Makros, Mikronährstoffe | +| **Meal History** | Tägliche/wöchentliche Übersichten | +| **AI Suggestions** | Ernährungsempfehlungen basierend auf Zielen | + +### Tech Stack + +``` +┌─────────────────────────────────────────────────────┐ +│ NutriPhi │ +├──────────────┬──────────────┬───────────────────────┤ +│ Mobile │ Web │ Backend │ +│ (Expo) │ (SvelteKit) │ (NestJS) │ +├──────────────┴──────────────┴───────────────────────┤ +│ Google Gemini API │ +│ (Vision + Text Analysis) │ +└─────────────────────────────────────────────────────┘ +``` + +### Datenbankschema + +```sql +-- Haupttabellen +CREATE TABLE meals ( + id UUID PRIMARY KEY, + user_id UUID REFERENCES users(id), + name TEXT, + photo_url TEXT, + eaten_at TIMESTAMP, + calories INTEGER, + protein DECIMAL, + carbs DECIMAL, + fat DECIMAL +); + +CREATE TABLE daily_goals ( + id UUID PRIMARY KEY, + user_id UUID REFERENCES users(id), + calories_target INTEGER, + protein_target DECIMAL, + carbs_target DECIMAL, + fat_target DECIMAL +); +``` + +--- + +## Prometheus Metriken + +Monitoring-Integration für alle NestJS Backends. + +### Implementation + +```typescript +// Jedes Backend hat jetzt: +import { PrometheusModule } from '@willsoto/nestjs-prometheus'; + +@Module({ + imports: [ + PrometheusModule.register({ + defaultMetrics: { enabled: true }, + path: '/metrics', + }), + ], +}) +export class AppModule {} +``` + +### Metriken pro Backend + +| Metrik | Typ | Beschreibung | +| ------------------------------- | --------- | ------------------------ | +| `http_requests_total` | Counter | Gesamtzahl HTTP Requests | +| `http_request_duration_seconds` | Histogram | Request-Dauer | +| `http_requests_in_progress` | Gauge | Aktive Requests | +| `nodejs_heap_size_bytes` | Gauge | Memory Usage | +| `active_users_total` | Gauge | Eingeloggte User | + +### Betroffene Backends + +- mana-core-auth (Port 3001) +- chat-backend (Port 3002) +- todo-backend (Port 3004) +- clock-backend (Port 3005) +- picture-backend (Port 3006) +- zitare-backend (Port 3007) +- presi-backend (Port 3008) +- manadeck-backend (Port 3009) +- contacts-backend (Port 3010) +- calendar-backend (Port 3016) +- nutriphi-backend (Port 3027) + +--- + +## Grafana Dashboards + +Umfassende Visualisierung aller ManaCore Services. + +### Dashboard-Übersicht + +``` +┌─────────────────────────────────────────────────────┐ +│ ManaCore Monitoring │ +├─────────────────────────────────────────────────────┤ +│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ +│ │ Overview │ │ Services │ │ Alerts │ │ +│ │ Dashboard │ │ Dashboard │ │ Dashboard │ │ +│ └─────────────┘ └─────────────┘ └─────────────┘ │ +│ │ +│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ +│ │ CI/CD │ │ Docker │ │ User │ │ +│ │ Pipeline │ │ Containers │ │ Statistics │ │ +│ └─────────────┘ └─────────────┘ └─────────────┘ │ +└─────────────────────────────────────────────────────┘ +``` + +### Alerting Rules + +| Alert | Condition | Severity | +| --------------- | --------------- | -------- | +| `ServiceDown` | Up == 0 for 1m | Critical | +| `HighErrorRate` | Error rate > 5% | Warning | +| `HighLatency` | P99 > 500ms | Warning | +| `HighMemory` | Memory > 80% | Warning | + +### User Statistics Panel + +Neues Feature: User-Statistiken in Grafana anzeigen: + +```typescript +// Metrics endpoint includes active users +register.registerMetric( + new Gauge({ + name: 'manacore_active_users', + help: 'Number of active users per app', + labelNames: ['app'], + }) +); +``` + +--- + +## Watchtower Auto-Deploy + +Automatisches Container-Update bei neuen Docker Images. + +### Konfiguration + +```yaml +# docker-compose.macmini.yml +watchtower: + image: containrrr/watchtower + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - WATCHTOWER_CLEANUP=true + - WATCHTOWER_POLL_INTERVAL=300 + - WATCHTOWER_INCLUDE_STOPPED=true + command: --interval 300 +``` + +### Workflow + +``` +┌──────────────┐ ┌──────────────┐ ┌──────────────┐ +│ GitHub │────>│ GitHub │────>│ Docker │ +│ Push │ │ Actions │ │ Registry │ +└──────────────┘ └──────────────┘ └──────────────┘ + │ + ▼ +┌──────────────┐ ┌──────────────┐ ┌──────────────┐ +│ Service │<────│ Watchtower │<────│ Polling │ +│ Restart │ │ Pull │ │ (5 min) │ +└──────────────┘ └──────────────┘ └──────────────┘ +``` + +### Vorteile + +- **Zero-Downtime**: Rolling Updates +- **Automatisch**: Keine manuellen Deployments nötig +- **Cleanup**: Alte Images werden gelöscht + +--- + +## Presi & Storage Apps + +Apps aus dem Archiv wiederhergestellt und deployment-ready gemacht. + +### Presi (Präsentations-Tool) + +| Feature | Status | +| ------------- | --------------- | +| Slide Editor | ✅ Funktional | +| Export PDF | ✅ Funktional | +| Collaboration | 🚧 In Progress | +| Docker | ✅ Konfiguriert | + +### Storage (Cloud Storage) + +| Feature | Status | +| ----------------- | --------------- | +| File Upload | ✅ Funktional | +| Folder Management | ✅ Funktional | +| Sharing | 🚧 In Progress | +| Docker | ✅ Konfiguriert | + +### Deployment Config + +```yaml +# Neue Services in docker-compose.macmini.yml +presi-backend: + image: ghcr.io/till-js/presi-backend:latest + ports: + - '3008:3008' + healthcheck: + test: ['CMD', 'curl', '-f', 'http://localhost:3008/health'] + +storage-web: + image: ghcr.io/till-js/storage-web:latest + ports: + - '5185:5185' +``` + +--- + +## Health Endpoints + +Alle Web-Apps haben jetzt `/health` Endpoints für Monitoring. + +### Implementation + +```typescript +// +server.ts in jeder SvelteKit App +export async function GET() { + return json({ status: 'healthy', timestamp: new Date().toISOString() }); +} +``` + +### Betroffene Apps + +- calendar-web, clock-web, contacts-web +- chat-web, picture-web, zitare-web +- todo-web, manadeck-web, manacore-web +- presi-web, storage-web, nutriphi-web + +--- + +## CI/CD Verbesserungen + +Docker Build Jobs für neue Apps hinzugefügt. + +### Neue Workflows + +```yaml +# .github/workflows/docker-presi.yml +# .github/workflows/docker-storage.yml +# .github/workflows/docker-nutriphi.yml +``` + +### Health Check Fixes + +Mehrere Health-Check-Pfade korrigiert: + +| Service | Vorher | Nachher | +| ---------------- | ------------- | --------- | +| contacts-backend | `/api/health` | `/health` | +| mana-core-auth | `/api/health` | `/health` | +| todo-backend | `/api/health` | `/health` | +| calendar | Port 3015 | Port 3016 | + +--- + +## Infrastructure Cleanup + +Hetzner Staging-Infrastruktur entfernt zugunsten von Mac Mini Production. + +### Entfernte Dateien + +``` +scripts/hetzner/ # 15,581 Zeilen entfernt +docker-compose.staging.yml +scripts/staging-deploy.sh +``` + +### Begründung + +- Mac Mini als einziger Produktionsserver +- Keine Staging-Umgebung mehr nötig +- Kosteneinsparung + +--- + +## Zusammenfassung + +| Bereich | Commits | Highlights | +| ----------------- | ------- | ---------------------------- | +| **NutriPhi** | 2 | Neue AI Nutrition App | +| **Monitoring** | 8 | Prometheus für alle Backends | +| **Grafana** | 3 | Dashboards & Alerting | +| **Watchtower** | 6 | Auto-Deploy eingerichtet | +| **Apps Restore** | 4 | Presi & Storage reaktiviert | +| **Health Checks** | 8 | Alle Apps mit /health | +| **CI/CD** | 5 | Docker Build Jobs | +| **Fixes** | 2 | Port & Path Korrekturen | + +--- + +## Nächste Schritte + +1. **Matrix Infrastructure** für GDPR-konforme Bots +2. **NutriPhi Mobile** App fertigstellen +3. **Alerting** in Grafana aktivieren +4. **User Statistics** Dashboard erweitern diff --git a/apps/manacore/apps/landing/src/content/devlog/2026-01-27-matrix-infrastructure-self-hosting.md b/apps/manacore/apps/landing/src/content/devlog/2026-01-27-matrix-infrastructure-self-hosting.md new file mode 100644 index 000000000..795781a3f --- /dev/null +++ b/apps/manacore/apps/landing/src/content/devlog/2026-01-27-matrix-infrastructure-self-hosting.md @@ -0,0 +1,363 @@ +--- +title: 'Matrix Self-Hosting, 3 neue Bots & Chat Model Comparison' +description: 'GDPR-konforme Matrix-Infrastruktur mit Synapse, neue Stats/ProjectDoc/Ollama Bots, GuestWelcomeModal und Chat Model-Vergleichsfeature.' +date: 2026-01-27 +author: 'Till Schneider' +category: 'feature' +tags: + [ + 'matrix', + 'synapse', + 'gdpr', + 'self-hosting', + 'stats-bot', + 'project-doc-bot', + 'ollama-bot', + 'chat', + 'model-comparison', + 'guest-mode', + 'telegram-bot', + ] +featured: true +commits: 11 +readTime: 12 +stats: + filesChanged: 112 + linesAdded: 7365 + linesRemoved: 257 +contributors: + - name: 'Till Schneider' + handle: 'Till-JS' + commits: 11 +workingHours: + start: '2026-01-27T11:00' + end: '2026-01-28T11:00' +--- + +Strategischer Tag mit **11 Commits** und Fokus auf GDPR-Compliance und Developer Experience: + +- **Matrix Self-Hosting** - Eigene Synapse-Instanz für GDPR +- **3 neue Matrix Bots** - Stats, Project Doc, Ollama +- **Chat Model Comparison** - Feature zum Vergleich von AI-Modellen +- **GuestWelcomeModal** - Verbessertes Guest Onboarding +- **Cleanup** - Märchenzauber-Projekt entfernt + +--- + +## Matrix Self-Hosting für GDPR + +Eigene Matrix-Infrastruktur für GDPR-konforme Bot-Kommunikation. + +### Warum Self-Hosting? + +| Aspekt | Matrix.org | Self-Hosted | +| ----------- | ------------- | --------------- | +| Datenhoheit | ❌ US-Server | ✅ Mac Mini DE | +| GDPR | ⚠️ Fragwürdig | ✅ Voll konform | +| Latenz | ~100ms | ~10ms | +| Kosten | Kostenlos | Server-Kosten | +| Kontrolle | Keine | Volle | + +### Architektur + +``` +┌─────────────────────────────────────────────────────┐ +│ Mac Mini Server │ +├─────────────────────────────────────────────────────┤ +│ ┌─────────────┐ ┌─────────────┐ │ +│ │ Synapse │ │ PostgreSQL │ │ +│ │ (Matrix) │◄───│ Database │ │ +│ │ Port 8448 │ │ │ │ +│ └──────┬──────┘ └─────────────┘ │ +│ │ │ +│ ▼ │ +│ ┌─────────────────────────────────────────────┐ │ +│ │ Matrix Bots │ │ +│ ├──────────┬──────────┬──────────┬───────────┤ │ +│ │ Stats │ Project │ Ollama │ Clock │ │ +│ │ Bot │ Doc Bot │ Bot │ Bot │ │ +│ └──────────┴──────────┴──────────┴───────────┘ │ +└─────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────┐ +│ Element Web Client │ +│ https://element.mana.how │ +└─────────────────────────────────────────────────────┘ +``` + +### Docker Konfiguration + +```yaml +# docker-compose.matrix.yml +synapse: + image: matrixdotorg/synapse:latest + volumes: + - ./synapse-data:/data + environment: + - SYNAPSE_SERVER_NAME=matrix.mana.how + - SYNAPSE_REPORT_STATS=no + ports: + - '8448:8448' + - '8008:8008' + +postgres-matrix: + image: postgres:15 + volumes: + - ./postgres-matrix-data:/var/lib/postgresql/data +``` + +### OIDC Integration + +```yaml +# homeserver.yaml +oidc_providers: + - idp_id: manacore + idp_name: ManaCore SSO + issuer: 'https://auth.mana.how' + client_id: 'synapse' + client_secret: '${MATRIX_OIDC_SECRET}' + scopes: ['openid', 'profile', 'email'] +``` + +--- + +## Neue Matrix Bots + +### Stats Bot + +Statistiken über die ManaCore-Plattform direkt in Matrix. + +``` +!stats users - Anzahl registrierter User +!stats apps - App-Nutzungsstatistiken +!stats daily - Tägliche Aktivität +!global - Globale Plattform-Stats +``` + +**Features:** + +- Prometheus-Integration für Live-Metriken +- Grafana-Dashboard-Links +- Historische Datenanalyse + +### Project Doc Bot + +Dokumentations-Assistent für Entwickler. + +``` +!doc search - Docs durchsuchen +!doc api - API-Dokumentation +!doc setup - Setup-Anleitung +!doc claude - CLAUDE.md anzeigen +``` + +**Features:** + +- Durchsucht alle CLAUDE.md Dateien +- API-Dokumentation aus OpenAPI Specs +- Code-Beispiele mit Syntax-Highlighting + +### Ollama Bot + +Direkter Zugang zu lokalen LLMs via Matrix. + +``` +!llm - Prompt an Standard-Modell +!llm model - Modell wechseln +!llm list - Verfügbare Modelle +!code - Code-optimiertes Modell +``` + +**Verfügbare Modelle:** + +- gemma3:4b, gemma3:12b +- llama3.2:3b, llama3.2:11b +- codellama:13b +- mistral:7b + +--- + +## Chat Model Comparison + +Neues Feature: Vergleiche Antworten verschiedener AI-Modelle. + +### UI Design + +``` +┌─────────────────────────────────────────────────────┐ +│ Model Comparison Mode [Toggle] │ +├─────────────────────────────────────────────────────┤ +│ ┌──────────────────┐ ┌──────────────────┐ │ +│ │ GPT-4 Turbo │ │ Claude 3.5 │ │ +│ │ │ │ │ │ +│ │ Response A │ │ Response B │ │ +│ │ │ │ │ │ +│ └──────────────────┘ └──────────────────┘ │ +│ │ +│ ┌──────────────────┐ ┌──────────────────┐ │ +│ │ Gemini Pro │ │ Ollama Local │ │ +│ │ │ │ │ │ +│ │ Response C │ │ Response D │ │ +│ │ │ │ │ │ +│ └──────────────────┘ └──────────────────┘ │ +└─────────────────────────────────────────────────────┘ +``` + +### Implementation + +```typescript +// apps/chat/apps/web/src/lib/components/ModelComparison.svelte + +``` + +--- + +## GuestWelcomeModal + +Verbessertes Onboarding für Guest-Nutzer. + +### Features + +| Feature | Beschreibung | +| ---------------------- | -------------------------------------- | +| **Intro Animation** | Kurze Vorstellung der App | +| **Feature Highlights** | Was ist ohne Login möglich | +| **Upgrade CTA** | Prominenter "Account erstellen" Button | +| **Skip Option** | "Als Gast fortfahren" | + +### Design + +```svelte + + +

Willkommen bei {appName}!

+ +

Du kannst die App auch ohne Account nutzen.

+ +
    +
  • ✅ {guestFeature1}
  • +
  • ✅ {guestFeature2}
  • +
  • ❌ {authOnlyFeature}
  • +
+ +
+ + +
+
+``` + +--- + +## Telegram Bot Improvements + +Local STT Support und Prometheus Metriken. + +### Speech-to-Text + +```typescript +// Vorher: Nur Cloud STT +// Nachher: Lokale Whisper-Instanz +const sttService = new LocalSTTService({ + model: 'whisper-large-v3', + device: 'cuda', // GPU-beschleunigt +}); +``` + +### Metriken + +```typescript +// Neue Prometheus Metriken +register.registerMetric( + new Counter({ + name: 'telegram_messages_total', + help: 'Total Telegram messages processed', + labelNames: ['type'], // text, voice, image + }) +); + +register.registerMetric( + new Histogram({ + name: 'telegram_stt_duration_seconds', + help: 'STT processing time', + }) +); +``` + +--- + +## Cleanup: Märchenzauber entfernt + +Das Märchenzauber-Projekt wurde aus der Codebase entfernt. + +### Entfernte Dateien + +``` +apps-archived/maerchenzauber/ # Komplett entfernt +- 11 Dateien +- 231 Zeilen +``` + +### Begründung + +- Projekt nicht mehr aktiv entwickelt +- Ressourcen auf aktive Apps fokussieren +- Archiv-Ordner wurde zu groß + +--- + +## Developer Experience Verbesserungen + +Lokale Entwicklung wurde verbessert. + +### Neue Scripts + +```json +{ + "dev:matrix": "docker-compose -f docker-compose.matrix.yml up -d", + "dev:stats-bot": "pnpm --filter @matrix/stats-bot dev", + "dev:doc-bot": "pnpm --filter @matrix/project-doc-bot dev" +} +``` + +### Health Check Fixes + +| Service | Fix | +| ------------- | ------------------------ | +| presi-backend | Korrekter `/health` Pfad | + +--- + +## Zusammenfassung + +| Bereich | Commits | Highlights | +| ---------------- | ------- | ---------------------- | +| **Matrix Infra** | 2 | Self-Hosted Synapse | +| **Matrix Bots** | 3 | Stats, Doc, Ollama | +| **Chat** | 1 | Model Comparison | +| **Guest UX** | 1 | Welcome Modal | +| **Telegram** | 1 | Local STT + Metrics | +| **Cleanup** | 1 | Märchenzauber entfernt | +| **Fixes** | 2 | Health Checks | + +--- + +## Nächste Schritte + +1. **Element Web** auf eigenem Server deployen +2. **E2EE** für Matrix-Räume aktivieren +3. **Voice Messages** in Matrix Bots +4. **Bot-to-Bot** Kommunikation für komplexe Workflows diff --git a/apps/manacore/apps/landing/src/content/devlog/2026-02-14-matrix-stt-bot-gift-codes-onboarding.md b/apps/manacore/apps/landing/src/content/devlog/2026-02-14-matrix-stt-bot-gift-codes-onboarding.md new file mode 100644 index 000000000..d63c2603a --- /dev/null +++ b/apps/manacore/apps/landing/src/content/devlog/2026-02-14-matrix-stt-bot-gift-codes-onboarding.md @@ -0,0 +1,466 @@ +--- +title: 'Matrix STT Bot, Gift Code UI & Onboarding Bot' +description: 'Speech-to-Text Bot für Matrix, Gift Code Web-Interface, Clock Bot Timer-Progress, Onboarding Bot für Profil-Setup und umfangreiche Bot-Fixes.' +date: 2026-02-14 +author: 'Till Schneider' +category: 'feature' +tags: + [ + 'matrix', + 'stt', + 'speech-to-text', + 'gift-codes', + 'onboarding', + 'clock-bot', + 'timer', + 'tts', + 'german-voice', + 'emoji-picker', + 'nutriphi', + 'stats-bot', + ] +featured: true +commits: 56 +readTime: 18 +stats: + filesChanged: 182 + linesAdded: 9285 + linesRemoved: 2431 +contributors: + - name: 'Till Schneider' + handle: 'Till-JS' + commits: 56 +workingHours: + start: '2026-02-14T11:00' + end: '2026-02-15T11:00' +--- + +Produktiver Valentinstag mit **56 Commits** und vielen neuen Features: + +- **Matrix STT Bot** - Speech-to-Text direkt in Matrix +- **Gift Code UI** - Web-Interface für Geschenkcode-Verwaltung +- **Onboarding Bot** - Matrix Bot für Profil-Setup +- **Clock Bot Timer** - Live Progress mit Message Editing +- **TTS German Voice** - Kerstin als neue deutsche Stimme +- **Emoji Picker** - Recently Used + WhatsApp-Style Input + +--- + +## Matrix STT Bot + +Neuer Bot für Speech-to-Text-Transkription in Matrix. + +### Features + +| Feature | Beschreibung | +| ------------------- | -------------------------- | +| **Voice Messages** | Automatische Transkription | +| **Multi-Language** | Deutsch, Englisch, weitere | +| **Inline Response** | Transkription als Reply | +| **High Accuracy** | Whisper Large V3 | + +### Architektur + +``` +┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ +│ Matrix Room │────>│ STT Bot │────>│ mana-stt │ +│ (Voice Msg) │ │ (Port 3340) │ │ (Whisper) │ +└─────────────────┘ └─────────────────┘ └─────────────────┘ + │ │ │ + │ ▼ │ + │ ┌─────────────────┐ │ + │ │ Transcription │<────────────┘ + │ │ Result │ + │ └────────┬────────┘ + │ │ + ▼ ▼ +┌─────────────────────────────────────────┐ +│ Matrix Room: Reply with Transcription │ +└─────────────────────────────────────────┘ +``` + +### Dockerfile Pattern + +```dockerfile +# Gleiche Struktur wie TTS Bot +FROM node:20-alpine AS builder +WORKDIR /app +COPY package.json pnpm-lock.yaml ./ +RUN corepack enable && pnpm install --frozen-lockfile + +COPY . . +RUN pnpm build + +FROM node:20-alpine +WORKDIR /app +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/node_modules ./node_modules +CMD ["node", "dist/main.js"] +``` + +--- + +## Gift Code Web UI + +Web-Interface für Geschenkcode-Einlösung und Verwaltung. + +### Benutzer-Interface + +``` +┌─────────────────────────────────────────────────────┐ +│ 🎁 Geschenkcode einlösen │ +├─────────────────────────────────────────────────────┤ +│ │ +│ ┌──────────────────────────────────────────────┐ │ +│ │ CODE-XXXX-XXXX-XXXX │ │ +│ └──────────────────────────────────────────────┘ │ +│ │ +│ [ Einlösen ] │ +│ │ +├─────────────────────────────────────────────────────┤ +│ Meine eingelösten Codes: │ +│ ✅ 500 Credits - 14.02.2026 │ +│ ✅ Pro Subscription 1 Month - 01.02.2026 │ +└─────────────────────────────────────────────────────┘ +``` + +### API Endpoints + +| Endpoint | Method | Beschreibung | +| ----------------------- | ------ | ----------------------- | +| `/api/gifts/redeem` | POST | Code einlösen | +| `/api/gifts/me` | GET | Eigene eingelöste Codes | +| `/api/gifts/me/history` | GET | Einlöse-Historie | + +### Gift Types + +```typescript +type GiftType = + | 'credits' // Direkte Credits + | 'subscription' // Abo-Zeit + | 'first_come' // Begrenzte Anzahl + | 'unlimited'; // Unbegrenzt einlösbar +``` + +### Bugfixes + +- `userId undefined` - Guard verwendet `userId`, Controller erwartete `sub` +- Duplicate Claim Check für `first_come` Type +- Nullable Fields explizit auf `null` gesetzt für Drizzle + +--- + +## Onboarding Bot + +Matrix Bot für geführtes Profil-Setup neuer Nutzer. + +### Onboarding Flow + +``` +┌─────────────────────────────────────────────────────┐ +│ Onboarding Bot Flow │ +├─────────────────────────────────────────────────────┤ +│ │ +│ 1. 👋 Willkommen! Wie heißt du? │ +│ └─ User: "Max" │ +│ │ +│ 2. 📸 Möchtest du ein Profilbild hochladen? │ +│ └─ User: [Bild] oder "Überspringen" │ +│ │ +│ 3. 🎂 Wann hast du Geburtstag? │ +│ └─ User: "15.03.1990" │ +│ │ +│ 4. 🌍 Welche Sprache bevorzugst du? │ +│ └─ User: "Deutsch" │ +│ │ +│ 5. ✅ Profil komplett! Viel Spaß! │ +│ │ +└─────────────────────────────────────────────────────┘ +``` + +### State Machine + +```typescript +enum OnboardingState { + WELCOME = 'welcome', + NAME = 'name', + AVATAR = 'avatar', + BIRTHDAY = 'birthday', + LANGUAGE = 'language', + COMPLETE = 'complete', +} + +// Transitions +const transitions = { + [OnboardingState.WELCOME]: OnboardingState.NAME, + [OnboardingState.NAME]: OnboardingState.AVATAR, + [OnboardingState.AVATAR]: OnboardingState.BIRTHDAY, + [OnboardingState.BIRTHDAY]: OnboardingState.LANGUAGE, + [OnboardingState.LANGUAGE]: OnboardingState.COMPLETE, +}; +``` + +--- + +## Clock Bot Timer Progress + +Live-Timer mit Message-Editing für Echtzeit-Updates. + +### Feature + +``` +Timer gestartet: 5 Minuten + +┌────────────────────────────────┐ +│ ⏱️ Timer │ +│ ████████░░░░░░░░░░ 3:42 │ +│ │ +│ Verbleibend: 3 Minuten 42 Sek │ +└────────────────────────────────┘ +``` + +### Room Topic Updates + +Timer-Status wird auch im Room Topic angezeigt: + +```typescript +// Phase 3: Room Topic Integration +async function updateRoomTopic(roomId: string, timerStatus: string) { + await client.sendStateEvent(roomId, 'm.room.topic', '', { + topic: `⏱️ ${timerStatus}`, + }); +} +``` + +### Widget Styling + +Optimiert für Element Info Panel: + +```css +/* Kompaktes Layout für Widget */ +.timer-widget { + padding: 8px; + font-size: 14px; + background: var(--element-bg); +} +``` + +--- + +## TTS German Voice + +Neue deutsche Stimme "Kerstin" für natürlichere Sprachausgabe. + +### Verfügbare Stimmen + +| Voice | Language | Gender | Engine | +| ------------- | -------- | ------ | ------ | +| `de_kerstin` | Deutsch | Female | Piper | +| `de_thorsten` | Deutsch | Male | Piper | +| `en_amy` | English | Female | Piper | + +### Auto-Endpoint + +```typescript +// /synthesize/auto wählt automatisch passende Stimme +POST /synthesize/auto +{ + "text": "Hallo, wie geht es dir?", + // Automatisch: de_kerstin (erkannt: Deutsch) +} +``` + +### WAV Format + +Für bessere Matrix-Kompatibilität auf WAV gewechselt: + +```typescript +// Vorher: MP3 (Probleme mit Element) +// Nachher: WAV (native Unterstützung) +const format = 'wav'; +``` + +--- + +## Emoji Picker Improvements + +WhatsApp-Style Input und Recently Used Emojis. + +### Recently Used + +``` +┌─────────────────────────────────────────────────────┐ +│ Kürzlich verwendet: │ +│ 😀 😂 ❤️ 👍 🎉 🔥 💯 ✨ │ +├─────────────────────────────────────────────────────┤ +│ Smileys & Menschen: │ +│ 😀 😃 😄 😁 😆 😅 🤣 😂 ... │ +└─────────────────────────────────────────────────────┘ +``` + +### Cross-App Sync + +Recently Used Emojis werden über mana-core-auth synchronisiert: + +```typescript +// API Endpoint +GET / api / users / me / preferences / emojis; +POST / api / users / me / preferences / emojis; +``` + +### WhatsApp-Style Input + +```svelte +
+ +