Commit graph

35 commits

Author SHA1 Message Date
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
Till-JS
4ebe3ec574 feat: add multi-arch Docker builds and Mac Mini deployment
- CI: Build Docker images for linux/amd64 + linux/arm64
- CI: Add manacore-web to build matrix
- Add docker-compose.macmini.yml for Mac Mini deployment
- Add cloudflared-config.yml for Cloudflare Tunnel routing
- Add Mac Mini deployment scripts and documentation
- Configure Cloudflared as launchd service for auto-start

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:17:37 +01:00