Commit graph

978 commits

Author SHA1 Message Date
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
004fe85799 fix(matrix-bots): resolve TypeScript strict null check errors
- Fix parseInt undefined errors in configuration files
- Add fallbacks for Matrix client constructor parameters
- Fix possibly undefined data accesses with non-null assertions
- Update setCurrentConversation to accept null

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:32:09 +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
68219a01df feat(matrix-chat-bot): add Matrix bot for AI chat conversations
- Quick chat mode for stateless single messages (!chat)
- Full conversation management (create, list, select, delete)
- Message history with context-aware AI responses
- Model selection (Ollama, OpenRouter, OpenAI, Anthropic)
- Conversation actions: archive, restore, pin, unpin, rename
- German/English command aliases
- Number-based reference system for ease of use
- JWT auth via mana-core-auth
- Health check endpoint on port 3327

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:18:21 +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
3ed1453ff4 feat(matrix-skilltree-bot): add Matrix bot for skill tree and XP management
- Skill management: create, list, view details, delete
- XP tracking with level-up notifications
- Branch filtering (intellect, body, creativity, social, practical, mindset, custom)
- Activity history per skill or global
- User statistics (total XP, skill count, highest level, streak)
- German/English command aliases
- Number-based reference system for ease of use
- JWT auth via mana-core-auth
- Health check endpoint on port 3326

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:00:01 +01:00
Till-JS
edbe7502d3 fix(mana-core-auth): use Better Auth native sign-in for OIDC login
The OIDC login page was using our custom /api/v1/auth/login endpoint
which returns tokens but doesn't set session cookies. Better Auth's
OIDC provider needs session cookies to recognize logged-in users.

Changes:
- Update login page to use /api/auth/sign-in/email (Better Auth native)
- Add sign-in endpoint handler in oidc.controller.ts
- Add route exclusion in main.ts for the sign-in path

