Commit graph

613 commits

Author SHA1 Message Date
Till-JS
e7e6281d54 🔧 fix(docker): add missing shared packages to all backend Dockerfiles
All backend Dockerfiles were missing required shared package dependencies,
causing CI builds to fail with TypeScript compilation errors.

Fixed Dockerfiles:
- chat: added credit-operations, nestjs-integration, health, metrics, setup, tsconfig
- todo: added credit-operations, nestjs-integration, health, metrics, tsconfig
- contacts: added health, metrics, setup, tsconfig
- calendar: added credit-operations, nestjs-integration, health, metrics, setup, tsconfig
- presi: added health, setup, tsconfig
- picture: added credit-operations, nestjs-integration, health, storage, tsconfig
- clock: added health, metrics, setup, tsconfig
- storage: added health, tsconfig
- manadeck: added credit-operations, tsconfig
- skilltree: added health, metrics, tsconfig

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 16:47:00 +01:00
Till-JS
a2e2a5b73c feat(admin): add user data dashboard for cross-project data visualization
Add comprehensive admin dashboard to view and manage user data across all projects:

Backend:
- Add admin endpoints to Chat, Todo, Contacts, Calendar, Picture, Zitare, Presi
- Each backend exposes GET/DELETE /api/v1/admin/user-data/:userId
- Service-to-service auth via X-Service-Key header

Aggregation (mana-core-auth):
- GET /api/v1/admin/users - Paginated user list with search
- GET /api/v1/admin/users/:userId/data - Aggregated data from all backends
- DELETE /api/v1/admin/users/:userId/data - GDPR deletion across all projects

Frontend (ManaCore web):
- New User Data tab in admin navigation
- User search page at /admin/user-data
- User detail page with ProjectDataCard components
- GDPR deletion dialog with email confirmation

Presi:
- Migrate user_id from UUID to TEXT for Better Auth compatibility
- Add SQL migration script
2026-02-11 14:59:18 +01:00
Till-JS
5b6f231e1a 🐛 fix(todo,matrix): improve click targets and type safety
- todo: Make task-content button fill full height for better click target
- matrix: Fix TypeScript errors by using Boolean() for template expressions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 14:53:49 +01:00
Till-JS
bf0e788cba ♻️ refactor(todo,contacts): remove sidebar mode from PillNavigation
Simplify navigation by removing unused sidebar mode from both apps:

Todo App:
- Remove isSidebarMode state, handlers, and localStorage persistence
- Remove sidebar-related CSS classes and styles
- Simplify TodoToolbar to pure wrapper component

Contacts App:
- Remove isSidebarMode state, handlers, and localStorage persistence
- Remove sidebar-related CSS from ContactsToolbar and ContactAlphabetView
- Always show view-mode-pill (no longer conditional on sidebar mode)

This removes ~250 lines of unused code across 5 files.
2026-02-02 19:16:56 +01:00
Till-JS
12a900346c ♻️ refactor(calendar): remove sidebar mode from PillNavigation
Simplify the bottom bars by removing the unused sidebar mode:
- Remove isSidebarMode prop from all components
- Remove sidebar-related CSS classes and styles
- Simplify CalendarToolbar to pure wrapper component
- Remove localStorage persistence for sidebar mode

This removes ~230 lines of unused code across 8 files.
2026-02-02 19:06:32 +01:00
Till-JS
bd9bd556f4 🚸 feat(calendar): hide tasks by default and scroll to midday on load
- Add showTasksInCalendar setting (default: false) to hide task blocks
- Auto-scroll time-grid views to 12:00 on initial load for better UX
- Tasks can be re-enabled via settings toggle
2026-02-02 18:54:05 +01:00
Till-JS
171cf7a854 fix(contacts-web): use runtime URLs instead of build-time baked values
- user-settings.svelte.ts: use getAuthUrl() for settings API
- contacts.ts: use getAuthUrl() for tags API client
- feedback.ts: use getAuthUrl() for feedback service

