Commit graph

806 commits

Author SHA1 Message Date
Till-JS
111fc473d9 🐛 fix(auth): implement password reset email link handler
- Add GET /api/auth/reset-password/:token endpoint to handle email links
- Create password-reset-redirect store to track source app URLs
- Include callbackURL in reset emails for proper app redirection
- Add redirectTo parameter to forgotPassword in shared-auth
- Create /reset-password page in calendar app with DE/EN translations
- Update calendar authStore with resetPasswordWithToken method

Fixes 404 error when clicking password reset link from email
2026-01-28 15:49:33 +01:00
Till-JS
2c341b5328 feat(matrix): add Matrix Todo Bot service
GDPR-compliant task management bot for Matrix with:
- Task CRUD: !add, !list, !done, !delete
- Priority support: !p1 to !p4
- Date shortcuts: @heute, @morgen, @übermorgen
- Project tags: #projektname
- Natural language keywords: hilfe, zeige aufgaben, heute
- Welcome messages and auto-pin help on room join
- Per-user task isolation via Matrix user ID
- Local JSON storage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:47:33 +01:00
Till-JS
3389252d3a fix(todo-web): remove localhost fallbacks triggering local network permission
- Remove localhost:3018 pattern from service worker cache strategies
- Update auth store to only use localhost fallback in development mode
- Bump service worker cache version to v3 to force update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:33:36 +01:00
Till-JS
4fa8608744 🔧 chore: add nutriphi to cloudflare tunnel config 2026-01-28 15:31:39 +01:00
Till-JS
c031540ef1 🚀 ci(nutriphi): add production deployment configuration
- Add backend Dockerfile with multi-stage build and health checks
- Add web Dockerfile with SvelteKit static env vars
- Add docker-entrypoint.sh for automatic DB migration
- Add nutriphi-backend and nutriphi-web to docker-compose.macmini.yml
- Add CI/CD detection and build jobs for nutriphi
- Update CORS origins in mana-core-auth to include nutriphi.mana.how
- Include nutriphi in deploy:landing:all script

Ports: Backend 3023, Web 5189
Domain: nutriphi.mana.how / nutriphi-api.mana.how
2026-01-28 15:29:43 +01:00
Till-JS
43991383a1 feat(todo): add deploy:landing:todo script for Cloudflare Pages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:26:45 +01:00
Till-JS
7138236046 feat(calendar): add runtime STT URL injection for production
- Add PUBLIC_STT_URL to hooks.server.ts runtime injection
- Update stt.ts to use runtime-injected URL with fallback
- Update .env.development to use production STT URL
- Update generate-env.mjs with STT URL mapping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:25:39 +01:00
Till-JS
3ff8d3833b feat(nutriphi): prepare for production release with tests and improved UX
- Remove broken header links to non-existent settings/profile pages
- Replace header links with settings page link
- Remove TODO comments for credit system in analysis controller
- Add comprehensive error handling with German messages in meals store
- Add loading states, retry buttons, and error displays in UI components
- Create new settings page with daily goals editor
- Add 99 tests across backend, web, and shared packages:
  - Backend: MealService, GoalsService, StatsService, FavoritesService,
    RecommendationsService, nutrition.utils (Jest)
  - Web: API client tests with mocks (Vitest)
  - Shared: utility function tests (Vitest)
