Commit graph

62 commits

Author SHA1 Message Date
Till-JS
aafc69318a 🏠 feat(grafana): set Master Overview as home dashboard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:29:33 +01:00
Till-JS
24c8a79a48 🔧 fix(matrix-web): correct port config to match actual container (5180)
Container was built with PORT=5180 but docker-compose had PORT=4090.
Fixed port mapping and healthcheck to use correct internal port.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:19:18 +01:00
Till-JS
23887c265d 📦 feat(grafana): install Infinity datasource plugin for Business Metrics
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:18:02 +01:00
Till-JS
f35c05e2c1 🔧 feat(grafana): enable anonymous viewer access
Allow public read-only access to Grafana dashboards.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:10:39 +01:00
Till-JS
c28410b736 🔧 chore: enable OIDC for Matrix Synapse
- Add SYNAPSE_OIDC_CLIENT_SECRET to mana-core-auth env
- Enable OIDC provider config in homeserver.yaml
- Add matrix.mana.how and element.mana.how to CORS origins

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:25:59 +01:00
Till-JS
508ae124a9 🏗️ refactor: restructure docker-compose with new port schema and naming
Implements ADR-003 Infrastructure Audit:

Port Schema:
- 3000-3099: Core Services & Backends
- 4000-4099: Matrix Stack
- 5000-5099: Web Frontends
- 6000-6099: Automation
- 8000-8099: Monitoring
- 9000-9199: Infrastructure & Exporters

Naming Convention:
- Changed from manacore-* to mana-{category}-{service}
- Categories: infra, core, app, matrix, mon, auto

Optimizations:
- Removed excessive depends_on chains (lazy connect with retry)
- Consolidated 10 Matrix bot volumes to 1 shared volume
- Organized services by tier (0-8)

BREAKING CHANGE: All container names and ports changed.
Cloudflare Tunnel configuration must be updated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:37:12 +01:00
Till-JS
a341aa1b13 🔥 remove: Telegram bots - Matrix-only strategy
Remove all 6 Telegram bot services to focus on Matrix as the sole
messaging platform for full UI/UX control and DSGVO compliance.

Removed services:
- telegram-nutriphi-bot
- telegram-ollama-bot
- telegram-project-doc-bot
- telegram-stats-bot
- telegram-todo-bot
- telegram-zitare-bot

Also:
- Remove Telegram bot scripts from package.json
- Remove telegram-stats-bot from docker-compose.macmini.yml
- Disable Watchtower Telegram notifications
- Remove Telegram devlog
- Add comprehensive MATRIX_BOT_ARCHITECTURE.md documentation

The Matrix-only approach provides:
- Full control over user experience
- Complete DSGVO compliance (all data on own servers)
- No dependency on third-party platforms
- Unified command patterns across all bots
2026-02-01 00:17:14 +01:00
Till-JS
fdba0e3425 feat(llm-playground): add production deployment with auth
- Add Dockerfile for multi-stage Docker build
- Add mana-core-auth integration with login/register pages
- Add auth store using Svelte 5 runes
- Add protected route layout with auth guard
- Add health endpoint for container health checks
- Add runtime URL injection via hooks.server.ts
- Add logout button to header
- Update docker-compose.macmini.yml with llm-playground service
- Update cloudflared-config.yml with playground.mana.how route
- Update mana-llm CORS config for playground domain
- Update generate-env.mjs with auth URL variable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:15:02 +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
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
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
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
68a8ad60b9 fix(tts-bot): change port to 3033 to avoid conflict with nutriphi 2026-01-29 16:06:25 +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
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
5e92a52b8e
Merge pull request #28 from Memo-2023/claude/skill-tree-app-planning-CO4xH
Add SkillTree app with backend API and web frontend
2026-01-29 12:13:20 +01:00
Claude
e96d76ab8e
feat(infra): integrate matrix-mana-bot into deployment
- Add matrix-mana-bot to docker-compose.macmini.yml
- Add setup-mana-bot.sh script for bot registration
- Add dev:matrix:* scripts to root package.json
- Add devlog entry documenting the new architecture

The gateway bot is now ready for deployment alongside
the existing standalone Matrix bots.

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:37:38 +00:00
Claude
7a0b26eb3d
feat(skilltree): add NestJS backend with Docker deployment
- Add NestJS backend with Drizzle ORM and PostgreSQL
- Implement skills CRUD API with XP/level progression system
- Add activities tracking endpoint
- Configure Docker containers for backend (port 3024) and web (port 5195)
- Add skilltree services to docker-compose.macmini.yml
- Add CI build jobs for skilltree-backend and skilltree-web

