Commit graph

927 commits

Author SHA1 Message Date
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
Till-JS
1348fca84d ♻️ refactor: remove duplicated code (Quick Wins)
- Delete unused Input.svelte from Picture app (70 LOC)
- Remove sleep() from shared-api-client, import from shared-utils
- Fix NodeJS.Timeout type for browser compatibility

Part of consolidation effort - see docs/CONSOLIDATION_OPPORTUNITIES.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:19:18 +01:00
Till-JS
0a6a1dcd1a 📝 docs: add consolidation opportunities analysis
Comprehensive analysis of code duplication across the monorepo:
- Backend patterns: ~2,300 LOC savings (metrics, main.ts, health)
- Frontend stores: ~700 LOC savings (settings, navigation)
- UI components: ~1,200 LOC savings (skeletons, duplicates)
- Configurations: ~900 LOC savings (tsconfig, vite, drizzle)

Total potential: ~5,200-6,500 LOC reduction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:14:08 +01:00
Till-JS
33073ab8ac feat(matrix): add room invitations UI with accept/decline
- Add membership and inviter fields to SimpleRoom type
- Track room membership status in store
- Add invitedRooms derived property
- Show invites section in RoomList with accept/decline buttons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:13:52 +01:00
Till-JS
d37f5894dc fix(matrix): validate lastMessageTime before formatting in RoomItem
Add date validation to prevent "Invalid time value" errors when rooms
have invalid or zero timestamps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:08:06 +01:00
Till-JS
68a8ad60b9 fix(tts-bot): change port to 3033 to avoid conflict with nutriphi 2026-01-29 16:06:25 +01:00
Till-JS
56d49f8fe2 fix(matrix): handle invalid timestamps gracefully
Add validation before formatting dates to prevent "Invalid time value" errors
when messages have undefined or invalid timestamps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:04:50 +01:00
Till-JS
41354d58ee fix(matrix-tts-bot): fix Dockerfile pnpm install 2026-01-29 16:04:08 +01:00
Till-JS
58a051645b feat(matrix): add TTS bot for text-to-speech conversion
- NestJS bot that converts text messages to speech via mana-tts
- Commands: !voice, !voices, !speed, !status, !help
- User settings stored in-memory (voice, speed per user)
- Docker config for Mac Mini deployment
- Setup script for bot registration

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 16:03:26 +01:00
Till-JS
7442b09471 fix(matrix): wait for i18n to load before rendering
Prevents "Cannot format a message without first setting the initial locale"
error by showing a loading state until svelte-i18n is ready.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:02:26 +01:00
Till-JS
8804ab77a2 ♻️ refactor: centralize AppLoadingSkeleton in shared-ui
Add configurable AppLoadingSkeleton component to @manacore/shared-ui
with multiple layout presets: list, tasks, sidebar, centered, minimal.

Migrate 3 apps to use the shared component:
- contacts: uses default 'list' layout
- todo: uses 'tasks' layout
- questions: uses 'sidebar' layout

Apps with highly specific layouts (calendar, clock) retain their
local implementations for now.
2026-01-29 15:24:29 +01:00
Till-JS
cdac341882 ♻️ refactor: centralize global error handler in shared-ui
Extract setupGlobalErrorHandler() utility from contacts app and add to
@manacore/shared-ui. Migrate 7 apps to use the shared implementation:
calendar, chat, clock, contacts, matrix, picture, storage.

Features:
- Catches unhandled promise rejections with error classification
- Handles offline/online network status changes
- Built-in i18n (DE + EN) with customizable translations
- Optional onAuthError callback for redirect handling
- Returns cleanup function for proper unmounting
2026-01-29 15:17:17 +01:00
Till-JS
aca66b2014 feat(matrix): add voice note recording and playback
- Add voice recording with MediaRecorder API
- Show recording indicator with duration
- Replace send button with microphone when input is empty
- Add audio player UI for voice messages with play/pause and progress

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:12:44 +01:00
Till-JS
69d405ca84 ♻️ refactor: centralize AuthGateModal in shared-auth-ui
- Create shared AuthGateModal component in @manacore/shared-auth-ui
- Migrate 4 apps to use shared component: chat, todo, contacts, calendar
- Remove duplicate local AuthGateModal components
- Support for 'save', 'sync', 'feature', 'ai' actions
- Built-in i18n (DE + EN) with custom translation support
- Optional migration info display for session data
- Uses Phosphor icons from @manacore/shared-icons
- Update CONSISTENCY_REPORT.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:03:52 +01:00
Till-JS
0d559c99d6 feat(matrix): show DMs and rooms as sections instead of tabs
Display direct messages and group rooms directly below each other
with section headers instead of using a tab switcher.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:56:28 +01:00
Till-JS
0c150df0f1 feat(auth): add resend verification email to all login pages
Add ability to resend verification email when login fails with
"Email not verified" error. Implemented across all 14 apps using
Mana Core Auth.

