Commit graph

1277 commits

Author SHA1 Message Date
Till-JS
5025bfa883 fix(clock-bot): optimize widget styling for Element info panel
- Use transparent background to adapt to Element theme
- Remove min-height and centering (content starts at top)
- Reduce font sizes and spacing for compact display
- Use semi-transparent backgrounds for theme compatibility
- Add flex-wrap for narrow panels

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:46:19 +01:00
Till-JS
0a41640c19 chore(onboarding-bot): add bot user creation script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:43:29 +01:00
Till-JS
a6fc1cb66e feat(onboarding): add Matrix onboarding bot for profile setup
- Add matrix-onboarding-bot service that guides users through profile setup
- Extend mana-core-auth GlobalSettings with displayName, interests, onboardingCompleted fields
- Implement state machine for onboarding flow (NAME → INTERESTS → LANGUAGE → SUMMARY)
- Support commands: !start, !profile, !edit, !skip, !help
- Add German and English localization
- Integrate with mana-core-auth Settings API for profile persistence

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:42:41 +01:00
Till-JS
531ed3e215 📝 docs(nutriphi): update Gemini model version to 2.5 Flash
- Updated Technology Stack to reflect gemini-2.5-flash model
- Added note about getting API key from Google AI Studio

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:41:32 +01:00
Till-JS
e4ac539495 chore: update pnpm-lock.yaml for clock-bot @types/express
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:39:16 +01:00
Till-JS
c13c313886 🐛 fix(gifts): reorder controller routes to fix 'me/*' matching
NestJS matches routes in declaration order. The dynamic :code route was
matching before me/created and me/received, treating 'me' as a gift code.
Moved specific routes before the dynamic parameter route.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:38:23 +01:00
Till-JS
b1eaa88e6e 📝 docs(stats-bot): add Redis and Matrix-SSO-Link environment variables
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:35:15 +01:00
Till-JS
07ac2e845e 🔧 fix(stats-bot): add Redis and Matrix-SSO-Link for auto-login
- Add REDIS_HOST, REDIS_PASSWORD for session storage
- Add MANA_CORE_AUTH_URL, MANA_CORE_SERVICE_KEY for Matrix-SSO-Link
- Add redis dependency to depends_on
- Use local image build instead of GHCR

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:31:35 +01:00
Till-JS
139c04040d refactor(stats-bot): swap commands - !stats for personal, !global for global
- !stats now shows personal stats (requires login)
- !global now shows global Umami analytics
- Update keywords and help text accordingly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:26:52 +01:00
Till-JS
12451092f1 📝 docs(tts): document German voice support (Piper/Kerstin)
- Add Piper TTS section to mana-tts CLAUDE.md
- Document available German voices (local and cloud)
- Update matrix-tts-bot CLAUDE.md with new default voice
- Add language auto-detection documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:21:40 +01:00
Till-JS
209a474f17 🩹 fix(gifts): add duplicate claim check to first_come type
Users can now only redeem first_come gift codes once, making it
suitable for promo codes that should be unlimited but once per user.
2026-02-14 12:19:43 +01:00
Till-JS
acf4512e90 fix(session): add auto-refresh for expired JWT tokens
- Add isTokenValid() to decode JWT and check exp claim
- Refresh tokens 60 seconds before expiry (buffer)
- Auto-fetch fresh token via SSO-Link when cached token expires
- Clear invalid sessions when refresh fails
- Prevents "exp claim timestamp check failed" errors

