Commit graph

672 commits

Author SHA1 Message Date
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
Till-JS
3e823ae0e0 feat(infra): add Mac Mini setup script and update production docker-compose
- mac-mini-setup.sh: Initial setup script for Mac Mini server
  - Installs cloudflared, git via Homebrew
  - Clones repository
  - Instructions for tunnel setup

- docker-compose.production.yml: Updated production configuration
  - Add postgres and redis services inline
  - Configure all app services with proper networking
  - Add health checks and logging
  - Align with Mac Mini deployment structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:50:51 +01:00
Till-JS
87b09eb5a8 chore(calendar): add wrangler.toml for Cloudflare Pages deployment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:50:42 +01:00
Till-JS
8f54a56324 feat(clock): add landing page with shared-landing-ui
- Create Astro landing page for Clock app
- Uses @manacore/shared-landing-ui components
- Configure Cloudflare Pages deployment (clocks-landing)
- Add Tailwind CSS styling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:50:31 +01:00
Till-JS
447dfe276e docs: add production launch guide and URL schema
- PRODUCTION_LAUNCH.md: Step-by-step guide for deploying to mana.how
- URL_SCHEMA.md: Define naming conventions for subdomains
  - Landing pages: plural (calendars.mana.how)
  - Web apps: singular (calendar.mana.how)
  - APIs: singular + -api suffix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:50:21 +01:00
Till-JS
5e54bcc5db feat(analytics): add Umami tracking to remaining apps
- Picture Landing: d3ac98e6-0d1a-47a3-a218-2a81fff596bd
- Picture Web: bc552bd2-667d-44b4-a717-0dce6a8db98f
- ManaDeck Web: 314fc57a-c63d-4008-b19e-5e272c0329d6
- Planta Web: 876f30bd-43e3-405a-9697-6157db67ca6b

All landing pages and web apps now have Umami analytics integrated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:49:18 +01:00
Till-JS
d3dd26bd77 feat(shared-landing-ui): add centralized Mana pricing system
Add unified pricing components for the Mana credit system:
- Central pricing data with plans, packages, and translations
- ManaPricingSection component with billing toggle and trust indicators
- Pricing pages for Chat and ManaDeck landings
- Footer links updated to /pricing pages
2026-01-23 17:46:41 +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
44e6a63a52 feat(analytics): add Umami website IDs for all web apps
- Chat Web: 5cf9d569-3266-4a57-80dd-3a652dc32786
- ManaCore Web: 4a14016d-394a-44e0-8ecc-67271f63ffb0
- Todo Web: ac021d98-778e-46cf-b6b2-2f650ea78f07
- Calendar Web: 884fc0a8-3b67-43bd-903b-2be531c66792
- Clock Web: 1e7b5006-87a5-4547-8a3d-ab30eac15dd4
- Contacts Web: ab89a839-be15-4949-99b4-e72492cee4ff

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:29:43 +01:00
Till-JS
639041ae47 feat(analytics): add Umami website IDs for all landing pages
- Chat Landing: a264b165-80d2-47ab-91f4-2efc01de0b66
- ManaCore Landing: cef3798d-85ae-47df-a44a-e9bee09dbcf9
- ManaDeck Landing: 2ac83d50-107f-4d4e-ac23-5540946e96e3
- Calendar Landing: 84862d98-727e-4e25-8645-639241dd1544
- Clock Landing: 0332b471-a022-46af-a726-0f45932bfd58

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:19:56 +01:00
Till-JS
d03aaeb7fb fix(contacts-backend): add missing multer dependency
Required for file upload functionality in photo module.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:18:50 +01:00
Till-JS
1868a7ffa5 refactor: change Umami analytics URL from analytics.mana.how to stats.mana.how
Update all tracking script URLs and admin dashboard links to use the
new stats.mana.how subdomain for Umami web analytics.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:11:24 +01:00
Till-JS
264149a913 feat(shared-landing-ui): unify landing pages with shared components
Add new reusable components to shared-landing-ui package:
- AppScrollerSection, TimelineSection, MasonryGridSection, PrinciplesSection
- LegalPageTemplate for privacy/terms/cookies/imprint pages
- Navigation component with mobile menu and language switcher
- GradientText and LanguageSwitcher atoms
- i18n system with getLangFromUrl, useTranslations, localizePath
- Theme files for picture (indigo), chat (blue), zitare (teal)

