Commit graph

719 commits

Author SHA1 Message Date
Till-JS
edf13b7102 revert: fix CI by reverting Telegram notifications
Reverting 618c58c5 which broke the CI workflow.
Will re-add notifications after fixing the issue.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:40:10 +01:00
Till-JS
412344e97b chore(infra): add pushgateway to Cloudflare tunnel
Exposes Prometheus Pushgateway at pushgateway.mana.how for CI metrics.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:38:19 +01:00
Till-JS
5cf3c334fd fix(calendar): correct port to 3016 2026-01-26 10:37:49 +01:00
Till-JS
618c58c519 feat(ci): add Telegram notifications and Grafana CI/CD dashboard
- Add notify-start job with Telegram notification for build start
- Add notify-complete job with build status and duration notification
- Push CI metrics to Prometheus Pushgateway for Grafana visualization
- Create CI/CD Grafana dashboard with build status, duration, and history
- Add Pushgateway scrape config to Prometheus

Requires TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID, and PUSHGATEWAY_URL secrets.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:31:17 +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
475246a55d fix(todo): correct health check endpoints
- Backend: Fix Dockerfile health check path (/api/v1/health -> /health)
- Web: Add missing /health endpoint for Docker health checks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 09:44:17 +01:00
Till-JS
b7d4893ad5 docs: add daily report for 2026-01-25
Summary of 20 commits including:
- Guest mode for contacts/clock apps
- NutriPhi app (AI nutrition tracking)
- Presi & Storage apps restored from archive
- Watchtower auto-deploy setup
- Prometheus metrics for todo-backend
- CI/CD for presi and storage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 09:38:57 +01:00
Till-JS
1c5a1b8442 feat(metrics): add Prometheus metrics to all backends
- Add metrics module to calendar, chat, clock, contacts backends
- Add metrics module to mana-core-auth service
- Expose /metrics endpoint for Prometheus scraping
- Track HTTP requests, response times, and custom business metrics

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-26 09:35:01 +01:00
Till-JS
75ffd504bc fix(presi,storage): use adapter-node for Docker builds
Switch from @sveltejs/adapter-auto to @sveltejs/adapter-node for
presi-web and storage-web to enable proper Docker container builds.
adapter-auto cannot build correctly in Docker environment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:47:49 +01:00
Till-JS
409f9a0766 feat(ci): add Docker build jobs for presi and storage apps
Add CI/CD pipeline support for:
- presi-backend, presi-web
- storage-backend, storage-web

Includes:
- Change detection for selective builds
- Multi-platform builds (amd64/arm64)
- GitHub Container Registry push

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:17:48 +01:00
Till-JS
8ff8cd5edf test: update loading text to test Watchtower auto-deploy
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 14:16:03 +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
f47bf8edd9 refactor(todo): use express middleware for HTTP metrics
Moved HTTP request metrics tracking from NestJS interceptor to Express
middleware in main.ts. This ensures ALL requests are tracked, including
those rejected by auth guards before reaching the handler.