JWT tokens from mana-core-auth expire after 15 minutes, but sessions
were cached for 7 days. Now tokens are transparently refreshed when
they expire, keeping users authenticated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:19:08 +01:00
Till-JS
4b950b7083 feat(tts): add de_kerstin female German voice and set as default
- Download and configure Kerstin Piper voice (63MB, local)
- Update piper_service.py to support multiple voice models
- Set de_kerstin as default voice for TTS bot
- Update help text with new voice options

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:16:58 +01:00
Till-JS
01b011235f 🩹 fix(mana-tts): add Piper/German voice support to /synthesize/auto endpoint
The auto endpoint now properly routes German voices (de_thorsten, de_katja, etc.)
to Piper TTS instead of falling back to English Kokoro voices.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:08:17 +01:00
Till-JS
5af965ea90 feat(clock-bot): add live timer progress with message editing
- Add editMessage() method to BaseMatrixService for Matrix message editing
- Implement live timer updates every 10 seconds using background interval
- Display progress bar using Unicode block characters (█░)
- Track active timers and update messages with current state
- Show percentage completion and remaining time
- Handle timer pause/resume/finish states
- Clean up tracking on timer completion or errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:07:28 +01:00
Till-JS
c221f92da2 🩹 fix(nutriphi): update Gemini model from expired gemini-2.0-flash-exp to gemini-2.5-flash
The experimental model gemini-2.0-flash-exp no longer exists. Updated to
the stable gemini-2.5-flash model.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:06:40 +01:00
Till-JS
a4ef703761 feat(manacore): add gift code web UI
Add web interface for redeeming and managing gift codes:
- API service for all gift operations (create, redeem, list, cancel)
- Public preview page at /g/[code] for gift info before login
- Protected redemption flow with riddle support
- Dashboard with tabs: received gifts, created codes, create new
- Gift icon added to navigation and shared-ui
2026-02-14 12:01:24 +01:00
Till-JS
acd8d02ec8 🔧 fix(clock-bot): use local build with SSO-Link auth
- Switch from GHCR image to local build
- Add MANA_CORE_AUTH_URL, MANA_CORE_SERVICE_KEY for SSO-Link
- Add Redis config for session storage
- Add dependencies on mana-auth and redis

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:57:53 +01:00
Till-JS
0099e1eebc chore(matrix-tts-bot): set German (de_thorsten) as default voice
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:55:47 +01:00
Till-JS
67f3d3020a fix(matrix-tts-bot): use /synthesize/auto endpoint for German voices
The /synthesize/piper endpoint doesn't exist - use /synthesize/auto
which automatically routes to the correct TTS backend based on voice.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:30:37 +01:00
Till-JS
2521a1ea73 feat(matrix): sync recent emojis across apps via mana-core-auth
- Add recentEmojis field to GlobalSettings in shared-theme
- Create userSettings store for Matrix app with JWT token management
- Exchange session cookie for JWT after SSO login
- Update MessageInput to use userSettings instead of localStorage
- Add recentEmojis support to mana-core-auth settings API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:30:17 +01:00
Till-JS
83c75ce90e 🩹 fix(nutriphi-bot): use correct API field name for image analysis
Change 'image' to 'imageBase64' to match the NutriPhi backend API spec.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:28:46 +01:00
Till-JS
d81b8aebf2 🔒 refactor(bots): remove !login command and enforce OIDC-only auth
- Remove !login and !logout commands from all 16+ Matrix bots
- Remove login/logout references from all help/welcome messages
- Disable password login in Synapse (password_config.enabled: false)
- System is now OIDC-only via Mana Core authentication

Users must authenticate via "Sign in with Mana Core" in Element.
Existing bot access tokens remain valid.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:26:58 +01:00
Till-JS
c698318c91 chore(deploy): add PROMETHEUS_URL to stats-bot config
Connect stats-bot to VictoriaMetrics for infrastructure
monitoring commands (!system, !services, !traffic, !db, !growth)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:25:18 +01:00
Till-JS
bd7f19718c feat(stats-bot): add infrastructure monitoring commands
Add 5 new commands powered by Prometheus/VictoriaMetrics:
- !system: Mac Mini status (CPU, RAM, Disk, Uptime, Load)
- !services: Backend service health (UP/DOWN)
- !traffic: HTTP traffic & latency per service
- !db: PostgreSQL & Redis status
- !growth: User growth statistics

New modules:
- PrometheusService: Query Prometheus/VictoriaMetrics API
- InfrastructureService: Generate infrastructure reports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:24:31 +01:00
Till-JS
e88597cd20 feat(gifts): add gift code creation script and initial codes
- Add create-gift-codes.mjs script for batch gift code generation
- Create 10 gift codes with 1000 Mana each for distribution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:23:08 +01:00
Till-JS
4a26926fae 🩹 fix(bot-services): export LOGIN_MESSAGES and auth error helpers
Export the following from @manacore/bot-services:
- LOGIN_MESSAGES: Pre-defined auth error messages for all bot types
- AUTH_ERROR_MESSAGES: Same as LOGIN_MESSAGES (preferred name)
- formatAuthErrorMessage(): Helper to create custom auth error messages

These are used by bots to show consistent error messages when token
refresh fails and the user needs to re-authenticate.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:19:55 +01:00
Till-JS
ff1affb268 🩹 fix(nutriphi-bot): add automatic token refresh on JWT expiration
When the JWT token expires (15 min), the bot now automatically:
1. Detects the 401 "exp claim" error
2. Clears the expired session
3. Attempts to fetch a new token via Matrix-SSO-Link
4. Retries the failed operation with the new token

This prevents users from getting authentication errors after 15 minutes
of inactivity.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:18:19 +01:00
Till-JS
c843531595 feat(analytics): update Umami tracking IDs for all web apps
Update all 15 web apps with correct Umami website IDs:
- calendar, chat, clock, contacts, manacore, manadeck, picture, planta, todo: updated IDs
- zitare, storage, nutriphi, skilltree, photos, presi: added tracking

All IDs now match the websites configured in Umami.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:14:16 +01:00
Till-JS
0f234a0ce6 fix(matrix-tts-bot): use WAV format for better Matrix compatibility
MP3 format was causing "no supported sources" error in Element.
Switch to WAV which has broader browser/client support.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:09:56 +01:00
Till-JS
aff2db9f9c feat(matrix): add recently used emojis section in emoji picker
- Store recently used emojis in localStorage (max 16 = 2 rows)
- Display "Häufig benutzt" section at top of emoji picker
- Most recently used emoji moves to front of list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:08:31 +01:00
Till-JS
e013384d29 chore(docker): build matrix-tts-bot locally instead of from registry
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:04:44 +01:00
Till-JS
fa7fb3c294 🩹 fix(matrix-bots): use authenticated media download for all bots
The Matrix Media API now requires authentication (spec v1.11+). Updated
all 5 affected bots to use downloadMedia() from BaseMatrixService which
handles authenticated downloads via /_matrix/client/v1/media/download/.

