Commit graph

51 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
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
Till-JS
87724f8abf fix(watchtower): remove custom notification template
Use default Watchtower notifications instead.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 14:03:43 +01:00
Till-JS
62e9d0d37a fix(watchtower): set DOCKER_API_VERSION for compatibility
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 14:03:05 +01:00
Till-JS
ac663a6c91 chore: remove staging/Hetzner infra, add Watchtower auto-deploy
- Remove old Hetzner deployment workflows (cd-staging, cd-production)
- Remove staging docker-compose files
- Remove outdated staging/Hetzner documentation
- Add Watchtower to docker-compose.macmini.yml for auto-updates
- Update CLAUDE.md with Mac Mini server access
- Simplify docs/DEPLOYMENT.md for new architecture

Production now runs on Mac Mini with automatic deployments via Watchtower.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 14:01:11 +01:00
Till-JS
32c207ecd5 feat(infra): add presi and storage apps to Mac Mini deployment
- Add presi-backend (port 3008) and presi-web (port 5178)
- Add storage-backend (port 3019) and storage-web (port 5185)
- Configure storage-backend with MinIO S3 integration
- Update mana-core-auth CORS for new app domains

New domains:
- presi.mana.how / presi-api.mana.how
- storage.mana.how / storage-api.mana.how

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:52:45 +01:00
Till-JS
a1d491e246 feat(infra): add n8n workflow automation to Mac Mini
- Add n8n container with PostgreSQL backend
- Configure webhook URL for n8n.mana.how
- Add persistent volume for n8n data
- Set timezone to Europe/Berlin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:08:34 +01:00
Till-JS
c399474889 feat(infra): add MinIO for object storage and configure contacts-backend
- Add MinIO service for S3-compatible object storage
- Configure contacts-backend with S3 environment variables
- Add minio_data volume

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:45:10 +01:00
Till-JS
6d86a08d63 feat: add monitoring dashboard (Prometheus + Grafana + Umami + Admin)
Phase 1: Infrastructure
- Add docker/prometheus/prometheus.yml with scrape configs for all services
- Add docker/grafana/provisioning for auto-configured datasources
- Add docker/grafana/dashboards (system-overview, backends-docker)
- Update docker-compose.macmini.yml with monitoring services:
  - prometheus, grafana, node-exporter, cadvisor
  - postgres-exporter, redis-exporter, umami
- Add grafana.mana.how and analytics.mana.how to Caddyfile

Phase 2: Backend Metrics
- Create packages/shared-nestjs-metrics with:
  - MetricsModule (auto /metrics endpoint)
  - MetricsService (Counter, Histogram, Gauge helpers)
  - MetricsMiddleware (auto HTTP request tracking)

Phase 3: Umami Web Analytics
- Add Umami tracking scripts to all landing pages
- Add Umami tracking scripts to all web apps
- Create scripts/mac-mini/setup-umami-db.sh

Phase 4: Admin Dashboard (ManaCore Web)
- Add admin routes: /admin, /admin/users, /admin/system
- Create StatCard, QuickLinks, UserTable components
- Add Admin link to navigation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:31:39 +01:00
Till-JS
bb5f145286 feat(contacts): add Docker deployment for Mac Mini
- Add Dockerfile for contacts-backend (port 3015)
- Add Dockerfile for contacts-web (port 5184)
- Add docker-entrypoint.sh for database migrations
- Update CI workflow with contacts-backend and contacts-web build jobs
- Add contacts services to docker-compose.macmini.yml
- Update CORS origins to include contacts.mana.how

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:23:49 +01:00
Till-JS
294074f5f7 fix(calendar-web): add cross-app API URLs for todo and contacts
Add PUBLIC_TODO_BACKEND_URL and PUBLIC_CONTACTS_API_URL environment
variables to calendar-web container for cross-app integrations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:15:15 +01:00
Till-JS
bff168ee43 fix(docker): correct todo-backend health check path
Changed from /api/health to /api/v1/health to match the actual endpoint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:18:26 +01:00
Till-JS
a7783ca973 fix: add BETTER_AUTH_SECRET to mac mini compose
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 23:55:10 +01:00