Commit graph

780 commits

Author SHA1 Message Date
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
Till-JS
fe8cb3cebb 🐛 fix(health-check): correct health endpoint paths
The backends exclude /health from the api/v1 prefix, so the correct
endpoint is /health not /api/v1/health. Also added missing services
(Contacts, Storage, Presi) and use /health for web apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 03:39:16 +01:00
Till-JS
c4c00dc885 📝 docs: add devlog for 2026-01-26 monitoring, auth & AI updates
Document 54 commits covering Prometheus metrics, Brevo email service,
email verification flow, Ollama integration, Speech-to-Text service,
and two new Telegram bots.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 03:37:59 +01:00
Till-JS
7c20d88649 feat(services): add telegram-project-doc-bot service
Add new NestJS-based Telegram bot for project documentation with:
- Drizzle ORM for database access
- OpenAI integration for AI features
- S3 storage support via AWS SDK
- Monorepo integration (dev scripts, database setup, MinIO bucket)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 03:29:08 +01:00
Till-JS
bff80b552a fix(stt): remove unsupported add_generation_prompt kwarg 2026-01-27 03:24:43 +01:00
Till-JS
a2233dc366 fix(stt): properly encode audio as base64 for Voxtral 2026-01-27 02:13:34 +01:00
Till-JS
e7e3561463 📝 docs: add external services analysis and self-hosting guide
Comprehensive documentation of all external dependencies in the
ManaCore monorepo with self-hosting alternatives for Mac Mini:
- AI services (Replicate, OpenRouter, Gemini) -> ComfyUI, LLaVA
- Email services -> Postal, useSend
- Cost analysis and implementation roadmap

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 02:04:31 +01:00
Till-JS
49255ac794 fix(stt): use correct AutoModel for Voxtral multimodal architecture 2026-01-27 01:58:32 +01:00
Till-JS
9bd699aec7 fix(stt): add Homebrew to PATH for ffmpeg 2026-01-27 01:52:09 +01:00
Till-JS
92a700ac7e fix(stt): change default model to large-v3 (large-v3-turbo not supported by lightning-whisper-mlx) 2026-01-27 01:36:49 +01:00
Till-JS
bf0fa04e7e feat(stt): add speech-to-text service for Mac Mini
Add mana-stt service with Whisper and Voxtral support for local
transcription. Includes setup script and launchd integration for
automatic startup on Mac Mini server.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:33:10 +01:00
Till-JS
aeabd21d4a feat(storage): add verified banner to login page
Add verification status query params to storage login page,
consistent with other apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:32:59 +01:00
Till-JS
d8b61d0058 📝 docs: add design UX guidelines and local model documentation
Add design-ux.md with UI patterns (inline editing, mobile-first,
animations). Add LOCAL_LLM_MODELS.md and LOCAL_STT_MODELS.md
documenting available AI models for the Mac Mini server.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:32:31 +01:00
Till-JS
cb3c1ffb93 ♻️ refactor(todo): replace edit modal with inline task editing
Redesign TaskItem to expand inline for editing instead of opening
a separate modal. Improves UX by keeping user context and reducing
visual interruption. Removes modal-related code from pages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:32:14 +01:00
Till-JS
09b8d7b384 feat(auth-ui): show email verified banner on login pages
Add verified banner and email pre-fill to LoginPage component when
users are redirected after email verification. Updates all app login
pages to pass verification params from URL query string.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:31:55 +01:00
Till-JS
2ccd063628 feat(auth): redirect users to source app after email verification
Add sourceAppUrl tracking during registration to redirect users back
to the app they registered from after email verification. Includes
URL validation for security (only *.mana.how, mana.how, localhost).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:31:31 +01:00
Till-JS
3df7157389 🐛 fix(calendar): fix app hanging and layout issues
- Fix $effect infinite loop causing app to hang after guest mode
- Track viewType and currentDate primitives instead of derived viewRange
- Fix root layout to use h-screen flex container for full height
- Fix guest banner offset using padding instead of margin
- Calendar now fills entire screen with UI floating on top
- Simplify i18n initialization
2026-01-26 21:20:29 +01:00
Till-JS
be365a0c1e feat(manacore): add email verification result pages
Add success and failure pages for email verification:
- /email-verified - shows success message with login button
- /verification-failed - shows error message with relevant actions

