Commit graph

632 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
304897261d test: implement comprehensive automated testing system with daily CI/CD
Implement rock-solid automated testing infrastructure for mana-core-auth
with daily execution, notifications, and comprehensive monitoring.

Test Suite Improvements:
- Fix all 36 failing BetterAuthService tests (missing service mocks)
- Add 21 JwtAuthGuard tests achieving 100% statement coverage
- Create silentError helper to suppress intentional error logs
- Fix Todo backend TaskService test structure
- Add jose mock for JWT testing
- Configure jest collectCoverageFrom for mana-core-auth

GitHub Actions Workflow:
- Daily automated test execution (2 AM UTC + manual trigger)
- Matrix parallelization across 6 backend services
- PostgreSQL and Redis service containers
- Coverage enforcement (80% threshold)
- Multi-channel notifications (Discord, Slack, GitHub Issues)
- Support for success notifications (opt-in)

Test Infrastructure:
- Coverage aggregation across multiple services
- Flaky test detection with 30-run history tracking
- Performance metrics tracking with regression detection
- Test data seeding and cleanup scripts
- Comprehensive test reporting with formatted metrics

Documentation:
- TESTING_GUIDE.md (4000+ words) - Complete testing documentation
- AUTOMATED_TESTING_SYSTEM.md - System architecture and workflows
- DISCORD_NOTIFICATIONS_SETUP.md - Discord webhook setup guide
- TESTING_DEPLOYMENT_CHECKLIST.md - Pre-deployment verification
- TESTING_QUICK_REFERENCE.md - Quick command reference

Final Result:
- 180/180 tests passing (100% pass rate)
- Zero console errors in test output
- Automated daily testing with rich notifications
- Production-ready test infrastructure
2025-12-25 19:12:27 +01:00
Wuesteon
5b7d3c649b 🔧 chore: enforce monorepo best practices with automated validation
Fix critical issues and add validation to prevent future violations:

**Fixes:**
- Remove turbo recursion in 5 app packages (infinite loop risk)
- Add "private": true to 11 packages (prevent accidental publishing)
- Rename @mana-core/nestjs-integration → @manacore/nestjs-integration
- Remove prepublishOnly scripts from 3 private packages

**New:**
- Add scripts/validate-monorepo.mjs with 4 critical checks
- Add validate:monorepo command to package.json
- Integrate validation into CI pipeline (.github/workflows/ci.yml)
- Document validation in CLAUDE.md

All 80 package.json files now pass validation 

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-25 17:57:00 +01:00
Wuesteon
079b55a796 delete old apps due to context pollution 2025-12-25 17:23:14 +01:00
Wuesteon
9bba76133b fix todo backend docker file 2025-12-25 17:07:55 +01:00
Wuesteon
42bb44b747 Merge branch 'till-dev' into dev 2025-12-24 22:49:01 +01:00
Wuesteon
bb4189f942 Merge branch 'dev' into till-dev 2025-12-19 19:29:29 +01:00
Wuesteon
834b11d1d1 🐛 fix(staging): add missing PUBLIC_*_CLIENT env vars for runtime config
Web apps use hooks.server.ts to inject window.__PUBLIC_*__ variables at
runtime, but docker-compose.staging.yml was only setting vars for
docker-entrypoint.sh config.json. This caused web apps to fall back to
localhost URLs in production.

Changes:
- Add PUBLIC_*_CLIENT env vars for all staging web apps
- Update calendar-web hooks.server.ts to inject contacts API URL
2025-12-19 03:26:59 +01:00
Wuesteon
4d15d9e764 🔒 security(auth): migrate to EdDSA JWT and add automated monitoring
BREAKING: JWT keys are now auto-managed by Better Auth (EdDSA/Ed25519)
- Remove all JWT_PRIVATE_KEY, JWT_PUBLIC_KEY, JWT_SECRET references
- Keys stored in auth.jwks database table (auto-generated on first run)
- Delete obsolete generate-keys.sh and generate-staging-secrets.sh scripts
- Clean up legacy AUTH_*.md analysis files from root

Security Improvements:
- Add security_events table for audit logging
- Add SecurityEventsService for tracking auth events
- Enhanced security headers (HSTS, CSP, X-Frame-Options)
- Rate limiting configuration

Monitoring Setup:
- Add auth-health-check.sh for automated testing
- Add generate-dashboard.sh for HTML status dashboard
- Tests: health endpoint, JWKS (EdDSA), security headers, response time
- Ready for Hetzner cron deployment

Documentation:
- Update deployment docs with Better Auth notes
- Update environment variable references
- Add security improvements documentation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:42:47 +01:00
Wuesteon
1214c78a3c 🐛 fix(picture-backend): fix TypeScript output path for Docker
Added rootDir: "./src" to tsconfig.json so that main.ts compiles to
dist/main.js instead of dist/src/main.js. This matches the CMD path
in the Dockerfile.

Also added include/exclude and moduleResolution to match other backends.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 19:49:37 +01:00
Wuesteon
05ad5f1ed8 🔧 fix(picture-web): switch from adapter-netlify to adapter-node
The Docker build was failing because adapter-netlify outputs to .netlify/
directory but the Dockerfile expected build output in build/ directory.

Switched to adapter-node with explicit `out: 'build'` configuration
which matches the Dockerfile expectations.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 19:13:29 +01:00
Wuesteon
71cbca07d5 🐛 fix(picture-web): fix Docker build and auth pages
- Remove unused Google/Apple OAuth imports from login page
- Add missing shared-types package to Dockerfile
- Fix signup page to pass name parameter to signUp
- Add confirmResetPassword method to auth store
- Add reset-password page for completing password reset flow
2025-12-17 18:58:31 +01:00
Wuesteon
dcdc15f154 🚀 ci(picture): add picture app to CI/CD deployment pipeline
- Add picture-backend and picture-web to CI Docker build matrix
- Add picture services to staging deployment workflow
- Add picture-backend to production deployment workflow
- Create Dockerfile and docker-entrypoint.sh for picture-web
- Fix picture-backend Dockerfile port (3003→3006) and health endpoint
- Add picture routes to Caddyfile.staging
- Add REPLICATE_API_TOKEN and MANA_CORE_SERVICE_KEY env vars
2025-12-17 18:47:42 +01:00