Commit graph

302 commits

Author SHA1 Message Date
Till-JS
405084b52d 🔧 fix(skilltree): change web port to 5020 (5018 used by zitare) 2026-02-13 23:14:38 +01:00
Till-JS
1e025b7e72 feat(skilltree): enable web deployment
Fix Dockerfile to include all required shared packages and add
health endpoint for Docker healthcheck. Enable skilltree-web
service in docker-compose.macmini.yml.
2026-02-13 23:05:08 +01:00
Till-JS
0015bd0892 🔧 chore(docker): build matrix-todo-bot locally on Mac Mini 2026-02-13 22:14:06 +01:00
Till-JS
bba696e241 chore(docker): use local build for matrix-calendar-bot 2026-02-13 19:52:54 +01:00
Till-JS
ad8d5c3bc0 🔧 chore(zitare): change zitare-web port from 5012 to 5018
Port 5012 is used by calendar-web

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 19:40:50 +01:00
Till-JS
b6bd07beca 🐛 fix(docker): correct zitare-backend health check path
Changed /api/health to /health in docker-compose.macmini.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 19:39:45 +01:00
Till-JS
533bd90093 🚀 feat(zitare-web): add Docker deployment infrastructure
- Add Dockerfile for production build
- Add docker-entrypoint.sh for runtime config
- Add hooks.server.ts for client-side env injection
- Add zitare-web service to docker-compose.macmini.yml
  - Port 5012
  - Depends on zitare-backend
  - Health check on /health endpoint
2026-02-13 14:49:26 +01:00
Till-JS
c54ff859d6 🚀 feat(zitare): add Docker deployment infrastructure
- Add Dockerfile for zitare-backend (multi-stage build, port 3007)
- Add docker-entrypoint.sh for database setup
- Add zitare-backend service to docker-compose.macmini.yml
- Update matrix-zitare-bot to depend on zitare-backend
- Add zitare-backend to CI workflow (change detection + build job)
2026-02-13 13:49:15 +01:00
Till-JS
7d450aa2a8 feat(bot-services): add Matrix-SSO-Link for persistent login
After successful !login, the bot now stores a persistent link between
the Matrix user ID and the Mana account in mana-core-auth. This allows
the bot to auto-authenticate users in the future without requiring
another !login command.

Changes:
- Add createMatrixUserLink() method to SessionService
- Call link creation after successful login
- Add MANA_CORE_SERVICE_KEY to todo and calendar bot docker config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 13:42:07 +01:00
Till-JS
9924eb545a 🔧 fix(docker): add backend URLs to matrix todo and calendar bots
- Add TODO_BACKEND_URL, CALENDAR_BACKEND_URL environment variables
- Add MANA_CORE_AUTH_URL for authentication
- Add Redis connection (REDIS_HOST, REDIS_PASSWORD)
- Add depends_on for respective backends

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 12:23:30 +01:00
Till-JS
210969a67f 🔧 chore(docker): build mana-web locally on Mac Mini
Switch manacore-web from GHCR image to local build for faster
deployment of frontend changes (self-service /settings/my-data).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 12:04:30 +01:00
Till-JS
cb08931330 🔧 chore(docker): build presi-backend locally on Mac Mini
Changed from GHCR image to local build to pick up admin
controller prefix fix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 14:09:46 +01:00
Till-JS
acc8de36ee feat(monitoring): add alerting stack and maintenance scripts
Medium priority stability improvements:

Alerting:
- Add vmalert for evaluating Prometheus alert rules
- Add alertmanager for alert routing and grouping
- Add alert-notifier service for Telegram/ntfy notifications
- Enable cadvisor scraping in prometheus config

Disk Monitoring:
- Add check-disk-space.sh for hourly disk monitoring
- Alert on 80% (warning) and 90% (critical) thresholds
- Auto-cleanup Docker when disk is critical
- Add com.manacore.disk-check.plist for LaunchD

Weekly Reports:
- Add weekly-report.sh for system health summary
- Includes: backup status, disk usage, container health,
  database stats, error log summary
- Runs every Sunday at 10 AM via LaunchD