This fixes the infinite redirect loop where users would log in but
then be sent back to login because the OAuth2 authorize endpoint
couldn't detect the session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:57:52 +01:00
Till-JS
e3cfafe594 feat(matrix-presi-bot): add Matrix bot for presentation management
- Full NestJS bot with matrix-bot-sdk integration
- Deck management: create, list, view, delete, rename
- Slide management: add title/text/bullet/image slides, delete
- Multiple slide types: title, content, bullets, image
- Theme support: list themes, apply to presentation
- Sharing: create links with optional expiration
- German/English command aliases
- Number-based reference system for decks and themes
- JWT auth via mana-core-auth
- Runs on port 3325

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:54:07 +01:00
Till-JS
c5476447ec feat(matrix-questions-bot): add Matrix bot for Q&A research management
- Full NestJS bot with matrix-bot-sdk integration
- Question management: create, list, view, delete, archive
- Research: start quick/standard/deep research via mana-search
- Results: view summaries, key points, follow-up questions
- Sources: view ranked sources with relevance scores
- Answers: view, rate (1-5), accept as solution
- Collections: list and create for organization
- Search: full-text search across questions
- Status tracking: open, researching, answered, archived
- Priority levels: low, normal, high, urgent
- German/English command aliases
- Number-based reference system
- JWT auth via mana-core-auth
- Runs on port 3324

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:48:56 +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
fc15366efa fix(mana-core-auth): fix TypeScript error in oidc-login controller 2026-01-30 16:42:10 +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
369415527f 🔧 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:48 +01:00
Till-JS
4a66341e08 fix(mana-core-auth): extract client_id from returnUrl for OIDC login
When redirected from authorization endpoint, the client_id is encoded
in the returnUrl parameter, not directly in query params. This fix
extracts it properly to display the correct application name.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:41:39 +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
3f336de1b9 feat(matrix-planta-bot): add Matrix bot for plant care management
- Full NestJS bot with matrix-bot-sdk integration
- Plant CRUD: list, add, view, edit, delete plants
- Watering: mark as watered, upcoming waterings, history
- Care settings: light, humidity, temperature, soil, notes
- Watering interval configuration
- Health status tracking with emoji indicators
- German/English command aliases
- Number-based reference system for plants
- JWT auth via mana-core-auth
- Runs on port 3322

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:36:30 +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
3d4402ad9b fix(mana-core-auth): allow inline scripts in CSP for OIDC login page
The login page uses inline JavaScript for the form submission handler.
Helmet's default CSP was blocking this, preventing users from logging in
via OIDC/SSO flows (e.g., Matrix Synapse).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:35:42 +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
ad7f875c5f feat(matrix-manadeck-bot): add Matrix bot for card/deck management
- Full NestJS bot with matrix-bot-sdk integration
- Deck CRUD: list, create, view, delete decks
- Card management: view cards and card details
- AI generation: generate decks with AI (30 Mana)
- Study sessions: start learning sessions
- Progress tracking: due cards, statistics
- Public features: featured decks, leaderboard
- Credit system: mana balance display
- German/English command aliases
- Number-based reference system for decks and cards
- JWT auth via mana-core-auth
- Runs on port 3321

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:29:12 +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
Till-JS
64535373ac feat(matrix-contacts-bot): add Matrix bot for contact management
- List, search, and view contact details
- Create, edit, and delete contacts
- Toggle favorites and archive status
- Number-based reference system for easy commands
- German and English command aliases
- Login/logout via mana-core-auth

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:20:11 +01:00
Till-JS
8950692cfd feat(matrix-picture-bot): add Matrix bot for AI image generation
- Generate images via Picture backend with `!generate` command
- Support prompt options (--width, --height, --steps, --negative)
- Model selection with `!models` and `!model [id]`
- Image history and deletion
- Login/logout via mana-core-auth
- Credit balance display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:15:08 +01:00
Till-JS
3b745cf068 fix(matrix-web): disable SSR for app routes to fix $state error
Svelte 5 runes in @manacore/shared-ui components were not being
transformed correctly during SSR, causing "$state is not defined"
errors. Since matrix-js-sdk requires browser APIs anyway, disabling
SSR for the (app) routes is the correct solution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:12:44 +01:00
Till-JS
b8ecdb8eb7 🔧 chore(mana-notify): disable email notifications by default
Email alerts were causing too many notifications. Changed default
from true to false so new users won't receive email notifications
unless explicitly enabled. Push notifications remain enabled.
2026-01-30 16:06:24 +01:00
Till-JS
aae5ef63a3 📝 docs: replace devlog with comprehensive microservices & consolidation post
Replaced the matrix-mana-gateway-bot devlog with a more comprehensive post
covering all 55 commits: 3 new microservices (mana-llm, mana-crawler,
mana-notify), Matrix Web Client Phase 3 features, and the massive codebase
consolidation with 8 new shared packages saving ~2,500 LOC.
2026-01-29 23:27:36 +01:00
Till-JS
7ffee52408 fix(notify-client): don't send undefined emailOptions
Only include emailOptions object when from or replyTo is provided,
preventing validation errors when these optional fields are not set.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:25:46 +01:00
Till-JS
971e269fbd 🔧 chore: update pnpm-lock and bot sync token 2026-01-29 22:59:41 +01:00
Till-JS
f4c49fe8f2 fix(mana-notify): resolve BullMQ circular import issue
Move queue name constants to separate file (queue-names.ts) to avoid
circular dependency between queue.module.ts and processor files.

The @Processor decorator evaluates at module load time, and importing
constants from queue.module.ts created a circular dependency that
resulted in undefined queue names.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:58:47 +01:00
Till-JS
384244fe50 ♻️ refactor: migrate bots and chat-backend to mana-llm
Migrate all LLM consumers from direct Ollama calls to centralized
mana-llm service with OpenAI-compatible API.

Migrated services:
- matrix-ollama-bot
- telegram-ollama-bot
- chat-backend
- telegram-project-doc-bot

New env vars: MANA_LLM_URL, LLM_MODEL, LLM_TIMEOUT
Replaces: OLLAMA_URL, OLLAMA_MODEL, OLLAMA_TIMEOUT
2026-01-29 22:56:26 +01:00
Till-JS
7b2ac78032 feat(matrix-web): add @mention autocomplete, message forwarding, and improved typing indicator
@mention autocomplete:
- Detect @ symbol while typing and show user picker
- Search room members by name or user ID
- Arrow key navigation and Enter/Tab to select
- Insert display name into message