Add legal pages to ManaDeck and Chat landing pages:
- privacy, terms, cookies, imprint pages using shared template
- Updated footers with cookies link
2026-01-23 15:45:47 +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
ad7a84feef fix(contacts-web): use adapter-node for Docker deployment
- Switch from @sveltejs/adapter-auto to @sveltejs/adapter-node
- Required for Node.js production deployment in Docker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:32:16 +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
c2010cefb0 docs: add mail server planning documentation
- MAIL_SERVER_DEDICATED.md: Full guide for dedicated mail server
  on Raspberry Pi 5 or Mini-PC (future setup)
- MAIL_SERVER_MAC_MINI_TEMP.md: Temporary solution running on
  Mac Mini using Mailcow Docker (ready to implement)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:53:03 +01:00
Till-JS
2b7c665fd3 docs: add Mac Mini server documentation
Comprehensive documentation covering:
- Architecture overview and public URLs
- SSH access via Cloudflare
- Docker container management
- LaunchAgents for autostart
- Notification setup (Telegram + Email)
- Troubleshooting guide
- Maintenance procedures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:42:08 +01:00
Till-JS
de6151ae27 feat(mac-mini): add notification system for health checks
- Update health-check.sh with Telegram, Email, and ntfy notification functions
- Add notifications.env.example template for configuration
- Add setup-notifications.sh interactive setup script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:18:04 +01:00
Till-JS
515d6033a6 feat(clock-web): add dashboard page for root route
Added missing (app)/+page.svelte that shows:
- Current time display
- Quick links to World Clock, Alarms, Timers, Stopwatch

This fixes the 404 on the root route.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:47:14 +01:00
Till-JS
650b05bc0f fix(clock-backend): specify drizzle config path in entrypoint
drizzle-kit looks for drizzle.config.json by default, but project
uses drizzle.config.ts. Added explicit --config flag.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:24:27 +01:00
Till-JS
c512592685 fix(mac-mini): correct health check endpoints
- Web apps: check root URL (/) instead of /health (SvelteKit has no health endpoint)
- Todo backend: fix path to /api/v1/health
- Remove redundant PostgreSQL HTTP check (checked via docker exec)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:21:40 +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
732aa79fab fix(mac-mini): add PATH export for Docker CLI in all scripts
SSH sessions don't inherit the full PATH, so docker command
wasn't found. Now all scripts explicitly add /usr/local/bin
and /opt/homebrew/bin to PATH.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:17:24 +01:00
Till-JS
93060dc335 feat(mac-mini): add auto-start and management scripts
- setup-autostart.sh: Configure launchd services for boot
- startup.sh: Main startup script (waits for Docker, starts containers)
- health-check.sh: Check all services (runs every 5 min)
- status.sh: Full system status overview
- restart.sh: Restart containers (with --pull and --force options)
- stop.sh: Stop all containers gracefully
- README.md: Complete documentation

Includes optional ntfy.sh push notifications for health check failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 11:48:24 +01:00
Till-JS
2164d4afa0 fix(clock-web): add toast export alias for compatibility
The alarms page imports 'toast' but the store exported 'toasts'.
Add alias to support both import styles.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 01:23:58 +01:00
Till-JS
6d65f3b833 fix(clock-web): add all missing stores, APIs, and components
Add missing files that were never committed:
- Stores: alarms, timers, stopwatch, world-clocks, user-settings, navigation
- API modules: alarms, timers
- Components: WorldMap
- Skeletons: AlarmsSkeleton, TimersSkeleton, WorldClockSkeleton
- Fix clock-landing type-check to not fail on missing deps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 01:13:17 +01:00
Till-JS
42c75bdc74 fix(clock-web): add missing source files for build
Add essential files that were never committed to git:
- app.css with Tailwind imports
- theme.svelte.ts store
- toast.ts store
- ToastContainer.svelte component
- AppLoadingSkeleton.svelte component
- i18n setup with de/en locales

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 00:30:10 +01:00
Till-JS
9936a12fdd fix(clock-web): add missing SvelteKit config files
These essential files were never committed:
- svelte.config.js
- vite.config.ts
- tsconfig.json
- src/app.html

Without these, SvelteKit cannot build the app.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 00:24:03 +01:00
Till-JS
800bcd88ef fix: add svelte-kit sync to Dockerfiles before build
The prepare script only runs during local pnpm install, not during
workspace-level installation in Docker. Adding explicit svelte-kit sync
step before vite build to generate SvelteKit entry points.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 00:21:02 +01:00
Till-JS
438ee892a1 fix: add prepare scripts to web apps for svelte-kit sync
SvelteKit apps need `svelte-kit sync` to run before build to generate
the entry points. This was missing from several web apps, causing
Docker builds to fail with "Could not resolve entry module 'index.html'".