This fixes Mixed Content errors where the app was trying to reach
internal Docker URLs (http://mana-auth:3001) instead of production
URLs (https://auth.mana.how).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:22:59 +01:00
Till-JS
30f0dbef5d feat(contacts-web): add hooks.server.ts for runtime URL injection
Fixes contacts-web using localhost URLs instead of production URLs.
SvelteKit bakes environment variables at build time, so we need to
inject runtime URLs via hooks.server.ts for Docker deployments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:14:03 +01:00
Till-JS
ad22d264aa fix(nutriphi): add shared-drizzle-config and make db:push non-fatal
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:17:22 +01:00
Till-JS
ac477aae24 fix(nutriphi): add missing shared packages to Dockerfile
Added shared-tsconfig, shared-nestjs-setup, and shared-nestjs-health
packages required for the backend build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:14:04 +01:00
Till-JS
509bbb9920 fix(nutriphi): add shared-nestjs-setup to Dockerfile
The package is required for the bodyLimit configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:09:44 +01:00
Till-JS
b404ddc9a8 fix(nutriphi): increase body size limit to 50mb for image uploads
The NutriPhi bot was failing with 413 "request entity too large" when
analyzing images via Base64. Added configurable bodyLimit option to
shared-nestjs-setup and set NutriPhi backend to 50mb.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:08:14 +01:00
Till-JS
9d7e6c670e fix(matrix-web): change bots page to single column layout
More readable and cleaner UX with narrower max-width

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:46:35 +01:00
Till-JS
23852cf605 feat(matrix-web): add bots page with all 19 Matrix bots
- Add /bots route with bot overview grid
- Create BotCard component with expandable details
- Implement search and category filtering (AI, Productivity, Media, Lifestyle, Tools)
- Add bot data structure with commands, descriptions, and metadata
- Support starting chat with bots (creates DM or navigates to existing room)
- Add German and English translations
- Add robot icon to PillNavigation component

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:36:49 +01:00
Till-JS
feaf27dd14 feat(auth): implement cross-subdomain SSO for all web apps
Add Single Sign-On (SSO) support across all mana.how subdomains:

- Add trySSO() method to @manacore/shared-auth that exchanges session
  cookies for JWT tokens
- Add /api/v1/auth/session-to-token endpoint to mana-core-auth service
- Update all 15 web apps to try SSO during auth initialization

SSO Flow:
1. User logs in on any app (e.g., calendar.mana.how)
2. Session cookie is set with Domain=.mana.how
3. When visiting another app (e.g., todo.mana.how), it checks for
   local tokens first
4. If no local tokens, tries SSO via session cookie
5. Session cookie is exchanged for JWT tokens via new endpoint
6. User is automatically authenticated

Apps updated: calendar, chat, clock, contacts, manacore, manadeck,
nutriphi, picture, planta, presi, questions, skilltree, storage,
todo, zitare

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 13:17:04 +01:00
Till-JS
352070fb2f docs(auth): add SSO documentation and test credentials
- Document cross-domain SSO with COOKIE_DOMAIN configuration
- Add production test credentials for automated testing
- Explain cookie-based SSO flow across *.mana.how subdomains

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 04:09:07 +01:00
Till-JS
9a22c89857 fix(calendar-web): inject cross-app API URLs for client-side
The calendar frontend integrates with todo and contacts backends
for tasks and birthdays. The env vars were only available during
SSR, not in client-side JavaScript.

- Add PUBLIC_TODO_BACKEND_URL and PUBLIC_CONTACTS_API_URL injection
  in hooks.server.ts
- Update todos.ts to use injected window variable
- Update birthdays.ts to use injected window variable

Fixes 404 errors on calendar.mana.how for /tasks/* and /contacts/birthdays

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 03:26:46 +01:00
Till-JS
dc0d425f61 🐛 fix(matrix-web): handle Matrix SSO loginToken callback
Add loginWithLoginToken function to exchange Matrix SSO loginToken for credentials.
The app layout now detects the loginToken URL parameter and completes the SSO flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 15:02:47 +01:00
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
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
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
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
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
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
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
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
0229b1c9c3 🐛 fix: resolve tsconfig issues across all NestJS backends
Define compiler options locally instead of extending shared-tsconfig
to fix drizzle-orm type compatibility issues. Also add missing
shared-vite-config dependency to skilltree/web.

Fixed backends:
- calendar, chat, clock, contacts, nutriphi
- picture, presi, questions, skilltree, todo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:47:17 +01:00
Till-JS
6a675e5de6 🐛 fix: resolve tsconfig and dependency errors
- storage/planta: Define compiler options locally instead of extending
  shared-tsconfig to fix decorator and drizzle-orm type issues
- matrix-calendar-bot: Add missing @manacore/bot-services dependency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:32:46 +01:00
Till-JS
a23430f210 feat: add KeywordCommandDetector to all 19 Matrix bots
All bots now support natural language commands via KeywordCommandDetector:
- matrix-chat-bot (gespraeche, modelle, verlauf, etc.)
- matrix-mana-bot (todo, timer, kalender, summary, etc.)
- matrix-manadeck-bot (decks, karten, lernen, mana, etc.)
- matrix-planta-bot (pflanzen, giessen, faellig, etc.)
- matrix-presi-bot (presis, folien, themes, teilen, etc.)
- matrix-project-doc-bot (projekte, generate, export, etc.)
- matrix-questions-bot (fragen, recherche, antwort, etc.)
- matrix-skilltree-bot (skills, xp, stats, aktivitaeten, etc.)
- matrix-stats-bot (stats, heute, woche, realtime, etc.)
- matrix-storage-bot (dateien, ordner, teilen, suche, etc.)
- matrix-tts-bot (voice, voices, speed, etc.)

All bots include COMMON_KEYWORDS (hilfe, help, status).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:26:25 +01:00
Till-JS
5c8120f437 feat(manalink): add PWA support and rebrand Matrix client
- Rename "Mana Matrix" to "Manalink" (bridge metaphor)
- Add PWA manifest with app icons and shortcuts
- Configure Service Worker with Workbox caching strategies
- Add iOS/Android meta tags for installability
- Create bridge-themed SVG favicon
- Add icon generation script (sharp)

PWA features:
- Installable on iOS/Android homescreen
- Offline caching (NetworkFirst for API, CacheFirst for assets)
- App shortcuts for "New Chat"
- Auto-updating Service Worker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:25:45 +01:00
Till-JS
a341aa1b13 🔥 remove: Telegram bots - Matrix-only strategy
Remove all 6 Telegram bot services to focus on Matrix as the sole
messaging platform for full UI/UX control and DSGVO compliance.

Removed services:
- telegram-nutriphi-bot
- telegram-ollama-bot
- telegram-project-doc-bot
- telegram-stats-bot
- telegram-todo-bot
- telegram-zitare-bot

Also:
- Remove Telegram bot scripts from package.json
- Remove telegram-stats-bot from docker-compose.macmini.yml
- Disable Watchtower Telegram notifications
- Remove Telegram devlog
- Add comprehensive MATRIX_BOT_ARCHITECTURE.md documentation

The Matrix-only approach provides:
- Full control over user experience
- Complete DSGVO compliance (all data on own servers)
- No dependency on third-party platforms
- Unified command patterns across all bots
2026-02-01 00:17:14 +01:00
Till-JS
d2f00c1d77 📝 docs(landing): add blueprints section for architecture decisions
Add new blueprints content collection and pages for documenting
architecture decisions, technology strategies and long-term planning.

- Add blueprints collection schema with status tracking (draft/proposal/accepted/implemented/superseded)
- Create index and detail pages for blueprints at /blueprints
- Add first blueprint: Mana Cluster & Federation Architecture
- Add ADR-002 in docs/decisions for internal reference
- Add nav.blueprints translation for all 5 languages
- Add blueprints link to main navigation
2026-02-01 00:07:34 +01:00
Till-JS
2daaee74fd 🐛 fix: syntax error in contacts-web +layout.svelte
Remove stray closing brace and fix indentation in onMount.
2026-01-30 18:58:38 +01:00
Till-JS
4526123bbe 🔧 chore: add shared-stores and shared-api-client to web apps
Add missing workspace dependencies to package.json and Dockerfiles
for chat, todo, clock, and contacts web apps.
2026-01-30 18:27:04 +01:00
Till-JS
d09ea061d2 🔧 chore: add shared-vite-config as devDependency to web apps
Add @manacore/shared-vite-config as devDependency to chat, todo,
clock, and contacts web apps to fix Docker builds.
2026-01-30 18:15:36 +01:00
Till-JS
359b870694 🔧 chore: add shared-vite-config to web Dockerfiles
Add missing shared-vite-config package to chat, clock, contacts,
and todo web Dockerfiles to fix build failures.
2026-01-30 18:01:45 +01:00
Till-JS
5d5e42c770 feat(chat): add all Mac Mini Ollama models to playground
- Add qwen2.5-coder:7b (State-of-the-Art coding, 92.7% HumanEval)
- Add llava:7b (Vision/image analysis)
- Add qwen3-vl:4b (Fast vision-language)
- Add deepseek-ocr (Document OCR)
- Add phi3.5 (Compact & efficient)
- Add ministral-3:3b (Very fast)
- Create add-local-models.ts script for upsert
- Update documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:48:40 +01:00
Till-JS
f07387d12c 🔥 remove: demo mode from todo, contacts, clock, questions, chat apps
- Enforce login redirect for unauthenticated users
- Remove demo banner, AuthGateModal, and GuestWelcomeModal
- Remove guest mode state variables and CSS styles
- Simplify showLogout to always show when user is logged in

Affected apps: todo-web, contacts-web, clock-web, questions-web, chat-web
2026-01-30 17:21:22 +01:00
Till-JS
82da95b855 🔥 remove(calendar-web): remove demo mode, enforce login
- Remove demo events and related data files
- Redirect unauthenticated users to /login
- Remove AuthGateModal, GuestWelcomeModal
- Remove demo banner and related CSS
- Simplify events store (no more demo checks)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:07:17 +01:00
Till-JS
8779d04789 🔧 chore(calendar-web): add shared-stores to Dockerfile
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:42:54 +01:00
Till-JS
90f9f2c9f5 🔧 chore(shared-vite-config): add build step for Docker compatibility
- Add build script to compile TypeScript to dist/
- Update exports to point to compiled files
- Update calendar-web Dockerfile to build shared-vite-config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:41:58 +01:00
Till-JS
eb475aceee 🔧 chore(calendar-web): add shared-vite-config to devDependencies
Required for Docker build to properly resolve workspace dependency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:40:02 +01:00
Till-JS
e5a5e96841 🐛 fix(calendar-web): add missing packages to Dockerfile
Added shared-vite-config and shared-api-client to Dockerfile COPY
statements to fix build errors.
2026-01-30 16:36:25 +01:00
Till-JS
017891b1c8 🐛 fix(calendar-web): use client URL in browser for API calls
The API client was using the SSR backend URL (http://calendar-backend:3016)
in the browser, causing mixed content errors. Now uses the injected client
URL (https://calendar-api.mana.how) from window.__PUBLIC_BACKEND_URL__.
2026-01-30 16:34:39 +01:00
Till-JS
8da676ff8c 🐛 fix(calendar-web): initialize auth store on mount
The demo banner was showing even after login because authStore.initialize()
was never called. Now auth state is properly loaded from stored tokens.
2026-01-30 16:24:43 +01:00