Health Check Updates:
- Add checks for vmalert, alertmanager, alert-notifier

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 13:46:57 +01:00
Till-JS
02a5172c7c feat(admin): add GDPR user-data endpoints to photos, clock, storage backends
- Add admin modules with GET/DELETE /api/v1/admin/user-data/:userId
- Photos: albums, favorites, tags counting and deletion
- Clock: alarms, timers, world clocks, presets counting and deletion
- Storage: files, folders, shares, tags counting and deletion
- Update UserDataService to include photos, clock, storage backends
- Add ADMIN_SERVICE_KEY env var to all backends in docker-compose
- Build storage-backend locally instead of using GHCR image

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 13:43:16 +01:00
Till-JS
7d409465b6 fix(docker): add backend URLs to auth service for GDPR data aggregation
Configure mana-auth with internal Docker network URLs to query
project backends for user data (Chat, Todo, Calendar, Contacts,
Picture, Presi).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 13:33:33 +01:00
Till-JS
d5e18c9c27 🔧 fix(mac-mini): update health checks and disable missing services
- Disable api-gateway and skilltree-web (no working images/Dockerfiles)
- Fix mana-search Dockerfile healthcheck port and endpoint
- Update health-check.sh to skip disabled services
- Fix search service health endpoint (/api/v1/health)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 13:28:55 +01:00
Till-JS
3e3700338b 🔧 fix(docker): build mana-search and skilltree-web locally
- mana-search: GHCR image is broken (missing node_modules)
- skilltree-web: GHCR image doesn't exist
- api-gateway: disabled (no image, no Dockerfile)

All three now build locally on Mac Mini instead of pulling from GHCR.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 13:22:42 +01:00
Till-JS
ba3d2a121a 🔧 chore(docker): build backends locally on Mac Mini
Switch 5 backends from pulling ghcr.io images to building locally:
- chat-backend
- todo-backend
- calendar-backend
- clock-backend
- contacts-backend

This ensures Dockerfiles with shared-drizzle-config are used directly.
2026-02-12 02:23:52 +01:00
Till-JS
10502b5627 fix(photos): re-enable mana-media dependency
mana-media Dockerfile is now fixed, so photos-backend can depend on it again.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 02:21:39 +01:00
Till-JS
aa56ec844b 🔧 fix(photos): temporarily disable mana-media dependency
mana-media Dockerfile has a pre-existing bug with pnpm symlinks
that needs to be fixed separately.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 01:58:21 +01:00
Till-JS
5ce4e42c20 🚀 feat(photos): add Docker deployment configuration
- Add Dockerfile for photos-backend (port 3039)
- Add Dockerfile for photos-web (port 5019)
- Add docker-entrypoint.sh for database migrations
- Add health endpoint for photos-web
- Add photos services to docker-compose.macmini.yml
- Update CORS_ORIGINS for mana-auth and mana-media
- Update CLAUDE.md with production URLs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 18:21:19 +01:00
Till-JS
b3dd3c51d3 fix(mana-media): fix Dockerfile build and health check paths
- Use --ignore-scripts to skip postinstall builds during install
- Remove unnecessary shared-builder stage
- Fix health check URL to /api/v1/health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:57:50 +01:00
Till-JS
d4663b5643 feat(mana-media): add centralized media storage with NutriPhi integration
- Implement mana-media service with PostgreSQL/Drizzle ORM persistence
- Add content-addressable storage (SHA-256) for automatic deduplication
- Add Matrix MXC URL import endpoint to copy images from Matrix
- Create @manacore/media-client package for service consumption
- Integrate mana-media into NutriPhi bot for persistent image storage
- Update pnpm-workspace.yaml to include nested service packages
- Add mana-media to docker-compose with port 3015

