Commit graph

827 commits

Author SHA1 Message Date
Claude
370b5d3196
fix(matrix-mana-bot): correct service method calls and add deploy script
- Fix AiHandler to use correct service methods:
  - setSessionModel instead of setModel
  - clearSessionHistory instead of clearHistory
  - compareModels for model comparison
- Fix TodoHandler to use index-based methods:
  - completeTaskByIndex instead of completeTask
  - deleteTaskByIndex instead of deleteTask
- Add deploy-mana-bot.sh script for full deployment automation

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:42:50 +00:00
Claude
e96d76ab8e
feat(infra): integrate matrix-mana-bot into deployment
- Add matrix-mana-bot to docker-compose.macmini.yml
- Add setup-mana-bot.sh script for bot registration
- Add dev:matrix:* scripts to root package.json
- Add devlog entry documenting the new architecture

The gateway bot is now ready for deployment alongside
the existing standalone Matrix bots.

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:37:38 +00:00
Claude
2d879b327e
feat(services): add matrix-mana-bot unified gateway
Introduces a unified Matrix bot that combines all features:
- AI Chat (Ollama integration)
- Todo management
- Calendar events
- Timers & Alarms
- Cross-feature orchestration (!summary, !ai-todo)

Architecture:
- Uses @manacore/bot-services for shared business logic
- Command router with natural language support
- Handlers delegate to shared services
- Orchestration layer for cross-feature AI features

This enables users to interact with a single bot for all features,
while standalone bots remain available for dedicated use cases.

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:23:46 +00:00
Claude
68a6c7a8d6
feat(packages): add @manacore/bot-services shared package
Introduces a new shared package containing transport-agnostic business
logic services for Matrix bots and the Gateway. This enables:

- Individual bots to import shared services
- A unified Gateway bot to combine all features
- Code reuse without duplication

Services included:
- TodoService: Task management with projects, priorities, dates
- CalendarService: Events, calendars, reminders
- AiService: Ollama LLM integration, chat sessions, vision
- ClockService: Timers, alarms, world clocks (API client)
- Placeholder modules for Nutrition, Quotes, Stats, Docs