https://claude.ai/code/session_015XCsTDS9aLZ64Zin4HU6ex
2026-01-28 23:59:50 +00:00
Till-JS
e2a3277fa1 feat(matrix-clock-bot): add Matrix bot for time tracking
- Add Docker build configuration with npm overrides for matrix-sdk
- Update port from 3317 to 3318 to avoid conflict with Zitare bot
- Add tsconfig.build.json for production builds
- Add clock-bot service to docker-compose.macmini.yml
- Bot supports timers, alarms, and world clocks via Matrix chat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:04:45 +01:00
Till-JS
29595a9d3d chore(matrix): add SYNAPSE_OIDC_CLIENT_SECRET env var
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:43:21 +01:00
Till-JS
57b9d4cb37 feat(matrix-nutriphi-bot): add Matrix bot for nutrition tracking
- NestJS bot with matrix-bot-sdk integration
- Commands: !help, !login, !analyze, !today, !week, !goals, !favorites, !tips
- Integrates with NutriPhi backend API (port 3023)
- User session management with JWT authentication
- Image analysis via Gemini AI (NutriPhi backend)
- Port 3316

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:57:49 +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
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
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
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
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
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
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
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
fafa550a60 feat(auth): add Brevo SMTP email service for transactional emails
- Add nodemailer-based email service with Brevo SMTP integration
- Implement password reset, invitation, and welcome email templates
- Update better-auth.config.ts to use email service for sendResetPassword and sendInvitationEmail
- Add SMTP environment variables to docker-compose.macmini.yml
- Change minimum password length from 12 to 8 characters

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:07:31 +01:00
Till-JS
79e3c09af2 fix(docker): correct calendar-backend health check path
- calendar-backend: /api/v1/health -> /health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:13:58 +01:00
Till-JS
bbc051d34a fix(docker): correct chat-backend health check path
- chat-backend: /api/v1/health -> /health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:03:11 +01:00
Till-JS
d49ff9a91e 🩹 fix(docker): correct contacts-backend health check path 2026-01-26 10:54:14 +01:00
Till-JS
9fedb7cfdd fix(docker): correct health check paths for mana-core-auth and clock-backend
- mana-core-auth: /api/v1/health -> /health
- clock-backend: /api/v1/health -> /health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:49:58 +01:00
Till-JS
ebd0e53c9a 🔧 chore(watchtower): switch to nickfedor fork with telegram notifications
- Use nickfedor/watchtower:latest (maintained fork, v1.14.0)
- Add notification template for updates and failures
- Template only sends when there are actual changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:29:57 +01:00
Till-JS
4573f6ec13 feat(web): add /health endpoints to all web apps
Add health check endpoints for Docker container monitoring:
- calendar-web
- clock-web
- contacts-web
- manacore-web
- manadeck-web
- nutriphi-web
- picture-web
- presi-web
- storage-web
- zitare-web

Also update todo-web docker-compose health check to use /health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:15:04 +01:00
Till-JS
2480d92699 🔧 chore(watchtower): try list format for telegram notification URL
Use list format for environment variables as suggested in shoutrrr
issue #45 to avoid YAML parsing issues with colon in bot token.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:14:30 +01:00
Till-JS
0b35e71f90 fix(docker): use 127.0.0.1 instead of localhost in health checks
wget tries IPv6 [::1] when using localhost, but Node.js apps typically
listen on IPv4 only. Using 127.0.0.1 ensures IPv4 is used.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:07:21 +01:00
Till-JS
57a7a39cd0 fix(docker): use root path for todo-web health check
The /health endpoint requires a new Docker image build. Use root path
temporarily until the new image is deployed via Watchtower.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:04:35 +01:00
Till-JS
98c08fd8d0 🔧 chore(watchtower): disable broken telegram notifications
Shoutrrr has URL parsing issues with Telegram bot tokens containing
colons. Auto-deployment works fine - notifications can be added later
via n8n webhook workflow if needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:02:48 +01:00
Till-JS
bbc536d83c fix(docker): correct todo-backend health check path in compose
Health check was using /api/v1/health but endpoint is /health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:02:24 +01:00
Till-JS
d2b1a1c8a9 🔧 chore(watchtower): use URL-encoded telegram token from env
Move notification URL to .env.macmini with URL-encoded colon (%3A)
in the Telegram bot token to avoid shoutrrr parsing issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:01:43 +01:00
Till-JS
cacebabe55 🔧 chore(watchtower): switch to n8n webhook for notifications
Switch from direct Telegram URL (which has parsing issues with colon
in bot token) to generic HTTP webhook via n8n for reliable notifications.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:00:49 +01:00
Till-JS
882053251d 🔧 chore(watchtower): add debug logging for telegram notifications
- Enable WATCHTOWER_DEBUG for verbose logs
- Add trailing slash to telegram URL (shoutrrr format fix)
- Enable WATCHTOWER_NOTIFICATION_REPORT for testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 09:53:45 +01:00
Till-JS
8c259a008b feat(monitoring): add comprehensive Grafana dashboards and alerting
New dashboards:
- Application Details: Node.js runtime (heap, event loop, GC),
  HTTP details (status codes, methods, top routes), error analysis
- Database Details: PostgreSQL and Redis metrics with detailed breakdowns

Alerting rules (docker/prometheus/alerts.yml):
- Service: down, high/very high error rate, slow response time
- Infrastructure: high CPU/memory/disk usage
- Database: PostgreSQL/Redis down, high connections, low cache hit
- Container: high CPU/memory, restarts

All dashboards include service selector variable for filtering.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 09:47:18 +01:00
Till-JS
41dea775a6 fix(watchtower): use existing TELEGRAM env vars for notifications
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-26 09:45:39 +01:00