Images sent to NutriPhi bot are now stored in mana-media after analysis,
providing persistent storage with deduplication across all apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:30:14 +01:00
Till-JS
49c5873af1 chore(docker): build contacts-web locally instead of using GHCR image
GHCR image was outdated (2026-01-29), missing:
- Demo mode removal (2026-01-30)
- SSO implementation (2026-02-02)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:06:12 +01:00
Till-JS
5b3c87b245 fix(docker): use monorepo root as build context for mana-auth
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:52:09 +01:00
Till-JS
ce5f3b5384 chore(docker): build mana-auth locally instead of using GHCR image
Allows faster iteration on auth fixes without needing to push to GHCR.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:51:25 +01:00
Till-JS
0b46d203bb feat(infra): add mana-llm service to production deployment
- Add mana-llm FastAPI service for LLM API gateway
- Configure CORS for playground.mana.how
- Use shared Redis from existing infra
- Connect playground to mana-llm container

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:58:44 +01:00
Till-JS
f03c09ff17 feat(auth): enable cross-domain SSO via shared cookies on .mana.how
- Configure Better Auth with crossSubDomainCookies for .mana.how domain
- Add COOKIE_DOMAIN environment variable (production: .mana.how)
- Sync trustedOrigins with all production subdomains
- Users now login once and are authenticated across all apps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 03:58:29 +01:00
Till-JS
7d7e31e486 feat(infra): migrate PostgreSQL to SSD storage
Move PostgreSQL data from Docker volume to /Volumes/ManaData/postgres
for better data safety and performance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:56:42 +01:00
Till-JS
02604e6d1c 🔧 fix(docker): add platform linux/amd64 for matrix bots on arm64 hosts
Mac Mini with Apple Silicon needs explicit platform specification
to pull amd64 images since matrix bots only have amd64 builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:32:24 +01:00
Till-JS
6ca2d3b76d feat(infra): use SSD for MinIO storage
Mount MinIO data directly to /Volumes/ManaData/minio for better
performance and persistence on external SSD.

Requires Docker Desktop "Full Disk Access" permission on Mac Mini.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:23:43 +01:00
Till-JS
075051a1d4 add-dep: add jsonwebtoken to mana-core-auth dependencies 2026-02-01 13:27:23 +01:00
Till-JS
5c61a4ed0f revert(infra): use standard Docker volume for MinIO
SSD bind mount requires Docker Desktop GUI configuration for
/Volumes access. Reverting to standard volume until manually configured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:16:26 +01:00
Till-JS
45152ee954 🚀 feat(matrix-bots): add CI/CD pipeline for automated GHCR deployment
- Update 10 Matrix Bot Dockerfiles for monorepo builds with pnpm
- Add shared package support (bot-services, matrix-bot-common)
- Extend CI pipeline with change detection and build jobs
- Update docker-compose.macmini.yml to use GHCR images
- Enable Watchtower auto-updates for Matrix Bots

Bots: mana, ollama, stats, project-doc, todo, calendar, nutriphi, zitare, clock, tts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:02:09 +01:00
Till-JS
fdaf6a9c75 🔧 fix(dashboards): fix broken panels and metrics
- Backends: Remove Docker container section (cAdvisor not deployed)
- Backends: Add Auth Service Runtime section with correct auth_ prefixed metrics
- Backends: Rename to "Backends Overview"
- Application Details: Fix Node.js Runtime to use auth_ prefixed metrics
- Application Details: Rename section to "Auth Service Runtime"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:54:07 +01:00
Till-JS
1c6505890d fix(infra): use SSD volume for MinIO storage
Switch MinIO from Docker VM storage to external SSD volume
at /Volumes/TillJakob-S04/ManaData/minio for better performance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:41:14 +01:00
Till-JS
816062b07d 🐛 fix(monitoring): adjust node-exporter config for macOS Docker
- Remove rslave mount that doesn't work on macOS
- Use selective collectors instead of defaults
- Note: This monitors the Docker VM metrics, not host Mac

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:40:33 +01:00
Till-JS
6a725a2b73 🐛 fix(monitoring): remove duplicate node-exporter definition
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:39:38 +01:00
Till-JS
7aa5115c78 📊 feat(monitoring): add node-exporter for host system metrics
- Add node-exporter service to docker-compose for CPU/Memory/Disk monitoring
- Enable node-exporter scrape target in Prometheus config
- Update System Overview dashboard with Host System section:
  - CPU, Memory, Disk usage gauges
  - Total RAM, Total Disk, Uptime, Load stats
  - CPU & Memory over time graph
  - Network I/O graph
- Add Node Exporter to service status panel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:38:44 +01:00
Till-JS
5a8e20e0f2 🔧 fix(auth): add all apps to CORS_ORIGINS
Added link.mana.how and playground.mana.how to allowed origins.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:24:03 +01:00
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