Key features:
- Pluggable storage providers (file-based, in-memory, custom)
- German natural language input parsing
- NestJS module system with dependency injection
- Fully testable in isolation

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:07:32 +00:00
Till-JS
bea066c7f8 fix(auth): correct JWKS route mapping for OIDC
JWKS is at /api/auth/jwks, not /api/auth/oauth2/jwks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:13:28 +01:00
Till-JS
f6382ead87 fix(auth): map OIDC routes to Better Auth's /api/auth/oauth2/* paths
Better Auth's OIDC Provider plugin uses routes under /api/auth/oauth2/
rather than /api/oidc/. This commit maps incoming routes correctly:
- /.well-known/openid-configuration → /api/auth/.well-known/openid-configuration
- /api/oidc/* → /api/auth/oauth2/*

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:10:41 +01:00
Till-JS
ef7f906215 debug(auth): add OIDC request logging
Add console.log statements to debug OIDC routing issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:05:45 +01:00
Till-JS
e2a3277fa1 feat(matrix-clock-bot): add Matrix bot for time tracking
- Add Docker build configuration with npm overrides for matrix-sdk
- Update port from 3317 to 3318 to avoid conflict with Zitare bot
- Add tsconfig.build.json for production builds
- Add clock-bot service to docker-compose.macmini.yml
- Bot supports timers, alarms, and world clocks via Matrix chat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:04:45 +01:00
Till-JS
9a7afea7fe fix(auth): use object syntax for global prefix excludes
Use { path, method } syntax for NestJS global prefix excludes to ensure
OIDC routes (.well-known/*, api/oidc/*) are properly excluded from the
/api/v1 prefix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:52:27 +01:00
Till-JS
00d28bc522 feat(auth): add OIDC Controller for Matrix SSO endpoints
- Add OidcController to expose Better Auth OIDC Provider endpoints
- Add handleOidcRequest method to BetterAuthService
- Exclude OIDC routes from global /api/v1 prefix
- Register OidcController in AuthModule

Endpoints:
- GET /.well-known/openid-configuration
- GET /api/oidc/authorize
- POST /api/oidc/token
- GET /api/oidc/userinfo
- GET /api/oidc/jwks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:49:26 +01:00
Till-JS
577b96156c 🔧 chore: update pnpm-lock.yaml for matrix-zitare-bot 2026-01-28 16:46:58 +01:00
Till-JS
a532790d99 feat(matrix-zitare-bot): add Matrix bot for daily inspiration quotes
Features:
- Random quotes and daily quote of the day
- 10 categories (motivation, wisdom, love, life, success, etc.)
- Search functionality
- Login integration with Zitare backend
- Favorites and lists management
- Voice note transcription via mana-stt
- Natural language command support (German/English)
2026-01-28 16:45:11 +01:00
Till-JS
29595a9d3d chore(matrix): add SYNAPSE_OIDC_CLIENT_SECRET env var
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:43:21 +01:00
Till-JS
158aaf7e67 feat(auth): add OIDC Provider for Matrix SSO integration
- Add OIDC Provider plugin to Better Auth configuration
- Add OIDC database tables (oauth_applications, oauth_access_tokens,
  oauth_authorization_codes, oauth_consents)
- Configure Synapse as OIDC client in homeserver.yaml
- Update Element Web config for SSO support
- Add seed script for OIDC clients (db:seed:oidc)
- Update Cloudflare tunnel config with Matrix URLs

This enables Single Sign-On between Mana Core Auth and Matrix/Synapse,
allowing users to authenticate via their existing Mana account.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:40:33 +01:00
Till-JS
dbd14f7134 feat(matrix-clock-bot): add Matrix bot for time tracking
Features:
- Timer commands: !timer 25m, !stop, !resume, !reset, !status
- Alarm commands: !alarm 07:30, !alarms
- World clock: !zeit, !weltuhr Berlin, !weltuhren
- Voice note support via mana-stt transcription
- Natural language parsing for German time formats
2026-01-28 16:27:49 +01:00
Till-JS
bd10762107 🙈 chore: add Python and ML model files to gitignore 2026-01-28 16:15:01 +01:00
Till-JS
1f5df44cb0 🙈 chore(matrix-nutriphi-bot): add dockerignore 2026-01-28 16:13:32 +01:00
Till-JS
1e9169cb94 📝 docs(landing): add devlog for telegram/matrix bots integration 2026-01-28 16:13:24 +01:00
Till-JS
ff427b1625 📝 docs(todo): update commit hash in cleanup plan 2026-01-28 16:13:15 +01:00
Till-JS
3b9d99ccd9 feat(matrix-bots): add voice note transcription via mana-stt
- Switch matrix-project-doc-bot from OpenAI Whisper to local mana-stt
- Add voice note support to matrix-nutriphi-bot (auto-analyze meals)
- Add voice note support to matrix-todo-bot (create todos via voice)
- All bots now use STT_URL config for the mana-stt service (port 3020)
2026-01-28 16:10:20 +01:00
Till-JS
57b9d4cb37 feat(matrix-nutriphi-bot): add Matrix bot for nutrition tracking
- NestJS bot with matrix-bot-sdk integration
- Commands: !help, !login, !analyze, !today, !week, !goals, !favorites, !tips
- Integrates with NutriPhi backend API (port 3023)
- User session management with JWT authentication
- Image analysis via Gemini AI (NutriPhi backend)
- Port 3316

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:57:49 +01:00
Till-JS
111fc473d9 🐛 fix(auth): implement password reset email link handler
- Add GET /api/auth/reset-password/:token endpoint to handle email links
- Create password-reset-redirect store to track source app URLs
- Include callbackURL in reset emails for proper app redirection
- Add redirectTo parameter to forgotPassword in shared-auth
- Create /reset-password page in calendar app with DE/EN translations
- Update calendar authStore with resetPasswordWithToken method

Fixes 404 error when clicking password reset link from email
2026-01-28 15:49:33 +01:00
Till-JS
2c341b5328 feat(matrix): add Matrix Todo Bot service
GDPR-compliant task management bot for Matrix with:
- Task CRUD: !add, !list, !done, !delete
- Priority support: !p1 to !p4
- Date shortcuts: @heute, @morgen, @übermorgen
- Project tags: #projektname
- Natural language keywords: hilfe, zeige aufgaben, heute
- Welcome messages and auto-pin help on room join
- Per-user task isolation via Matrix user ID
- Local JSON storage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:47:33 +01:00
Till-JS
3389252d3a fix(todo-web): remove localhost fallbacks triggering local network permission
- Remove localhost:3018 pattern from service worker cache strategies
- Update auth store to only use localhost fallback in development mode
- Bump service worker cache version to v3 to force update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:33:36 +01:00
Till-JS
4fa8608744 🔧 chore: add nutriphi to cloudflare tunnel config 2026-01-28 15:31:39 +01:00
Till-JS
c031540ef1 🚀 ci(nutriphi): add production deployment configuration
- Add backend Dockerfile with multi-stage build and health checks
- Add web Dockerfile with SvelteKit static env vars
- Add docker-entrypoint.sh for automatic DB migration
- Add nutriphi-backend and nutriphi-web to docker-compose.macmini.yml
- Add CI/CD detection and build jobs for nutriphi
- Update CORS origins in mana-core-auth to include nutriphi.mana.how
- Include nutriphi in deploy:landing:all script

Ports: Backend 3023, Web 5189
Domain: nutriphi.mana.how / nutriphi-api.mana.how
2026-01-28 15:29:43 +01:00
Till-JS
43991383a1 feat(todo): add deploy:landing:todo script for Cloudflare Pages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:26:45 +01:00
Till-JS
7138236046 feat(calendar): add runtime STT URL injection for production
- Add PUBLIC_STT_URL to hooks.server.ts runtime injection
- Update stt.ts to use runtime-injected URL with fallback
- Update .env.development to use production STT URL
- Update generate-env.mjs with STT URL mapping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:25:39 +01:00
Till-JS
3ff8d3833b feat(nutriphi): prepare for production release with tests and improved UX
- Remove broken header links to non-existent settings/profile pages
- Replace header links with settings page link
- Remove TODO comments for credit system in analysis controller
- Add comprehensive error handling with German messages in meals store
- Add loading states, retry buttons, and error displays in UI components
- Create new settings page with daily goals editor
- Add 99 tests across backend, web, and shared packages:
  - Backend: MealService, GoalsService, StatsService, FavoritesService,
    RecommendationsService, nutrition.utils (Jest)
  - Web: API client tests with mocks (Vitest)
  - Shared: utility function tests (Vitest)
- Set up test infrastructure (Jest for NestJS, Vitest for SvelteKit)
2026-01-28 15:23:35 +01:00
Till-JS
ee630158c5 feat(matrix-ollama-bot): add natural language commands and welcome messages
- Add keyword detection for German/English commands (hilfe, modelle, status)
- Send welcome message when users join the room
- Send bot introduction when invited to new rooms
- Add !pin command to pin help message
- Auto-pin help when joining new rooms
- Update help text with simpler command overview

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:56:32 +01:00
Till-JS
e4145324b2 feat(matrix-ollama-bot): add vision commands and filter non-chat models
- Add !vision command to analyze images with vision models
- Add !vision:all command to compare all vision models
- Filter out specialized models (deepseek-r1) from !all comparison
- Add chatWithImage method to OllamaService for vision requests
- Switch Dockerfile from pnpm to npm for better compatibility
- Add .dockerignore and tsconfig.build.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:23:30 +01:00
Till-JS
437d612e81 ♻️ refactor(contacts): remove statistics, network view and session storage; implement demo mode
- Remove statistics feature (stores, routes, ~560 LOC)
- Remove network view with D3.js graph (~1,100 LOC)
- Remove session-based contact storage
- Add demo contacts for unauthenticated users (10 sample contacts)
- Add auth gate prompts for create/edit/delete/favorite actions
- Update layout with Demo-Modus banner and event handling
- ~1,760 lines of code removed for simpler, cleaner codebase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:12:19 +01:00
Till-JS
1dc4f58edb feat(todo): prepare for production deployment
- Fix type-check errors (subtask id, duplicate currentLocale)
- Add complete Astro landing page with Hero, Features, Pricing, CTA
- Add production environment templates (.env.example, .env.production.example)
- Add docker-compose.prod.yml for production deployment
- Add deploy.sh script for server deployment
- Add /health endpoint for web app health checks
- Improve docker-entrypoint.sh with database wait logic
- Remove references to deleted statistics and session-tasks stores

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:04:27 +01:00
Till-JS
99fdf1d17f ♻️ refactor(todo): remove statistics, network view and session tasks; implement demo mode
Remove complex, low-usage features to simplify codebase:
- Statistics/Heatmap: ~1,900 LOC removed (charts, store, page)
- Network View: ~800 LOC removed (D3.js graph, store, API, page)
- Session Tasks: ~190 LOC removed, replaced with demo mode

Demo mode improvements:
- Static sample tasks instead of confusing sessionStorage behavior
- Auth gate shows when users try to create/edit/complete tasks
- Clear "Demo-Modus" banner for unauthenticated users
- Better UX: users can explore the app without frustration

Total estimated savings: ~2,800 LOC
2026-01-28 13:58:15 +01:00
Till-JS
836b341b3e feat(matrix-ollama-bot): add !all command for model comparison
- Add !all [question] command to query all models and compare responses
- Show response times for each model
- Update help text with new command and rename to Mana Chat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:43:58 +01:00
Till-JS
54752d4dac 📝 docs(calendar): update cleanup plan with session events commit hash 2026-01-28 13:42:08 +01:00
Till-JS
cef8321667 ♻️ refactor(calendar): replace session events with demo mode
- Remove session-events.svelte.ts (~154 LOC)
- Add demo-events.ts with static sample events
- Simplify events.svelte.ts by removing session logic
- Update AuthGateModal for demo mode messaging
- Show auth gate when users try to create/edit events
- Update banner from "Gast-Modus" to "Demo-Modus"

First-time visitors now see realistic sample events instead of an
empty calendar. Clicking on events or trying to create new ones
prompts for login, providing a better UX than the previous session
storage approach where events would be lost on tab close.
2026-01-28 13:41:47 +01:00
Till-JS
a44664c691 📝 docs(calendar): update cleanup plan after network view removal 2026-01-28 13:31:42 +01:00
Till-JS
9a93ca0c89 🔥 refactor(calendar): remove Network View feature
Remove Network View (D3 event graph visualization) to reduce complexity:
- Delete NetworkView.svelte component (~416 LOC)
- Delete network.svelte.ts store (~371 LOC)
- Delete network.ts API client (~47 LOC)
- Delete view-mode.svelte.ts store (~76 LOC)
- Remove network tab from view switcher
- Simplify view switching logic

Also adds voice recording feature (separate work, included to fix build):
- Add VoiceRecordButton and VoiceRecordingModal components
- Add voice-recording store and audio utilities
- Integrate voice input into calendar layout

Add CLEANUP_PLAN.md documenting planned simplifications.

Total removal: ~910 LOC
2026-01-28 13:31:13 +01:00
Till-JS
19199290f5 fix(matrix): hide E2E encryption warnings in Element
Since bots cannot support E2E encryption and all data is stored locally,
hide the encryption warning banners for better UX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:13:44 +01:00
Till-JS
2f3473b73f 🔥 refactor(calendar): remove statistics and heatmap feature
Remove unused statistics/heatmap functionality to reduce complexity:
- Delete statistics.svelte.ts and heatmap.svelte.ts stores
- Delete StatsSidebarSection.svelte and StatsOverlay.svelte components
- Remove heatmap toggle button from toolbar
- Remove "Statistiken" nav item and Cmd+3 shortcut
- Clean up heatmap CSS from all calendar views
2026-01-28 13:10:58 +01:00
Till-JS
8eac78599d fix(matrix-project-doc-bot): fix main.js path in Dockerfile
The dist output is at dist/src/main.js due to drizzle.config.ts at root level.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:01:06 +01:00
Till-JS
96e64b2a37 fix(matrix-bots): exclude crypto-nodejs module that fails on Alpine
Use pnpm overrides to replace @matrix-org/matrix-sdk-crypto-nodejs with
an empty package since E2E encryption is not needed for these bots.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:57:12 +01:00
Till-JS
f488bd8eab fix(matrix): hardcode database password (env vars not expanded in YAML)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:54:11 +01:00
Till-JS
8e6adfdb10 feat(services): add Telegram bot services for NutriPhi, Todo, and Zitare
Add three new Telegram bot services:

- telegram-nutriphi-bot: Nutrition tracking bot with Gemini AI analysis
  - Photo meal analysis
  - Daily nutrition goals and tracking
  - Statistics and reports

- telegram-todo-bot: Todo list management bot
  - Integration with Todo backend API
  - Reminder scheduling
  - User preferences per chat

- telegram-zitare-bot: Daily inspiration quotes bot
  - Scheduled daily quotes
  - Quote database with authors
  - User subscription management

All bots use NestJS with nestjs-telegraf for Telegram integration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:52:01 +01:00
Till-JS
7f3842b63c fix(matrix): set session_lifetime >= refresh_token_lifetime
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:49:56 +01:00
Till-JS
d614587820 📝 docs: add comprehensive monitoring stack documentation 2026-01-28 12:49:39 +01:00
Till-JS
b1a8ca861e fix(matrix): separate config and data mounts for Synapse
Mount config files to /config and data directory to /data to avoid mount conflicts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:48:50 +01:00
Till-JS
b017534f0b fix(matrix): use bind mount instead of named volume for Synapse data
Fixes permission issues with signing.key generation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:47:51 +01:00
Till-JS
9ff709dc49 fix(matrix): use local Docker images for Matrix bots
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:45:26 +01:00