Commit graph

950 commits

Author SHA1 Message Date
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
Till-JS
4b322f59b1 📝 docs: add Astro Starlight public documentation site
Add comprehensive documentation site using Astro Starlight with:
- Getting Started guides (introduction, quick-start, project structure)
- Development docs (local dev, env vars, docker, migrations, testing)
- Architecture docs (overview, auth, backend, web, mobile, storage, search)
- Guidelines (code style, error handling, database, design/UX)
- Deployment docs (overview, Cloudflare Pages, Mac Mini, self-hosting)
- Project pages (overview, chat)
- API reference structure

Features:
- Dark mode support
- Full-text search (Pagefind)
- Tailwind CSS styling
- Cloudflare Pages deployment ready
- Edit on GitHub links
2026-01-29 18:01:15 +01:00
Till-JS
dff153ca1e 💄 style(matrix-web): redesign login page to match central auth UI
- Add dark/light theme toggle
- Glass-morphic form card with backdrop blur
- Centered logo with app name and subtitle
- Custom styled inputs with icons and labels
- Violet accent color matching Matrix branding
- Entrance animations (fadeInUp, fadeInScale)
- Shake animation on error
- Success pulse animation on login
- Mobile-optimized layout
- Reduced motion support
2026-01-29 17:43:51 +01:00
Till-JS
f2cd8621cb 🚸 ux(matrix-web): improve mobile responsiveness
- Add slide-in sidebar overlay with backdrop on mobile
- Make message actions appear below message on mobile
- Adjust emoji picker positioning for viewport awareness
- Reduce excessive padding on mobile screens
- Hide disabled call buttons on small screens
- Add responsive widths to panels and dialogs
- Close sidebar automatically when selecting room on mobile
2026-01-29 17:37:35 +01:00
Till-JS
6f1b2654f1 feat: add mana-api-gateway for monetizing core services
Implement custom NestJS API Gateway for mana-search, mana-stt, and mana-tts:

- API Key management with CRUD operations and key regeneration
- Redis-based sliding window rate limiting
- Credit-based billing with tier support (free, pro, enterprise)
- Usage tracking with daily aggregates
- Proxy services to backend microservices
- Prometheus metrics endpoint
- JWT auth for management API, API key auth for public API

Database schema uses separate `api_gateway` schema in shared manacore DB.
2026-01-29 17:30:21 +01:00
Till-JS
fbd315eac0 🔧 chore: create @manacore/shared-nestjs-setup and migrate 8 backends
- Create shared package with bootstrapApp(), configureCors(), configureValidation()
- Migrate: chat, calendar, contacts, zitare, clock, planta, presi, nutriphi
- Skip complex backends: manadeck, picture, todo, skilltree, questions, storage

Savings: ~280 LOC (8 backends × 35 LOC each)
2026-01-29 17:25:51 +01:00
Till-JS
840f6d7ff3 feat(matrix-web): add read receipt indicators
- Add ReadReceipt type for tracking who read messages
- Track read receipts via Matrix SDK receipt events
- Display single checkmark for sent messages
- Display blue double checkmarks when message is read
- Tooltip shows names of readers
- Auto-refresh timeline when receipts are received

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:24:03 +01:00
Till-JS
84fca4036e feat(matrix-web): add online status indicators for DMs
- Add PresenceState and UserPresence types
- Track user presence via Matrix SDK events
- Display green dot indicator for online users in DM list
- Show gray dot for offline users
- Add tooltip with last active time

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:16:02 +01:00
Till-JS
c4483e2c0b 🔥 remove: delete Picture Button/Card duplicates, use @manacore/shared-ui
- Delete unused Card.svelte (21 LOC)
- Migrate Button imports to @manacore/shared-ui (53 LOC)
- Update CONSOLIDATION_OPPORTUNITIES.md

Savings: ~74 LOC
2026-01-29 17:15:55 +01:00
Till-JS
2d16f7c9ff 🔧 chore: create @manacore/shared-logger and migrate 2 mobile apps
- Create shared logger package with logger, perfLogger, networkLogger
- Support both __DEV__ (React Native) and NODE_ENV environments
- Migrate manadeck and picture mobile apps to use shared package

Savings: ~120 LOC (126 → 10 LOC in apps)
2026-01-29 17:12:48 +01:00
Till-JS
5663c3d3ce fix(matrix-web): inline navigation stores to avoid shared-stores dependency
Remove external dependency on @manacore/shared-stores and create local
implementation using Svelte 5 runes for better build compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:08:39 +01:00
Till-JS
95cd14202d fix(matrix-web): add shared-stores to Dockerfile
Required for navigation store functionality.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:06:29 +01:00
Till-JS
5f07eb734e feat(matrix-web): add markdown formatting support
- Support **bold** and __bold__ syntax
- Support *italic* and _italic_ syntax
- Support `inline code` with styled background
- Support ~~strikethrough~~ text
- Refactor linkifyText to formatMessageBody

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:05:26 +01:00
Till-JS
bf719f188f ♻️ refactor: create createSimpleNavigationStores and migrate 10 apps
- Add factory for writable navigation stores with optional persistence
- Support toolbar collapsed state with withToolbar option
- Migrate all 10 navigation stores to use shared factory
- Clock saves 32 LOC with built-in localStorage persistence