These pages are redirected to from mana-core-auth's verify-email endpoint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:43:02 +01:00
Till-JS
ad4ae93f29 feat(auth): add email verification endpoint for Better Auth
Better Auth generates verification URLs with /api/auth/verify-email path,
but NestJS uses /api/v1 prefix. This adds a passthrough controller to
handle the native Better Auth routes and properly verify user emails.

- Add BetterAuthPassthroughController for /api/auth/* routes
- Add verifyEmail method to BetterAuthService
- Exclude /api/auth/* from global prefix in main.ts
- Register passthrough controller in AuthModule

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:28:30 +01:00
Till-JS
def7249058 🚸 feat(todo): redesign homepage empty state and section visibility
- Remove "Meine Aufgaben" header (sections are self-explanatory)
- Add enhanced empty state with animated sparkle icon, motivational
  message, and clickable syntax examples that insert into input bar
- Implement smart section visibility (only show sections with tasks,
  but always show "Today" as primary workspace)
- Add onboarding tip for users with 1-3 tasks showing #tags and
  !priority syntax
- Add quick-input-set event listener to InputBar for example clicks
2026-01-26 16:29:42 +01:00
Till-JS
08ebdf5360 feat(docker): add Ollama configuration to chat-backend
- Add OLLAMA_URL pointing to host.docker.internal:11434
- Add OLLAMA_TIMEOUT environment variable
- Add OPENROUTER_API_KEY for cloud models

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:05:38 +01:00
Till-JS
6f51f1a24c feat(chat-backend): integrate Ollama for local LLM inference
- Add OllamaService for local model inference via Ollama API
- Update ChatService to route requests based on model provider
- Support both 'ollama' (local) and 'openrouter' (cloud) providers
- Add Gemma 3 4B as default model (free, runs on Mac Mini)
- Add SQL migration script for existing databases
- Update CLAUDE.md with Ollama configuration docs

Environment variables:
- OLLAMA_URL: Ollama server URL (default: http://localhost:11434)
- OLLAMA_TIMEOUT: Request timeout in ms (default: 120000)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:03:03 +01:00
Till-JS
14aaf01fa3 fix(auth): move email verification config to correct location
Better Auth requires emailVerification config to be a separate top-level
option, not under emailAndPassword. Added sendOnSignUp: true to trigger
verification emails on registration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:54:35 +01:00
Till-JS
aa7f5fbb25 docs: add Telegram Ollama Bot documentation to MAC_MINI_SERVER.md
- Add bot to architecture diagram
- Document Telegram commands (/start, /models, /mode, etc.)
- Document available modes (classify, summarize, translate, code)
- Add LaunchAgent configuration details
- Add bot management and update instructions
- Update LaunchAgents count (3 -> 5)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:53:18 +01:00
Till-JS
3f64c7422f feat(telegram-ollama-bot): add Telegram bot for local LLM inference via Ollama
- NestJS-based Telegram bot with nestjs-telegraf
- Ollama service for API communication with Gemma 3 4B
- Commands: /start, /help, /models, /model, /mode, /clear, /status
- Multiple modes: default, classify, summarize, translate, code
- Chat history with context (last 10 messages)
- User access control via TELEGRAM_ALLOWED_USERS
- Health endpoint for monitoring
- Updated MAC_MINI_SERVER.md with Ollama documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:43:41 +01:00
Till-JS
2975e5d2a1 fix(auth): add explicit types to email handlers
Fix TypeScript implicit any errors in sendVerificationEmail and
sendResetPassword handlers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:41:00 +01:00
Till-JS
5098250364 feat(auth): enable email verification for new user registrations
- Add sendVerificationEmail function in email.service.ts
- Enable requireEmailVerification in Better Auth config
- New users must verify their email before logging in

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:35:25 +01:00