Message forwarding:
- Add forward button to message actions
- ForwardMessageDialog with room selection
- Multi-select support for forwarding to multiple rooms
- Search and filter rooms

Typing indicator improvements:
- Show user avatars (stacked, up to 3)
- Improved visual design with rounded pill for dots
- Better spacing and alignment

Also adds:
- sendMessageToRoom() store method for forwarding
2026-01-29 22:54:00 +01:00
Till-JS
60cc0be10b fix(docker): use node-based healthchecks for mana-core-auth and nutriphi-web
- mana-core-auth container has no wget/curl, only node
- nutriphi-web had IPv6/IPv4 resolution issues with wget
- Both now use native Node.js http module for healthchecks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:17:43 +01:00
Till-JS
0023394074 feat(matrix-web): add screen sharing, presence display, and extended emoji picker
Screen sharing:
- Add toggleScreenShare() method to Matrix store
- Add screen share button to CallView with Screencast icon
- Show visual indicator when screen sharing is active

Presence display:
- Add online/offline indicator to RoomHeader for DMs
- Show presence status text (Online, Vor X Min. aktiv, etc.)
- Green dot indicator with tooltip

Extended emoji picker:
- Add 6 emoji categories (Häufig, Smileys, Gesten, Symbole, Tiere, Essen)
- Quick emoji bar for common reactions
- Expandable full picker with category tabs
- Grid layout for easy browsing
2026-01-29 22:14:28 +01:00
Till-JS
b5fa0f42b6 feat(mana-notify): add central notification service
NestJS notification microservice for email, push, Matrix, and webhook
notifications across all ManaCore apps.

Features:
- Multi-channel delivery (email, push, Matrix, webhook)
- Handlebars template engine with defaults
- User notification preferences
- BullMQ async job processing
- Delivery tracking and logging
- Prometheus metrics

Includes @manacore/notify-client package for NestJS integration.
2026-01-29 22:07:38 +01:00
Till-JS
1495dbe476 feat(mana-llm): add central LLM abstraction service
Python/FastAPI service providing unified OpenAI-compatible API for
Ollama and cloud LLM providers (OpenRouter, Groq, Together).

Features:
- Chat completions with streaming (SSE)
- Vision/multimodal support
- Embeddings generation
- Multi-provider routing (provider/model format)
- Prometheus metrics
- Optional Redis caching
2026-01-29 22:01:00 +01:00
Till-JS
4a3295d1d0 feat(mana-crawler): add web crawler service
NestJS-based web crawler service for structured content extraction.

Features:
- Depth-controlled crawling with URL pattern filtering
- robots.txt compliance
- HTML/PDF/Markdown content extraction
- BullMQ job queue for async processing
- Redis caching layer
- Prometheus metrics
2026-01-29 22:00:36 +01:00
Till-JS
c64b4d6ac9 feat(matrix-web): add VoIP/video call support
- Add VoIP types: CallState, CallType, CallDirection, SimpleCall, CallCallbacks
- Add VoIP state management to Matrix store with place/answer/reject/hangup methods
- Add mic/camera mute toggle functionality
- Create CallView component for active calls with video streams
- Create IncomingCallDialog component for incoming call notifications
- Enable call buttons in RoomHeader (DMs only)
- Integrate call components into chat page
2026-01-29 21:28:35 +01:00
Till-JS
22a0feeacd 📝 docs: complete consolidation opportunities analysis
Mark remaining tasks as analyzed/completed:
- Sleep function: Already using shared-utils (no duplicate)
- LanguageSelector: Local wrappers are correct architecture (not duplicates)
- AppSlider: Local files are localization wrappers (not duplicates)
- Theme stores: Already committed earlier

All consolidation opportunities have been evaluated.
2026-01-29 20:45:28 +01:00
Till-JS
c3e340f859 🔧 chore: fix missing shared package dependencies
Add missing workspace dependencies:
- telegram-nutriphi-bot: @manacore/shared-drizzle-config
- telegram-todo-bot: @manacore/shared-drizzle-config
- questions/backend: @manacore/shared-tsconfig + fix tsconfig paths