Savings: ~50 LOC (68 LOC removed, factory adds reusable 94 LOC)
2026-01-29 17:04:32 +01:00
Till-JS
c14cd6cac5 feat(matrix-web): add clickable links and link previews
- Detect URLs in text messages using regex
- Convert URLs to clickable links with proper styling
- Add link preview card showing favicon and domain
- Escape HTML properly to prevent XSS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:03:46 +01:00
Till-JS
035c75371a fix(matrix-web): inline vite config for Docker build compatibility
Inline the shared-vite-config settings directly to avoid TypeScript
package resolution issues during Docker builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:01:10 +01:00
Till-JS
b5e6fd475e fix(matrix-web): add missing shared packages to Dockerfile
Add shared-config, shared-types, and shared-vite-config packages
required for building the Matrix web client.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 17:00:00 +01:00
Till-JS
f652f281b8 chore: switch matrix-web to local build in production compose
Switch from ghcr.io pre-built image to local Dockerfile build for
easier deployment during development.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:59:13 +01:00
Till-JS
017cb91385 feat(matrix-web): add emoji reactions support
- Add MessageReaction type with count, users, and includesMe tracking
- Implement getReactionsForEvent helper to collect m.annotation events
- Add reactToMessage method using m.reaction event type
- Display reactions below message bubbles with toggle support
- Add emoji picker dropdown in message actions (6 quick emojis)
- Clicking existing reaction toggles it on/off

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:56:10 +01:00
Till-JS
6807543d60 🔧 chore: create @manacore/shared-drizzle-config and migrate 16 configs
- Create factory function with dbName, schemaPath, outDir, schemaFilter options
- Migrate 12 app backends: calendar, chat, clock, contacts, nutriphi, picture,
  planta, presi, questions, skilltree, storage, todo
- Migrate 4 services: mana-core-auth, telegram-zitare-bot, telegram-todo-bot,
  telegram-nutriphi-bot
- Update consolidation docs with completed Drizzle config task

Savings: ~160 LOC (16 configs × ~10 LOC each)
2026-01-29 16:54:44 +01:00
Till-JS
188290b427 ♻️ refactor: migrate 15 web apps to @manacore/shared-vite-config
- Add missing packages to MANACORE_SHARED_PACKAGES list
- Migrate all SvelteKit apps to use createViteConfig/mergeViteConfig
- Matrix preserves special WASM config for matrix-js-sdk crypto
- Update consolidation docs with completed Vite config task

Savings: ~350 LOC (-318 net lines)
2026-01-29 16:47:55 +01:00
Till-JS
d0d2855adb 🔧 chore: create @manacore/shared-tsconfig and migrate 13 backends
- Create shared TypeScript config package with:
  - base.json: Common options (ES2021, skipLibCheck, etc.)
  - nestjs.json: NestJS backend config (decorators, commonjs)
  - sveltekit.json: SvelteKit web config
  - expo.json: Expo mobile config
  - astro.json: Astro landing config

- Migrate 13 NestJS backends to use shared config:
  calendar, chat, clock, contacts, nutriphi, picture, planta,
  presi, questions, skilltree, storage, todo, zitare

- Skip manadeck (uses nodenext module system)

Savings: ~280 LOC (13 backends × ~22 LOC each)
2026-01-29 16:38:57 +01:00
Till-JS
86c40ec05b fix(matrix-web): fix sidebar gap and chat scrolling layout
- Remove padding-bottom from floating-mode layout, handle padding in components
- Add min-h-0 to flex containers for proper overflow handling
- Add bottom padding to RoomList and MessageInput for nav clearance
- Fix Timeline scrolling with proper min-h-0 on flex-1 container
- Add matrix app to shared-branding (icon, config, URLs)
- Fix File icon import shadow conflict in MessageInput

Note: Skipped type-check due to pre-existing error in @todo/web

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:36:24 +01:00
Till-JS
4681ba8c36 ♻️ refactor: create createAppSettingsStore factory and migrate 3 apps
- Add createAppSettingsStore<T>() factory to @manacore/shared-stores
- Migrate todo, contacts, calendar settings stores to use factory
- Factory provides: localStorage persistence, type-safe set/update/reset
- Optional onSettingsChange callback for cloud sync (used by calendar)
- Reduces boilerplate by ~323 LOC across 3 apps

Savings:
- todo: 259 → 159 LOC (100 LOC)
- contacts: 278 → 173 LOC (105 LOC)
- calendar: 433 → 315 LOC (118 LOC)
2026-01-29 16:30:22 +01:00
Till-JS
9f4713117c fix(matrix): improve sidebar and message input layout
- Add padding-bottom to sidebar to extend to navigation bar
- Simplify MessageInput with cleaner styling
- Replace DaisyUI dropdown with custom implementation
- Improve recording indicator styling
- Make hint text smaller and less prominent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:25:05 +01:00
Till-JS
3e73a7a919 📝 docs: update consolidation report with completed tasks
Mark completed Quick Wins:
- Metrics migration: 709 LOC removed (6 backends)
- Picture Input.svelte deleted (70 LOC)
- Sleep duplicate removed (8 LOC)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:24:05 +01:00
Till-JS
a1ca002081 ♻️ refactor: migrate 6 backends to shared-nestjs-metrics
Replace local MetricsService implementations with @manacore/shared-nestjs-metrics:
- chat, calendar, todo, clock, contacts, skilltree

Removes ~350 LOC of duplicated metrics code:
- Delete local metrics directories (service, module, controller)
- Remove manual metrics middleware from main.ts
- Use MetricsModule.register({ prefix: 'app_' }) pattern

Part of consolidation effort - see docs/CONSOLIDATION_OPPORTUNITIES.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:23:32 +01:00
Till-JS
f0adea04fd fix(tts-bot): use MP3 format and prevent duplicate messages
- Changed audio output from WAV to MP3 for better browser compatibility
- Added event ID tracking to prevent processing same message twice
2026-01-29 16:20:26 +01:00
Till-JS
ff56030b72 fix(matrix): enable independent scrolling for panels
Change layout container from min-height to fixed height with overflow
hidden to allow left panel (room list) and right panel (chat messages)
to scroll independently.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:20:23 +01:00