- Remove MetricsInterceptor (wasn't capturing guard exceptions)
- Add Express middleware in main.ts for metrics collection
- Track all HTTP requests including 401/403/404 responses

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:00:06 +01:00
Till-JS
11411ff0a0 fix(todo): capture error responses in metrics interceptor
Use catchError instead of tap.error to properly capture HTTP exception
status codes (401, 404, etc.) in Prometheus metrics.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:56:25 +01:00
Till-JS
a12c7e5f32 feat(docker): add Dockerfiles for presi and storage apps
Add production-ready Dockerfiles for:
- presi-backend (port 3008)
- presi-web (port 5178)
- storage-backend (port 3019, with S3/MinIO)
- storage-web (port 5185)

Each backend includes docker-entrypoint.sh for auto-migrations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:55:23 +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
4a236a7a1f feat(todo): add Prometheus metrics and update docs
- Add MetricsModule with prom-client for todo backend
- Add MetricsInterceptor for request tracking
- Update COMMANDS.md with presi and storage commands
- Update Grafana dashboards for backend monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:31:44 +01:00
Till-JS
0a4e7e0f73 feat: add dev scripts for presi and storage apps
Add root-level npm scripts for presi and storage:
- dev:presi:full, dev:storage:full (with auto DB setup)
- Individual scripts for web, backend, mobile, landing
- Database scripts (db:push, db:studio, db:seed)

Also update setup-databases.sh to support presi and storage.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:27:55 +01:00
Till-JS
36a9e3a37c feat: restore presi and storage apps from archive
Re-activate presi (presentation tool) and storage (cloud storage)
apps that were previously archived for context reduction.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:25:51 +01:00
Till-JS
9472978c66 🔧 chore(scripts): add nutriphi to database setup script 2026-01-25 13:24:48 +01:00
Till-JS
b6af01ed67 feat(nutriphi): add AI-powered nutrition tracking app
- NestJS backend with Gemini AI for food photo analysis
- SvelteKit web app with Svelte 5 runes
- Drizzle ORM schema for meals, goals, favorites, recommendations
- Unified auth pages using shared-auth-ui components
- Landing page with Astro
- Shared types and utilities package
2026-01-25 13:19:51 +01:00
Till-JS
b77dd4159b fix(deps): update lockfile for telegram-stats-bot
The lockfile was not committed when telegram-stats-bot was added,
causing CI to fail with ERR_PNPM_OUTDATED_LOCKFILE.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:15:02 +01:00
Till-JS
b095532e00 fix(clock): load alarms/timers in guest mode
Remove auth check before loading data - the stores already handle
guest mode by loading from sessionStorage instead of API.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:07:08 +01:00
Till-JS
1e7bfd44ec fix(clock): remove auth redirect from dashboard for guest mode
Remove the login redirect from the main dashboard page to allow
guest users to access the Clock app without authentication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:00:40 +01:00
Till-JS
6713919e09 fix(web): fix userSettings.nav undefined error in guest mode
- Clock: Replace local user-settings store with shared theme store
  from @manacore/shared-theme to support nav settings properly
- All apps: Add optional chaining and fallback values when accessing
  userSettings.nav.desktopPosition and userSettings.nav.hiddenNavItems
  to prevent TypeError when user is not authenticated

Apps fixed: calendar, chat, clock, contacts, manacore, manadeck,
picture, todo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:58:04 +01:00
Till-JS
753e6fd17f feat(contacts): add session-first guest mode
Users can now use Contacts without signing in.
Data is stored in sessionStorage (lost when tab closes).

Changes:
- Add session-contacts.svelte.ts for temporary local storage
- Add AuthGateModal for login prompts
- Remove auth redirect from app layout
- Add guest mode banner with contact count
- Add sessionStorage return URL handling in login/register

When users sign in, session contacts are migrated to their cloud account.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 00:00:09 +01:00
Till-JS
54a6ebc073 docs(devlog): add session-first guest mode feature
Updates the 2026-01-23 devlog entry with:
- Session-first guest mode section with implementation details
- AuthGateModal, session stores, guest banner documentation
- Commit count updated to 43
- Added to "Erledigte Aufgaben"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:16:20 +01:00
Till-JS
3aeb88d772 feat(web): add session-first guest mode to all live apps
Users can now use Calendar, Chat, Clock, and Todo without signing in.
Data is stored in sessionStorage (lost when tab closes).

Changes per app:
- Add session storage stores for temporary data
- Add AuthGateModal for login prompts
- Remove auth redirect from app layouts
- Add guest mode banner with item count
- Add sessionStorage return URL handling

When users sign in, session data is migrated to their cloud account.
2026-01-23 21:15:08 +01:00
Till-JS
8248a70094 docs(devlog): update daily report with n8n, devlog system, stats bot
Updates the 2026-01-23 devlog entry with:
- n8n Workflow Automation section
- Devlog system implementation details
- Telegram Stats Bot documentation
- Updated service count (7 apps live)
- Commit count updated to 30
- Added "Erledigte Aufgaben" section
- n8n added to services and URLs tables

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:41:01 +01:00
Till-JS
f29ef4aa3a feat(infra): add Telegram Stats Bot for ManaCore analytics
Adds a NestJS service that delivers Umami analytics via Telegram:

- Telegram commands: /start, /stats, /today, /week, /realtime, /users
- Scheduled reports: Daily at 9:00, Weekly on Monday at 9:00
- Umami API integration with token management
- User statistics from auth database
- Docker + CI/CD pipeline integration

Bot: @stats_mana_bot

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:39:04 +01:00
Till-JS
7a80a71496 feat(infra): add missing tunnel routes for contacts, monitoring, n8n
Add Cloudflare Tunnel routes for:
- contacts.mana.how / contacts-api.mana.how
- grafana.mana.how (monitoring)
- stats.mana.how (Umami analytics)
- n8n.mana.how (workflow automation)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:36:23 +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
9f00a367cf feat(landing): add devlog section to homepage
- Display latest devlog entries on the homepage
- Show category badges, dates, commits, and read time
- Link to full devlog overview
- Responsive grid layout with hover effects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 18:03:19 +01:00
Till-JS
2596cb7540 feat(landing): add devlog section to ManaCore landing page
- Add devlog content collection with schema for development reports
- Create devlog index page with card-based post listing
- Create devlog detail page with prose styling for markdown content
- Add first devlog entry: Production Launch (2026-01-23)
- Add devlog link to navbar navigation
- Add i18n translations for devlog in all languages (de, en, it, fr, es)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 18:01:03 +01:00
Till-JS
b8a84edfe0 feat(analytics): add Umami event tracking utilities
- Add comprehensive analytics.ts with type-safe event tracking
- Include app-specific event helpers (Auth, Landing, Chat, Picture, Todo, Calendar, Clock, Contacts, ManaDeck, Subscription, App events)
- Export from shared-utils package
- Add complete documentation in docs/ANALYTICS.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:58:04 +01:00
Till-JS
634bb97e83 docs: add daily report for 2026-01-23
Comprehensive summary of today's work:
- Mac Mini server setup with auto-start
- Contacts app full deployment
- Monitoring stack (Prometheus, Grafana, Umami)
- Shared landing UI components
- 26 commits total

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:53:36 +01:00
Till-JS
ead96800f1 fix: correct Cloudflare Pages project name for clock landing
Change clock-landing to clocks-landing to match URL schema convention.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:50:59 +01:00