Fixes pre-commit type-check failures.
2026-01-29 20:41:39 +01:00
Till-JS
5a3082686e feat(matrix-web): add keyboard shortcuts for quick actions
- Cmd/Ctrl + K: Open search dialog
- Cmd/Ctrl + N: Open new chat dialog

Improves keyboard-driven navigation for power users.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:51:12 +01:00
Till-JS
b097d89318 feat(matrix-web): add theme mode selector in settings
Replace placeholder appearance section with actual theme controls:
- Light mode button with sun icon
- Dark mode button with moon icon
- System mode button (follows OS preference)
- Shows current active mode status

Uses shared-theme store for consistent theming across the app.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:50:27 +01:00
Till-JS
5777c76c47 feat(matrix-web): add message search functionality
- Add searchMessages method to Matrix store using SDK search API
- Create SearchDialog component with:
  - Search input with keyboard navigation
  - Toggle between "current room" and "all rooms" scope
  - Result list with sender, room name, and timestamp
  - Query highlighting in results
- Add search button to RoomHeader
- Integrate search dialog into chat page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:41:06 +01:00
Till-JS
9ffbf35f25 🔧 fix(docker): update Dockerfiles for monorepo-aware builds
- Update mana-search Dockerfile to use monorepo root context
- Update api-gateway Dockerfile to use monorepo root context
- Fix CI workflow to use context: . for mana-search
- Use pnpm --filter for proper workspace package installation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:39:05 +01:00
Till-JS
4492273942 feat(matrix-web): add browser notifications for new messages
- Create notification service with permission handling and settings
- Integrate notifications into Matrix store timeline event handler
- Add notification settings panel with toggles for:
  - Enable/disable notifications
  - Sound on/off
  - Message preview visibility
- Show notifications only when page is not focused
- Handle permission states: granted, denied, default

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:38:43 +01:00
Till-JS
60b7cad508 🔧 chore: gitignore build artifacts and misc updates
- Add drizzle.config.* compiled files to gitignore
- Add packages/*/src/*.js patterns for compiled TS
- Update picture design tokens
- Update matrix-tts-bot storage state
- Add microservices API overview doc
2026-01-29 18:37:42 +01:00
Till-JS
f6517733e2 🚸 ux(matrix-web): add settings access from chat sidebar
Add gear icon button next to the "new chat" button in the sidebar header
to provide easy access to the Settings page where users can manage their
profile, encryption settings, and logout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:36:18 +01:00
Till-JS
59d5d20e0a ♻️ refactor: migrate 12 backends to shared-nestjs-health module
- Create @manacore/shared-nestjs-health package with HealthModule.forRoot()
- Migrate 12 backends: calendar, chat, clock, contacts, nutriphi, picture,
  planta, presi, skilltree, storage, todo, zitare
- Delete 24 local health controller/module files (~312 LOC removed)
- Support custom route (storage uses 'api/v1/health')
- Skip questions backend (has extended DB health check)
- Fix telegram-zitare-bot missing shared-drizzle-config dependency
- Update CONSOLIDATION_OPPORTUNITIES.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:35:10 +01:00
Till-JS
271496b0fd 🚀 ci: add mana-search and api-gateway to Docker builds
- Add mana-search + SearXNG to docker-compose.macmini.yml
- Add api-gateway dependency on mana-search
- Add CI workflow for building mana-search Docker image
- Add CI workflow for building api-gateway Docker image
2026-01-29 18:34:18 +01:00
Till-JS
4c1beb9534 🌙 feat(docs): set dark mode as default theme
Add script to head config that sets dark mode when user hasn't
chosen a theme preference.
2026-01-29 18:22:23 +01:00
Till-JS
fc0ed636fc feat(api-gateway): add Swagger, admin endpoints, and scheduler
- Add Swagger/OpenAPI documentation at /docs endpoint
- Add admin module for system-wide API key management
- Add scheduler for monthly credit reset and usage cleanup
- Add Docker Compose entry for Mac Mini deployment
- Document all endpoints with descriptions and examples
2026-01-29 18:03:16 +01:00