- Set up test infrastructure (Jest for NestJS, Vitest for SvelteKit)
2026-01-28 15:23:35 +01:00
Till-JS
ee630158c5 feat(matrix-ollama-bot): add natural language commands and welcome messages
- Add keyword detection for German/English commands (hilfe, modelle, status)
- Send welcome message when users join the room
- Send bot introduction when invited to new rooms
- Add !pin command to pin help message
- Auto-pin help when joining new rooms
- Update help text with simpler command overview

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:56:32 +01:00
Till-JS
e4145324b2 feat(matrix-ollama-bot): add vision commands and filter non-chat models
- Add !vision command to analyze images with vision models
- Add !vision:all command to compare all vision models
- Filter out specialized models (deepseek-r1) from !all comparison
- Add chatWithImage method to OllamaService for vision requests
- Switch Dockerfile from pnpm to npm for better compatibility
- Add .dockerignore and tsconfig.build.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:23:30 +01:00
Till-JS
437d612e81 ♻️ refactor(contacts): remove statistics, network view and session storage; implement demo mode
- Remove statistics feature (stores, routes, ~560 LOC)
- Remove network view with D3.js graph (~1,100 LOC)
- Remove session-based contact storage
- Add demo contacts for unauthenticated users (10 sample contacts)
- Add auth gate prompts for create/edit/delete/favorite actions
- Update layout with Demo-Modus banner and event handling
- ~1,760 lines of code removed for simpler, cleaner codebase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:12:19 +01:00
Till-JS
1dc4f58edb feat(todo): prepare for production deployment
- Fix type-check errors (subtask id, duplicate currentLocale)
- Add complete Astro landing page with Hero, Features, Pricing, CTA
- Add production environment templates (.env.example, .env.production.example)
- Add docker-compose.prod.yml for production deployment
- Add deploy.sh script for server deployment
- Add /health endpoint for web app health checks
- Improve docker-entrypoint.sh with database wait logic
- Remove references to deleted statistics and session-tasks stores

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:04:27 +01:00
Till-JS
99fdf1d17f ♻️ refactor(todo): remove statistics, network view and session tasks; implement demo mode
Remove complex, low-usage features to simplify codebase:
- Statistics/Heatmap: ~1,900 LOC removed (charts, store, page)
- Network View: ~800 LOC removed (D3.js graph, store, API, page)
- Session Tasks: ~190 LOC removed, replaced with demo mode

Demo mode improvements:
- Static sample tasks instead of confusing sessionStorage behavior
- Auth gate shows when users try to create/edit/complete tasks
- Clear "Demo-Modus" banner for unauthenticated users
- Better UX: users can explore the app without frustration

Total estimated savings: ~2,800 LOC
2026-01-28 13:58:15 +01:00
Till-JS
836b341b3e feat(matrix-ollama-bot): add !all command for model comparison
- Add !all [question] command to query all models and compare responses
- Show response times for each model
- Update help text with new command and rename to Mana Chat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:43:58 +01:00
Till-JS
54752d4dac 📝 docs(calendar): update cleanup plan with session events commit hash 2026-01-28 13:42:08 +01:00
Till-JS
cef8321667 ♻️ refactor(calendar): replace session events with demo mode
- Remove session-events.svelte.ts (~154 LOC)
- Add demo-events.ts with static sample events
- Simplify events.svelte.ts by removing session logic
- Update AuthGateModal for demo mode messaging
- Show auth gate when users try to create/edit events
- Update banner from "Gast-Modus" to "Demo-Modus"

First-time visitors now see realistic sample events instead of an
empty calendar. Clicking on events or trying to create new ones
prompts for login, providing a better UX than the previous session
storage approach where events would be lost on tab close.
2026-01-28 13:41:47 +01:00
Till-JS
a44664c691 📝 docs(calendar): update cleanup plan after network view removal 2026-01-28 13:31:42 +01:00
Till-JS
9a93ca0c89 🔥 refactor(calendar): remove Network View feature
Remove Network View (D3 event graph visualization) to reduce complexity:
- Delete NetworkView.svelte component (~416 LOC)
- Delete network.svelte.ts store (~371 LOC)
- Delete network.ts API client (~47 LOC)
- Delete view-mode.svelte.ts store (~76 LOC)
- Remove network tab from view switcher
- Simplify view switching logic

Also adds voice recording feature (separate work, included to fix build):
- Add VoiceRecordButton and VoiceRecordingModal components
- Add voice-recording store and audio utilities
- Integrate voice input into calendar layout

Add CLEANUP_PLAN.md documenting planned simplifications.

Total removal: ~910 LOC
2026-01-28 13:31:13 +01:00
Till-JS
19199290f5 fix(matrix): hide E2E encryption warnings in Element
Since bots cannot support E2E encryption and all data is stored locally,
hide the encryption warning banners for better UX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:13:44 +01:00
Till-JS
2f3473b73f 🔥 refactor(calendar): remove statistics and heatmap feature
Remove unused statistics/heatmap functionality to reduce complexity:
- Delete statistics.svelte.ts and heatmap.svelte.ts stores
- Delete StatsSidebarSection.svelte and StatsOverlay.svelte components
- Remove heatmap toggle button from toolbar
- Remove "Statistiken" nav item and Cmd+3 shortcut
- Clean up heatmap CSS from all calendar views
2026-01-28 13:10:58 +01:00
Till-JS
8eac78599d fix(matrix-project-doc-bot): fix main.js path in Dockerfile
The dist output is at dist/src/main.js due to drizzle.config.ts at root level.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:01:06 +01:00
Till-JS
96e64b2a37 fix(matrix-bots): exclude crypto-nodejs module that fails on Alpine
Use pnpm overrides to replace @matrix-org/matrix-sdk-crypto-nodejs with
an empty package since E2E encryption is not needed for these bots.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:57:12 +01:00
Till-JS
f488bd8eab fix(matrix): hardcode database password (env vars not expanded in YAML)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:54:11 +01:00
Till-JS
8e6adfdb10 feat(services): add Telegram bot services for NutriPhi, Todo, and Zitare
Add three new Telegram bot services:

- telegram-nutriphi-bot: Nutrition tracking bot with Gemini AI analysis
  - Photo meal analysis
  - Daily nutrition goals and tracking
  - Statistics and reports

- telegram-todo-bot: Todo list management bot
  - Integration with Todo backend API
  - Reminder scheduling
  - User preferences per chat

- telegram-zitare-bot: Daily inspiration quotes bot
  - Scheduled daily quotes
  - Quote database with authors
  - User subscription management

All bots use NestJS with nestjs-telegraf for Telegram integration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:52:01 +01:00
Till-JS
7f3842b63c fix(matrix): set session_lifetime >= refresh_token_lifetime
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:49:56 +01:00
Till-JS
d614587820 📝 docs: add comprehensive monitoring stack documentation 2026-01-28 12:49:39 +01:00
Till-JS
b1a8ca861e fix(matrix): separate config and data mounts for Synapse
Mount config files to /config and data directory to /data to avoid mount conflicts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:48:50 +01:00
Till-JS
b017534f0b fix(matrix): use bind mount instead of named volume for Synapse data
Fixes permission issues with signing.key generation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:47:51 +01:00
Till-JS
9ff709dc49 fix(matrix): use local Docker images for Matrix bots
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:45:26 +01:00
Till-JS
f778e95455 🐛 fix(auth): use node:20-slim for DuckDB glibc compatibility 2026-01-28 12:44:04 +01:00
Till-JS
53653743f0 fix(matrix-bots): add --ignore-scripts to Dockerfiles
Skip postinstall scripts for matrix-sdk-crypto-nodejs which
doesn't build on Alpine Linux. E2E encryption not needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:42:11 +01:00
Till-JS
2e71b5f1d9 feat(calendar): add Google/Apple Calendar sync module
Implement external calendar synchronization:
- CalDAV sync for Apple Calendar and generic CalDAV servers
- Google Calendar API integration with OAuth2 flow
- iCal URL import for read-only calendar feeds
- Bi-directional sync with configurable direction
- Scheduled background sync (every 5 minutes)
- Manual sync trigger via API

New endpoints:
- GET/POST /api/v1/sync/external - List/connect external calendars
- GET/PUT/DELETE /api/v1/sync/external/:id - Manage external calendar
- POST /api/v1/sync/external/:id/sync - Trigger manual sync
- POST /api/v1/sync/caldav/discover - Discover CalDAV calendars
- GET /api/v1/sync/google/auth-url - Get Google OAuth URL
- GET /api/v1/sync/google/callback - Handle OAuth callback
- GET /api/v1/calendars/:id/export.ics - Export calendar as iCal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:41:32 +01:00
Till-JS
b50376dfdb fix(matrix-bots): update to matrix-bot-sdk v0.7 API
- Import LogLevel separately instead of LogService.LogLevel
- Change sendTyping to setTyping
- Use any type for event handler to avoid generic type issues
- Fix Buffer to Uint8Array conversion for OpenAI File API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:40:28 +01:00
Till-JS
9dfad0128a 📈 feat(monitoring): upgrade to VictoriaMetrics + DuckDB analytics
- Replace Prometheus with VictoriaMetrics (2-year retention)
- Add DuckDB analytics module for business KPIs (unlimited retention)
- Add master overview dashboard combining all metrics
- Add business metrics dashboard for user growth tracking
- Add backup script for VictoriaMetrics snapshots and DuckDB
- Add ADR documentation for monitoring stack decision

