Commit graph

912 commits

Author SHA1 Message Date
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
Till-JS
fa78769e82 📝 docs: update consistency report with API client progress
- Mark API Client Patterns as "In Arbeit"
- Add @manacore/shared-api-client to completed tasks
- Note clock app as first migrated (proof of concept)
- List remaining apps to migrate

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:20:55 +01:00
Till-JS
e23d1194d8 feat: add @manacore/shared-api-client package
Create unified API client for all web apps with:
- createApiClient factory function
- ApiResult<T> Go-style error handling
- HTTP methods: get, post, put, patch, delete, upload
- Auto token handling via getAuthToken callback
- Timeout support with AbortController
- Retry logic with exponential backoff
- Runtime URL injection for Docker
- FormData support for file uploads

Migrate clock app as proof of concept:
- Replace local fetchApi with shared createApiClient
- Update stores to use ApiError.message

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:19:55 +01:00
Till-JS
2b3210df85 chore(matrix): add Dockerfile and docker-compose config for web app
- Add multi-stage Dockerfile for matrix/web
- Add matrix-web service to docker-compose.macmini.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:08:19 +01:00
Till-JS
55afb39acf 📝 docs: update consistency report with completed items
Mark as completed:
- Tailwind Vite plugin migration (4 apps)
- Toast system centralization (6 apps)
- Dependency version standardization (15 apps)
- lucide-svelte removal from shared-ui

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:07:31 +01:00
Till-JS
aa5fc451b6 ♻️ refactor(shared-ui): remove lucide-svelte dependency
- Migrate ImmersiveModeToggle to use @manacore/shared-icons (CaretUp/CaretDown)
- Remove lucide-svelte from shared-ui package.json
- All shared-ui components now use Phosphor icons consistently

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:05:46 +01:00
Till-JS
14ce457c7b refactor(shared-ui): centralize toast system across all web apps
- Add toast module to @manacore/shared-ui (toastStore, ToastContainer)
- Remove local toast implementations from:
  - calendar/web
  - chat/web
  - clock/web
  - contacts/web
  - picture/web
  - storage/web
- Update all apps to import toast from shared-ui
- Consistent toast API: toast.success(), toast.error(), toast.info()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:03:29 +01:00
Till-JS
6d0d9d4f67 feat(questions): add demo mode for unauthenticated users
- Add demo-questions.ts with sample questions and collection
- Update questionsStore to show demo data when not authenticated
- Update collectionsStore with demo mode support
- Add demo banner and GuestWelcomeModal to layout
- Block create/update/delete operations in demo mode
2026-01-29 13:57:20 +01:00
Till-JS
51ec8f8419 feat(skilltree): add central auth pages with shared components
- Add SkillTreeLogo to shared-branding (emerald green theme)
- Add login, register, forgot-password pages using shared-auth-ui
- Initialize authStore in layout alongside skillStore
- Add shared-auth-ui, shared-i18n, shared-branding dependencies
- German translations as default

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:55:22 +01:00
Till-JS
f3424c26aa ⬆️ chore: standardize web app dependencies
Update all 15 web apps to consistent dependency versions:

- @sveltejs/kit: ^2.47.1 (was mixed ^2.0.0 to ^2.47.1)
- svelte: ^5.41.0 (was mixed ^5.0.0 to ^5.41.0)
- svelte-check: ^4.3.3 (was mixed ^4.0.0 to ^4.3.3)
- typescript: ^5.9.3 (was mixed ^5.0.0 to ^5.9.3)

Benefits:
- Consistent type checking behavior across apps
- All apps benefit from latest Svelte 5 features
- Easier maintenance with unified versions
2026-01-29 13:49:55 +01:00
Till-JS
52c4206cb2 perf: migrate Tailwind from PostCSS to Vite plugin
Migrate 4 web apps from @tailwindcss/postcss to @tailwindcss/vite:
- chat
- manadeck
- manacore
- presi

Changes per app:
- Replace @tailwindcss/postcss with @tailwindcss/vite in package.json
- Add tailwindcss() to vite.config.ts plugins array
- Delete postcss.config.js (no longer needed)

Benefits:
- Faster builds with native Vite integration
- Consistent build pipeline across all 14 web apps
- Simplified configuration (no separate PostCSS config)
2026-01-29 13:45:42 +01:00
Till-JS
3d15539117 feat(questions): add PillNavigation and QuickInputBar
- Replace custom sidebar with shared PillNavigation component
- Add QuickInputBar for quick question creation and search
- Add Questions app to mana-apps configuration
- Add questions icon to app-icons.ts
- Register questions URL in APP_URLS (port 5111)
2026-01-29 13:38:16 +01:00
Till-JS
1733580d05 fix(types): resolve TypeScript errors across multiple packages
- bot-services: Add registerAsync to AI, Calendar, Clock, Todo modules
- bot-services: Add convenience methods to ClockService for bot handlers
- bot-services: Make CreateEventInput.endTime optional with sensible defaults
- bot-services: Fix empty interface ESLint errors (use type aliases)
- questions-backend: Add missing schema columns (isDefault, sortOrder, deletedAt)
- questions-backend: Fix or() return type handling in question service
- questions-web: Add guard for undefined question ID in route params
- skilltree-web: Fix DBSchema type by not extending idb interface directly
- calendar-web: Fix Check icon prop (use weight instead of strokeWidth)
- matrix-mana-bot: Update clock handler to use new service methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:33:01 +01:00
Till-JS
91143a497b feat(questions): unify auth pages with shared components
- Add Questions branding to shared-branding package (logo, colors)
- Create QuestionsLogo.svelte component
- Refactor login page to use shared LoginPage component
- Refactor register page to use shared RegisterPage component
- Refactor forgot-password page to use shared ForgotPasswordPage component
- Fix Svelte 5 class: directive on components (+page.svelte)

The Questions app now uses the same auth UI as Calendar, Chat, and other apps.
2026-01-29 13:30:37 +01:00
Till-JS
da4b1e696b 📝 docs: add monorepo consistency report
Comprehensive analysis of inconsistencies across all web apps:
- Dependencies & versions (Tailwind, SvelteKit, Vite, TypeScript)
- API client patterns (3 architectures, 5 error handling strategies)
- i18n implementation (10 apps with, 7 without)
- Auth implementation (97% consistent)
- Styling & Tailwind (97% consistent)
- Components & layouts (duplications identified)

Includes prioritized recommendations for standardization.
2026-01-29 13:30:19 +01:00
Till-JS
f5247b5e01 💄 style(questions): fix class directive syntax for Phosphor icons 2026-01-29 13:17:31 +01:00