Affected bots:
- matrix-nutriphi-bot (images + audio)
- matrix-zitare-bot (audio)
- matrix-todo-bot (audio)
- matrix-ollama-bot (images)
- matrix-project-doc-bot (images + audio)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:04:13 +01:00
Till-JS
70e45ed82e fix(matrix-stats-bot): adapt to Umami v2 API response format
The Umami API returns stats in a different format than expected:
- Before: { pageviews: { value, change } }
- After: { pageviews: number, comparison: { pageviews: number } }

Transform the raw API response to the expected format and calculate
percentage change from comparison values.

Also update URL_SCHEMA.md with complete list of all mana.how services.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:03:03 +01:00
Till-JS
5e01c833ce feat(matrix): improve chat UI with WhatsApp-style input and emoji picker
- Hide empty DM/room sections in sidebar when no messages available
- Redesign message input to WhatsApp style (attachment left, emoji in field, mic right)
- Add emoji picker with native mobile fallback and desktop grid picker
- Use Phosphor icon size prop for consistent rendering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:02:36 +01:00
Till-JS
1c9c2301a5 fix(matrix-tts-bot): add API key authentication for mana-tts service
- Add TTS_API_KEY config option to configuration.ts
- Send X-API-Key header in TtsService requests
- Update docker-compose.macmini.yml with TTS_INTERNAL_API_KEY env var
- Update .env.example and CLAUDE.md documentation

The mana-tts service requires authentication, but the TTS bot was not
sending the required X-API-Key header, causing 401 errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 10:59:08 +01:00
Till-JS
7c0bc735b9 feat(matrix): add drag & drop file upload to chat
- Add DropZoneOverlay component with visual feedback
- Implement drag events on desktop and mobile chat pages
- Support multi-file upload (files uploaded sequentially)
- Show overlay only when a chat room is selected

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 10:55:13 +01:00
Till-JS
40a3c89852 📝 docs(devlog): add devlogs for Feb 12 and Feb 13
- Feb 12: GDPR Self-Service, Matrix Mobile UX, Mac Mini Stability
- Feb 13: Gift Codes, Stripe Integration, Zitare Deployment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 00:02:53 +01:00
Till-JS
284cd004aa 🩹 fix(auth): fix gift code route prefix and JWT issuer validation
- Remove duplicate route prefix in GiftsController (was /api/v1/api/v1/gifts)
- Fix JwtAuthGuard to use JWT_ISSUER as fallback when BASE_URL is not set
- Add comprehensive GIFT_CODES.md documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 23:54:36 +01:00
Till-JS
0485ce4b07 🩹 fix(auth): correct healthcheck endpoint path
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 23:48:45 +01:00
Till-JS
9d7768495d 🔧 fix(auth): add build tools for bcrypt native module 2026-02-13 23:41:35 +01:00
Till-JS
0701635edb 🔧 fix(auth): update Dockerfile for workspace dependencies
Add shared-storage package to Docker build context to resolve
workspace dependency.
2026-02-13 23:36:56 +01:00
Till-JS
9bfc20b8d5 🎨 refactor(shared-ui): improve LoginPage and InputBar components 2026-02-13 23:29:56 +01:00
Till-JS
ceebb5dda6 feat(zitare): add settings store and i18n updates 2026-02-13 23:29:50 +01:00
Till-JS
702a30b699 feat(todo): add settings store and improve layout 2026-02-13 23:29:45 +01:00
Till-JS
72ee715300 feat(manacore): enhance API keys management UI 2026-02-13 23:29:41 +01:00
Till-JS
087d34c552 feat(matrix-bots): enhance stats and todo bots
- Add credit commands to todo-bot
- Enhance stats-bot with improved metrics
- Add Umami analytics improvements
2026-02-13 23:29:36 +01:00
Till-JS
e8c3b97f8f feat(auth): add gift codes and enhanced credit system
- Add gift code creation, redemption, and refund endpoints
- Add Stripe payment link generation for credits
- Add gifts database schema
- Enhance credits controller with new operations
2026-02-13 23:29:30 +01:00
Till-JS
962b942e2a feat(bot-services): add credit and gift services for Matrix bots
- Add CreditService with balance checking and consumption
- Add GiftService for gift code creation and redemption
- Add i18n support for credit/gift messages (DE/EN)
- Add Matrix bot mixins for credit and gift commands
2026-02-13 23:29:21 +01:00
Till-JS
92c6dc83ee fix(nutriphi-bot): remove missing media-client dependency 2026-02-13 23:22:29 +01:00