Analytics API endpoints:
- GET /api/v1/analytics/health - Service health
- GET /api/v1/analytics/latest - Latest metrics snapshot
- GET /api/v1/analytics/growth - User growth over time
- GET /api/v1/analytics/monthly - Monthly aggregates
- POST /api/v1/analytics/snapshot - Manual snapshot trigger
2026-01-28 12:38:04 +01:00
Till-JS
2e7378710f 🧹 chore(calendar): cleanup debug logs and stale comments
- Replace console.error with NestJS Logger in NetworkService
- Remove debug console.log statements from mana page and events store
- Remove stale TODO comment in ShareController (user.email already available)
- Update TODO comments to "Workaround" notes in EventContextMenu
- Fix port fallback in main.ts (3016 → 3014) for consistency
2026-01-28 12:31:43 +01:00
Till-JS
78ff102631 feat(calendar): add production launch features
- Email Service: Add email.service.ts with Brevo SMTP for reminders and
  calendar share invitations (German templates)
- Push Notifications: Add notification module with Expo Push API support,
  device token management, and notification.controller.ts endpoints
- Reminder Service: Integrate email and push notifications in reminder
  processing, add userEmail field to reminders schema
- Share Service: Send invitation emails when sharing calendars
- Unit Tests: Add jest.config.js and 63 tests for CalendarService,
  EventService, ReminderService, and ShareService with mock utilities
- Database Migrations: Add migrate.ts with advisory locks for safe
  production deployments
- Type-Checking: Enable type-check script for web app, fix all TypeScript
  errors including CalendarViewType completeness and optional field access

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:30:01 +01:00
Till-JS
cb130191ab 🔥 chore(picture): remove PostHog analytics for GDPR compliance
- Remove posthog-js dependency from picture web app
- Delete PostHog integration module and setup documentation
- Remove PostHog initialization from root layout
- Clean up environment variables from .env.example
- Update logger comments to remove Sentry references
- Update PROJECT_OVERVIEW.md to reflect Umami as analytics tool
2026-01-28 12:24:22 +01:00
Till JS
13754f2d55
Merge pull request #23 from Memo-2023/claude/gdpr-bot-alternatives-VFgL1
Claude/gdpr bot alternatives v fg l1
2026-01-28 11:43:48 +01:00
Claude
7c5e9e3c49
feat(matrix): add Stats Bot and Project Doc Bot services
Complete GDPR-compliant bot suite for Matrix:

matrix-stats-bot (port 3312):
- Analytics reports from Umami
- Commands: !stats, !today, !week, !realtime, !users
- Scheduled daily/weekly reports to Matrix room

matrix-project-doc-bot (port 3313):
- Project documentation with photos, voice, text
- Voice transcription via OpenAI Whisper
- Blog generation with 5 styles (casual, technical, tutorial, social, story)
- Commands: !new, !projects, !switch, !status, !generate, !export
- Uses PostgreSQL + S3 (MinIO) for storage

Changes:
- docker-compose.macmini.yml: Added both Matrix bots
- health-check.sh: Added health checks for both bots

Environment variables required:
- MATRIX_STATS_BOT_TOKEN, MATRIX_PROJECT_DOC_BOT_TOKEN
- OPENAI_API_KEY (for Project Doc Bot)

https://claude.ai/code/session_01E3r5aFW3YLAhEJfsL2ryhv
2026-01-28 00:44:28 +00:00
Claude
aabe328b51
feat(matrix): add Matrix Ollama Bot service
GDPR-compliant replacement for telegram-ollama-bot using Matrix protocol:

New service: services/matrix-ollama-bot/
- NestJS application with matrix-bot-sdk
- Same functionality as telegram-ollama-bot
- Commands: !help, !models, !model, !mode, !clear, !status
- System prompts: default, classify, summarize, translate, code
- Chat history per user (last 10 messages)

Changes:
- docker-compose.macmini.yml: Added matrix-ollama-bot service
- health-check.sh: Added Matrix Ollama Bot health check

Environment variables required:
- MATRIX_OLLAMA_BOT_TOKEN: Bot access token
- MATRIX_OLLAMA_BOT_ROOMS: Optional room restrictions

https://claude.ai/code/session_01E3r5aFW3YLAhEJfsL2ryhv
2026-01-28 00:35:35 +00:00
Claude
3aa9e8608d
feat(matrix): add self-hosted Matrix infrastructure for GDPR compliance
Add complete Matrix/Synapse setup as Telegram bot alternative:

Docker configuration:
- Synapse homeserver (port 8008) with PostgreSQL backend
- Element Web client (port 8087) with ManaCore branding
- DSGVO-compliant data retention policies (1-365 days)
- Prometheus metrics endpoint for monitoring

Config files:
- docker/matrix/homeserver.yaml - Synapse configuration
- docker/matrix/log.config.yaml - Logging with rotation
- docker/matrix/element-config.json - Element Web settings

Scripts & docs:
- scripts/mac-mini/setup-matrix.sh - One-time initialization
- Updated health-check.sh with Matrix services
- Updated MAC_MINI_SERVER.md with Matrix documentation

https://claude.ai/code/session_01E3r5aFW3YLAhEJfsL2ryhv
2026-01-28 00:20:12 +00:00
Claude
28637dffc2
📝 docs: add Matrix self-hosting plan for GDPR-compliant bots
Comprehensive plan for migrating Telegram bots to self-hosted Matrix:
- Synapse homeserver setup on Mac Mini
- Element Web client configuration
- Bot migration strategy (NestJS with matrix-bot-sdk)
- Docker Compose integration
- Cloudflare Tunnel configuration

https://claude.ai/code/session_01E3r5aFW3YLAhEJfsL2ryhv
2026-01-28 00:14:54 +00:00
Till-JS
e72f3b7865 🧑‍💻 feat(dx): improve local development experience
- Add dev credentials pre-fill on login page (dev@manacore.local)
- Add initialPassword prop to LoginPage component
- Add seed script for dev user (pnpm db:seed:dev in mana-core-auth)
- Add OLLAMA_URL to .env.development for Mac Mini connection
2026-01-27 16:58:11 +01:00
Till-JS
ca00672016 feat(chat): add model comparison feature
Add /compare route to test prompts against multiple Ollama models:
- CompareInput: prompt textarea with temperature/max tokens controls
- ModelResponseCard: displays response with status, metrics, markdown
- ModelResponseGrid: responsive grid layout for side-by-side comparison
- CompareProgress: progress bar with cancel functionality
- Svelte 5 runes-based store for state management
- Add Scales icon to shared-ui navigation
2026-01-27 16:57:56 +01:00
Till-JS
14c83cb4bd feat(shared-auth-ui): add GuestWelcomeModal for guest onboarding
Add a unified welcome modal for guest mode that displays:
- App icon, name, and description from shared-branding
- Feature list of what guests can do (localized DE/EN)
- Warning about local-only data storage
- Login, Register, Help, and "Continue as Guest" buttons

New files:
- GuestWelcomeModal.svelte - The modal component
- guestWelcome.ts - localStorage utilities for tracking seen state

Integrated into: contacts, chat, todo, calendar, and clock apps
2026-01-27 16:57:14 +01:00
Till-JS
6402f287e8 feat(telegram-bot): add local STT support and Prometheus metrics
- Fix telegram_user_id column type (integer -> bigint) for large user IDs
- Add local STT support via mana-stt service (Whisper MLX + Voxtral)
- Add STT provider config (local/openai) with fallback support
- Add Grafana dashboard for mana-stt service metrics
- Add ollama-metrics-proxy for LLM metrics collection
- Add Grafana dashboard for Ollama LLM metrics

Services added/updated:
- telegram-project-doc-bot: local STT integration
- mana-stt: Grafana dashboard
- ollama-metrics-proxy: new service for Ollama metrics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 16:51:09 +01:00
Till-JS
876fd43a1c 🔥 chore: remove maerchenzauber from codebase
- Remove app definition from MANA_APPS and APP_URLS
- Remove AppId type entry and branding config
- Delete app icon SVG and StorytellerLogo component
- Remove StorytellerLogo export from logos/index.ts and main index.ts
- Delete maerchenzauber.css theme file
- Delete landing page content (maerchenzauber-de.md)
- Remove env generation config for backend/mobile/web
- Update CLAUDE.md archived projects list
2026-01-27 15:57:19 +01:00
Till-JS
7252498f32 fix(health-check): correct presi-backend health endpoint path
Use /api/v1/health instead of /api/health.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:05:04 +01:00
Till-JS
ac164c622c fix(docker): correct presi-backend health check path
The health endpoint is at /api/v1/health, not /api/health.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:04:20 +01:00
Till-JS
d1e9c87b1c fix(todo): correct health check URL in startup log
The health endpoint is at /health (excluded from api/v1 prefix),
not /api/v1/health.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 03:39:32 +01:00