Fixed apps:
- clock-web
- todo-web
- calendar-web
- manacore-web

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 00:14:06 +01:00
Till-JS
569629d9d9 feat(ci): implement selective builds for faster CI
- Add detect-changes job that analyzes changed files
- Only build services that have changes in their paths
- Detects shared package changes and triggers dependent builds
- Add workflow_dispatch option to force rebuild all services
- Add build summary to GitHub Actions UI

This reduces build time by ~70% when only specific apps change.

Trigger patterns:
- Service path changes → only that service
- Shared packages → dependent services
- pnpm-lock.yaml, ci.yml → all services

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 00:11:23 +01:00
Till-JS
deb8bae337 fix: resolve Docker build errors for web apps
- Add drizzle.config.ts to clock-backend
- Add missing shared-types package to all web app Dockerfiles
- Add shared-splitscreen to todo-web Dockerfile

These packages were missing from the Docker build context,
causing TypeScript compilation errors during image builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 00:03:00 +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
f3c1c8e009 docs: add Mac Mini setup checklist
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:51:11 +01:00
Till-JS
e29f52135d fix: resolve build errors for mana-core-auth and clock-backend
- Add rememberMe field to sessions schema
- Mock non-existent service imports in tests
- Add missing docker-entrypoint.sh for clock-backend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:48:58 +01:00
Till JS
346c28f2cd
Merge pull request #22 from Memo-2023/feat/mac-mini-arm64-deployment
feat: Multi-arch Docker builds + Mac Mini deployment
2026-01-22 19:49:27 +01:00
Till-JS
4023390c0c feat: add SSH access via Cloudflare Tunnel
- Add ssh.mana.how route to cloudflared config
- Add client setup script for SSH via tunnel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:27:39 +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
Till-JS
e02a94a29c 🐛 fix: restore missing clock shared package
The @clock/shared package was missing after the merge.
Restored from till-dev branch.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 15:43:16 +01:00
Till-JS
49a8c652da 🔀 merge: integrate till-dev into main
Merge till-dev branch containing:
- Planta plant care tracking application
- Clock backend with alarms, timers, world clocks
- Zitare backend with favorites and lists
- Various app improvements and fixes
- Auth system updates
- Infrastructure improvements

Note: Some type-check issues may need resolution after merge.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 15:40:43 +01:00
Till-JS
e22961e580 feat(planta): add plant care tracking application
Add new Planta project for plant care management with:

Backend (NestJS):
- Plant CRUD with species, location, and care requirements
- Watering tracking and scheduling
- Photo management with S3 storage
- AI-powered plant analysis using Google Gemini Vision API
- Drizzle ORM with PostgreSQL schema

Web (SvelteKit):
- Dashboard with plant overview
- Plant detail pages with care history
- Add/edit plant forms
- Auth integration with login/register routes
- API client layer for all endpoints

Infrastructure:
- Database setup in setup-databases.sh
- MinIO bucket for plant photos
- Environment variables for port 3022

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:57:16 +01:00
Till-JS
9afae2efd2 Merge branch 'till-dev' of https://github.com/Memo-2023/manacore-monorepo into till-dev 2026-01-15 14:56:02 +01:00
Till-JS
b3b6bfa008 Merge branch 'till-dev' of https://github.com/Memo-2023/manacore-monorepo into till-dev 2025-12-29 21:22:25 +01:00
Wuesteon
7b365ed05c 🐛 fix(docker): remove unnecessary build step for todo shared package
The @todo/shared package exports TypeScript source files directly
(no build script). The backend's build process handles compiling
these TypeScript files, so we don't need a separate build step.

Fixes Docker error:
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command "build" not found

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-25 21:09:27 +01:00
Wuesteon
111e7dd02c 🐛 fix(docker): add missing build-shared-packages.sh script for Docker builds
The todo-backend Dockerfile (and potentially other backends) expect this script
to exist in docker/shared/. This script builds shared packages in dependency
order during Docker image builds.

Fixes CI failure: "ERROR: failed to build: /docker/shared/build-shared-packages.sh: not found"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-25 20:51:15 +01:00
Wuesteon
2186cb3518 🐛 fix(ci): use db:migrate instead of db:push for test databases
Critical fix based on test failure analysis:
- E2E tests need real migration SQL files to create tables
- db:push is for development schema sync only
- db:migrate runs tracked migrations with advisory locks

This fixes errors:
- relation "credits.balances" does not exist
- relation "referrals.codes" does not exist
- relation "auth.security_events" does not exist

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-25 20:44:38 +01:00