Changes:
- Add POST /api/v1/auth/resend-verification endpoint to mana-core-auth
- Add resendVerificationEmail method to shared-auth client
- Update LoginPage component with resend UI and translations
- Add resendVerificationEmail to all app auth stores
- Add translations for de, en, fr, es, it
- Add PlantaLogo to shared-branding
- Migrate planta login to shared LoginPage component
2026-01-29 14:55:49 +01:00
Till-JS
f911243bf0 fix(matrix): use padding-bottom for bottom navigation
The PillNavigation is positioned at the bottom, so the content area
needs padding-bottom instead of padding-top.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:52:56 +01:00
Till-JS
d492212261 fix(matrix): use valid theme variant 'lavender' instead of 'purple'
The theme variant 'purple' doesn't exist - valid variants are:
lume, nature, stone, ocean, sunset, midnight, rose, lavender

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:49:14 +01:00
Till-JS
5a0815708c 🌐 feat: add i18n support to 6 web apps
Add internationalization (DE + EN) to previously missing apps:
- todo: task management translations
- skilltree: skill/XP system translations
- nutriphi: nutrition tracking translations
- planta: plant care translations
- questions: research app translations
- matrix: chat client translations (layout integration)

Each app includes:
- svelte-i18n setup with SSR support
- localStorage persistence ({app}_locale pattern)
- i18n loading state in +layout.svelte
- German (default) and English translations

Updated CONSISTENCY_REPORT.md to mark i18n task as complete.

Also includes:
- mana-tts service placeholder files
2026-01-29 14:48:35 +01:00
Till-JS
a938ed86d4 fix(matrix): add shared-branding and shared-ui to Dockerfile
Update lockfile and Dockerfile to include missing shared packages
required for PillNavigation integration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:43:41 +01:00
Till-JS
cc130ccb24 feat(matrix): add PillNavigation and theming integration
- Add PillNavigation component from @manacore/shared-ui
- Create theme store with purple color scheme
- Add i18n support (DE/EN) with svelte-i18n
- Integrate theme switching, language selector, app switcher
- Add glassmorphic utility classes to app.css
- Update layouts to match other apps' navigation pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:41:59 +01:00
Till-JS
1e5175e522 ♻️ refactor: migrate calendar, picture, nutriphi, planta, questions, skilltree to shared-api-client
- Update all web apps to use @manacore/shared-api-client
- Remove calendar's local base-client.ts (duplicate of shared package)
- Calendar: update todos.ts and birthdays.ts to use shared client
- Maintain backward compatibility with existing patterns:
  - picture: fetchApi, uploadFile, uploadFiles functions
  - nutriphi: apiClient class with throw-based errors
  - planta: fetchApi function with {data, error} format
  - questions/skilltree: apiClient with setAccessToken pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:32:47 +01:00
Till-JS
75b5fb2fae feat(matrix): update web app design to match chat app
- Add glassmorphic design system utilities
- Update Message component with gradient avatars and bubble design
- Update MessageInput with pill-shaped glassmorphic container
- Update RoomList with modern search and tabs
- Update RoomItem with card-style design
- Update RoomHeader with glass-style buttons
- Replace DaisyUI colors with semantic design tokens
- Add fade-in animations for messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:31:56 +01:00
Till-JS
5322709fca ♻️ refactor: migrate todo, contacts, storage to shared-api-client
- Update todo, contacts, storage web apps to use @manacore/shared-api-client
- Maintain backward compatibility with existing legacy wrappers
- Todo: apiClient wrapper for setAccessToken/getAccessToken pattern
- Contacts: fetchWithAuth/fetchWithAuthFormData wrappers
- Storage: toLegacyResponse wrapper for ApiResponse format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:27:11 +01:00