Commit graph

960 commits

Author SHA1 Message Date
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
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