Commit graph

1076 commits

Author SHA1 Message Date
Till-JS
a50d98c7a1 🐛 fix(matrix-bots): disable arm64 builds for all matrix bots
All matrix bots use matrix-bot-sdk which has native dependencies
(cpu-features, ssh2) that cause QEMU emulation failures during CI
arm64 builds. Build amd64 only - can run on arm64 via Rosetta.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:25:05 +01:00
Till-JS
6ca2d3b76d feat(infra): use SSD for MinIO storage
Mount MinIO data directly to /Volumes/ManaData/minio for better
performance and persistence on external SSD.

Requires Docker Desktop "Full Disk Access" permission on Mac Mini.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:23:43 +01:00
Till-JS
fe33f4b355 fix(mana-core-auth): complete production readiness with test fixes
- Fix LoggerService mock in better-auth.service.spec.ts
- Fix name assertion in auth.controller.spec.ts (empty string fallback)
- Fix createRemoteJWKSet mock in jwt-auth.guard.spec.ts
- Add Grafana dashboard for Auth Service monitoring
- Add 10 auth-specific Prometheus alert rules
- Update production readiness plan to 100% complete

All 199 unit tests passing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:18:58 +01:00
Till-JS
e3774ca08b 🔧 chore: update pnpm lockfile for native dep overrides
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:09:19 +01:00
Till-JS
27a26c5824 add-dep: add jsonwebtoken to mana-core-auth for JWT signing 2026-02-01 13:59:58 +01:00
Till-JS
ab49be0bee 🐛 fix(matrix-mana-bot): resolve QEMU emulation failure in CI
- Build matrix-mana-bot only for linux/amd64 (arm64 fails due to QEMU)
- Move pnpm overrides for cpu-features and ssh2 to root package.json
- These native deps cause illegal instruction errors under QEMU emulation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:59:04 +01:00
Till-JS
8cd5021b50 🐛 fix(mana-core-auth): use BASE_URL as JWT issuer for OIDC compatibility
OIDC providers like Synapse expect the JWT issuer claim to match the
discovery document's issuer URL. Changed JWT plugin config from
JWT_ISSUER to BASE_URL to ensure consistency.

Also adds:
- @manacore/credit-operations package with operation definitions
- @manacore/shared-credit-ui package with React Native and Svelte components
- CreditInterceptor and @UseCredits decorator in nestjs-integration
- Credit system integration in chat backend
2026-02-01 13:55:05 +01:00
Till-JS
075051a1d4 add-dep: add jsonwebtoken to mana-core-auth dependencies 2026-02-01 13:27:23 +01:00
Till-JS
c0117b2699 🐛 fix: add missing jwt import in better-auth.service 2026-02-01 13:26:11 +01:00
Till-JS
efb077b9ea 🐛 fix(mana-core-auth): use EdDSA for OIDC id_token signing
Set useJWTPlugin: true so id_tokens are signed with EdDSA keys
from JWKS instead of HS256. This fixes Synapse OIDC integration
which verifies tokens via JWKS endpoint.
2026-02-01 13:24:55 +01:00
Till-JS
5c61a4ed0f revert(infra): use standard Docker volume for MinIO
SSD bind mount requires Docker Desktop GUI configuration for
/Volumes access. Reverting to standard volume until manually configured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:16:26 +01:00
Till-JS
df2c518a5c feat(auth): add missing auth pages for zitare and planta
- Add zitare login page with standard pattern
- Add zitare forgot-password page
- Add planta forgot-password page
- Refactor planta register to use shared RegisterPage component

All apps now have consistent login, register, and forgot-password pages
using the shared auth-ui components and i18n translations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:09:42 +01:00
Till-JS
45152ee954 🚀 feat(matrix-bots): add CI/CD pipeline for automated GHCR deployment
- Update 10 Matrix Bot Dockerfiles for monorepo builds with pnpm
- Add shared package support (bot-services, matrix-bot-common)
- Extend CI pipeline with change detection and build jobs
- Update docker-compose.macmini.yml to use GHCR images
- Enable Watchtower auto-updates for Matrix Bots

Bots: mana, ollama, stats, project-doc, todo, calendar, nutriphi, zitare, clock, tts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:02:09 +01:00
Till-JS
f016d5aa82 🔧 fix(questions): use 'de' as fallback locale for consistency
All apps now consistently use German as the fallback locale.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:57:55 +01:00
Till-JS
ff22a29723 🌐 feat(i18n): make all auth pages multilingual
Add dynamic locale support to all login, register, and forgot-password
pages across apps. Pages now use $locale from svelte-i18n instead of
hardcoded language codes.

Apps updated:
- clock: login (also consolidated to standard pattern)
- manacore: register
- manadeck: register
- nutriphi: login, register, forgot-password
- picture: register, forgot-password
- planta: login
- questions: login, register, forgot-password
- skilltree: login, register, forgot-password

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:54:52 +01:00
Till-JS
fdaf6a9c75 🔧 fix(dashboards): fix broken panels and metrics
- Backends: Remove Docker container section (cAdvisor not deployed)
- Backends: Add Auth Service Runtime section with correct auth_ prefixed metrics
- Backends: Rename to "Backends Overview"
- Application Details: Fix Node.js Runtime to use auth_ prefixed metrics
- Application Details: Rename section to "Auth Service Runtime"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:54:07 +01:00
Till-JS
fa9439979c 🔧 refactor(clock): consolidate register page to standard pattern
- Use ClockLogo from shared-branding
- Use translations from shared-i18n
- Change onSubmit to onSignUp pattern
- Add onResendVerification support
- Add amber color theming (#f59e0b)
- Remove manual loading/error state management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:46:56 +01:00
Till-JS
d703ccfd80 feat(auth): add resend verification email to registration screen
- Add prominent email verification success UI with resend button
- Show resend verification option when registration fails with "not verified" error
- Improve form spacing with space-y-4 for better visual consistency
- Add translations for resend verification in all languages (de, en, fr, it, es)
- Update all 13 app register pages to pass onResendVerification prop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:44:28 +01:00
Till-JS
1c6505890d fix(infra): use SSD volume for MinIO storage
Switch MinIO from Docker VM storage to external SSD volume
at /Volumes/TillJakob-S04/ManaData/minio for better performance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:41:14 +01:00
Till-JS
816062b07d 🐛 fix(monitoring): adjust node-exporter config for macOS Docker
- Remove rslave mount that doesn't work on macOS
- Use selective collectors instead of defaults
- Note: This monitors the Docker VM metrics, not host Mac

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:40:33 +01:00
Till-JS
6a725a2b73 🐛 fix(monitoring): remove duplicate node-exporter definition
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:39:38 +01:00
Till-JS
7aa5115c78 📊 feat(monitoring): add node-exporter for host system metrics
- Add node-exporter service to docker-compose for CPU/Memory/Disk monitoring
- Enable node-exporter scrape target in Prometheus config
- Update System Overview dashboard with Host System section:
  - CPU, Memory, Disk usage gauges
  - Total RAM, Total Disk, Uptime, Load stats
  - CPU & Memory over time graph
  - Network I/O graph
- Add Node Exporter to service status panel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:38:44 +01:00
Till-JS
84e9f86db9 🔧 fix(grafana): rewrite System Overview with available metrics
- Removed node_* metrics (node-exporter not deployed)
- Removed container_last_seen (cAdvisor not deployed)
- Added Service Status, Traffic Overview, Database sections
- All panels now use available Prometheus metrics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:33:11 +01:00
Till-JS
edbf775f37 📊 feat(grafana): add Total Requests and Requests/sec to Key Metrics
- Added Total Requests counter for overall user interaction
- Added Requests/sec for current load visibility
- Reduced panel width to fit 8 metrics in one row

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:32:01 +01:00
Till-JS
e7719eeba0 feat(grafana): enhance Master Overview with Key Metrics on top
- Move Key Metrics section to top of dashboard
- Add new panels: Services UP, Apps Running, Matrix Bots, Avg Response Time
- Reorganize layout for better overview at a glance
- Remove CPU/Memory/Disk (no node-exporter), add Redis Keys

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:28:53 +01:00
Till-JS
f0cf1bc804 🐛 fix(mana-core-auth): OIDC token exchange now works with body-parser
- Removed debug logging that exposed sensitive client_secret in production logs
- The body-parser middleware in main.ts correctly handles form-urlencoded token requests
- handleOidcRequest properly converts parsed body to URLSearchParams for Better Auth
2026-02-01 12:28:41 +01:00
Till-JS
5a8e20e0f2 🔧 fix(auth): add all apps to CORS_ORIGINS
Added link.mana.how and playground.mana.how to allowed origins.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:24:03 +01:00
Till-JS
4f90f2863d debug: add logging to handleOidcRequest for token exchange debugging 2026-02-01 12:23:05 +01:00
Till-JS
b4493ce3fa debug: add token endpoint logging 2026-02-01 05:58:47 +01:00
Till-JS
1b39aa8308 🔧 fix(prometheus): disable non-existent scrape targets
Commented out:
- node-exporter (container not deployed)
- cadvisor (container not deployed)
- storage/presi/nutriphi-backend (no /metrics endpoint yet)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:53:22 +01:00
Till-JS
dac6a85427 🔧 fix(prometheus): correct backend ports and add missing services
- chat-backend: 3002 → 3030
- todo-backend: 3018 → 3031
- calendar-backend: 3016 → 3032
- clock-backend: 3017 → 3033
- contacts-backend: 3015 → 3034
- Add storage-backend (3035), presi-backend (3036), nutriphi-backend (3037)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:51:50 +01:00
Till-JS
aafc69318a 🏠 feat(grafana): set Master Overview as home dashboard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:29:33 +01:00
Till-JS
24c8a79a48 🔧 fix(matrix-web): correct port config to match actual container (5180)
Container was built with PORT=5180 but docker-compose had PORT=4090.
Fixed port mapping and healthcheck to use correct internal port.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:19:18 +01:00
Till-JS
23887c265d 📦 feat(grafana): install Infinity datasource plugin for Business Metrics
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:18:02 +01:00
Till-JS
9b7d8c36b8 🐛 fix(grafana): correct VictoriaMetrics datasource port (8428 → 9090)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:13:48 +01:00
Till-JS
805477bd77 fix(seed): use simple password for test user (encoding issues with special chars) 2026-02-01 05:13:42 +01:00
Till-JS
f35c05e2c1 🔧 feat(grafana): enable anonymous viewer access
Allow public read-only access to Grafana dashboards.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:10:39 +01:00
Till-JS
d4784e9e81 🔧 fix(cloudflared): update all service ports to match Docker mappings
Production Docker containers use different ports than local dev:
- mana.how: 5173 → 5000
- chat.mana.how: 3000 → 5010
- chat-api: 3002 → 3030
- todo.mana.how: 5188 → 5011
- todo-api: 3018 → 3031
- calendar.mana.how: 5186 → 5012
- calendar-api: 3016 → 3032
- clock.mana.how: 5187 → 5013
- clock-api: 3017 → 3033
- contacts.mana.how: 5184 → 5014
- contacts-api: 3015 → 3034
- nutriphi.mana.how: 5189 → 5017
- nutriphi-api: 3023 → 3037
- playground: 5190 → 5090
- grafana: 3100 → 8000
- stats: 3200 → 8010

Also added storage and presi apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:07:58 +01:00
Till-JS
fd61692912 🌱 seed: add test user t@t.de to dev seed script
- Add t@t.de with password +üp+üp+üp to DEV_USERS array
- Refactor seed script to iterate over multiple users
- Ensures test user is always available after db:seed:dev
2026-02-01 05:07:39 +01:00
Till-JS
fe96354e3f 🔧 fix(cloudflared): correct matrix.mana.how port (8008 → 4000)
Synapse container maps internal port 8008 to host port 4000.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:01:20 +01:00
Till-JS
c3044cb38e 🚸 ux: simplify Manalink login - SSO primary, manual login hidden
- Make SSO "Mit Mana Core anmelden" the primary login option
- Hide manual homeserver/username/password behind "Anderen Server nutzen"
- Remove broken /register link (SSO handles registration)
- Add slide-down animation for advanced section
2026-02-01 05:00:03 +01:00
Till-JS
06c85ec6c0 🔧 fix: type errors in element.mana.how, mana-media, @todo/web, @calendar/web
- cloudflared: Fix element.mana.how port (8087 → 4080)
- cloudflared: Add missing link.mana.how entry
- mana-media: Fix type-check to run tsc directly on subpackages
- @todo/web: Fix TodoAppSettings to extend Record<string, unknown>
- @todo/web: Add optional chaining for toolbarCollapsedStore
- @calendar/web: Fix CalendarAppSettings to extend Record<string, unknown>
- @calendar/web: Add optional chaining for toolbarCollapsedStore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:56:29 +01:00
Till-JS
0653972195 📝 docs: add daily report for 2026-02-01
Documents the intensive night session covering:
- Voice integration for matrix-mana-bot (4 phases)
- Bot consolidation with shared packages (~5,500 lines deduplicated)
- Node.js v25 ESM compatibility fixes
- NestJS dependency injection fixes
- Matrix authenticated media API fix for Synapse 1.98+
- Mac Mini deployment and testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:18:55 +01:00
Till-JS
4599db54a4 📝 docs(mana-core-auth): add comment explaining OAuth token form-urlencoded support
Documents that the token endpoint accepts both JSON and form-urlencoded
bodies per OAuth2 spec, with form data parsed by body-parser middleware.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:12:16 +01:00
Till-JS
793b6d8e17 fix(matrix-bot-common): use authenticated media API for downloads
Newer Synapse versions (1.98+) require authenticated downloads via
/_matrix/client/v1/media/download/ endpoint. Falls back to legacy
API for older servers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:07:38 +01:00
Till-JS
582f7435f1 🐛 fix(matrix-web): fix icon title prop type errors
Wrap Phosphor icon components in span elements with title attribute
since IconComponentProps doesn't support title prop directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:02:35 +01:00
Till-JS
0d9864784f 🐛 fix(mana-core-auth): use body-parser for urlencoded OAuth token requests 2026-02-01 04:00:44 +01:00
Till-JS
03abacc854 🐛 fix(web-apps): fix Vite type compatibility and Svelte 5 store issues
- Simplify vite.config.ts files to avoid type incompatibility errors
  caused by different @types/node versions across the monorepo
- Add missing set() method to isSidebarMode store in matrix/web

Affected apps: calendar, chat, clock, contacts, manacore, manadeck,
matrix, nutriphi, picture, planta, presi, questions, storage, todo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:00:29 +01:00
Till-JS
550083241f 🐛 fix(mana-core-auth): add explicit urlencoded body parser for OAuth token endpoint 2026-02-01 03:56:17 +01:00
Till-JS
191c7b4cc7 🐛 fix(mana-core-auth): handle form-urlencoded token requests
Better Auth OIDC token endpoint now correctly handles both:
- application/x-www-form-urlencoded (OAuth 2.0 spec)
- application/json

This fixes SSO login from Synapse which uses form-urlencoded.
2026-02-01 03:48:55 +01:00