Commit graph

131 commits

Author SHA1 Message Date
Till-JS
feaf27dd14 feat(auth): implement cross-subdomain SSO for all web apps
Add Single Sign-On (SSO) support across all mana.how subdomains:

- Add trySSO() method to @manacore/shared-auth that exchanges session
  cookies for JWT tokens
- Add /api/v1/auth/session-to-token endpoint to mana-core-auth service
- Update all 15 web apps to try SSO during auth initialization

SSO Flow:
1. User logs in on any app (e.g., calendar.mana.how)
2. Session cookie is set with Domain=.mana.how
3. When visiting another app (e.g., todo.mana.how), it checks for
   local tokens first
4. If no local tokens, tries SSO via session cookie
5. Session cookie is exchanged for JWT tokens via new endpoint
6. User is automatically authenticated

Apps updated: calendar, chat, clock, contacts, manacore, manadeck,
nutriphi, picture, planta, presi, questions, skilltree, storage,
todo, zitare

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 13:17:04 +01:00
Till-JS
ab49be0bee 🐛 fix(matrix-mana-bot): resolve QEMU emulation failure in CI
- Build matrix-mana-bot only for linux/amd64 (arm64 fails due to QEMU)
- Move pnpm overrides for cpu-features and ssh2 to root package.json
- These native deps cause illegal instruction errors under QEMU emulation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:59:04 +01:00
Till-JS
d703ccfd80 feat(auth): add resend verification email to registration screen
- Add prominent email verification success UI with resend button
- Show resend verification option when registration fails with "not verified" error
- Improve form spacing with space-y-4 for better visual consistency
- Add translations for resend verification in all languages (de, en, fr, it, es)
- Update all 13 app register pages to pass onResendVerification prop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:44:28 +01:00
Till-JS
06c85ec6c0 🔧 fix: type errors in element.mana.how, mana-media, @todo/web, @calendar/web
- cloudflared: Fix element.mana.how port (8087 → 4080)
- cloudflared: Add missing link.mana.how entry
- mana-media: Fix type-check to run tsc directly on subpackages
- @todo/web: Fix TodoAppSettings to extend Record<string, unknown>
- @todo/web: Add optional chaining for toolbarCollapsedStore
- @calendar/web: Fix CalendarAppSettings to extend Record<string, unknown>
- @calendar/web: Add optional chaining for toolbarCollapsedStore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:56:29 +01:00
Till-JS
03abacc854 🐛 fix(web-apps): fix Vite type compatibility and Svelte 5 store issues
- Simplify vite.config.ts files to avoid type incompatibility errors
  caused by different @types/node versions across the monorepo
- Add missing set() method to isSidebarMode store in matrix/web

Affected apps: calendar, chat, clock, contacts, manacore, manadeck,
matrix, nutriphi, picture, planta, presi, questions, storage, todo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:00:29 +01:00
Till-JS
0229b1c9c3 🐛 fix: resolve tsconfig issues across all NestJS backends
Define compiler options locally instead of extending shared-tsconfig
to fix drizzle-orm type compatibility issues. Also add missing
shared-vite-config dependency to skilltree/web.

Fixed backends:
- calendar, chat, clock, contacts, nutriphi
- picture, presi, questions, skilltree, todo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:47:17 +01:00
Till-JS
4526123bbe 🔧 chore: add shared-stores and shared-api-client to web apps
Add missing workspace dependencies to package.json and Dockerfiles
for chat, todo, clock, and contacts web apps.
2026-01-30 18:27:04 +01:00
Till-JS
d09ea061d2 🔧 chore: add shared-vite-config as devDependency to web apps
Add @manacore/shared-vite-config as devDependency to chat, todo,
clock, and contacts web apps to fix Docker builds.
2026-01-30 18:15:36 +01:00
Till-JS
359b870694 🔧 chore: add shared-vite-config to web Dockerfiles
Add missing shared-vite-config package to chat, clock, contacts,
and todo web Dockerfiles to fix build failures.
2026-01-30 18:01:45 +01:00
Till-JS
f07387d12c 🔥 remove: demo mode from todo, contacts, clock, questions, chat apps
- Enforce login redirect for unauthenticated users
- Remove demo banner, AuthGateModal, and GuestWelcomeModal
- Remove guest mode state variables and CSS styles
- Simplify showLogout to always show when user is logged in

Affected apps: todo-web, contacts-web, clock-web, questions-web, chat-web
2026-01-30 17:21:22 +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
Till-JS
bf719f188f ♻️ refactor: create createSimpleNavigationStores and migrate 10 apps
- Add factory for writable navigation stores with optional persistence
- Support toolbar collapsed state with withToolbar option
- Migrate all 10 navigation stores to use shared factory
- Clock saves 32 LOC with built-in localStorage persistence

Savings: ~50 LOC (68 LOC removed, factory adds reusable 94 LOC)
2026-01-29 17:04:32 +01:00
Till-JS
6807543d60 🔧 chore: create @manacore/shared-drizzle-config and migrate 16 configs
- Create factory function with dbName, schemaPath, outDir, schemaFilter options
- Migrate 12 app backends: calendar, chat, clock, contacts, nutriphi, picture,
  planta, presi, questions, skilltree, storage, todo
- Migrate 4 services: mana-core-auth, telegram-zitare-bot, telegram-todo-bot,
  telegram-nutriphi-bot
- Update consolidation docs with completed Drizzle config task

Savings: ~160 LOC (16 configs × ~10 LOC each)
2026-01-29 16:54:44 +01:00
Till-JS
188290b427 ♻️ refactor: migrate 15 web apps to @manacore/shared-vite-config
- Add missing packages to MANACORE_SHARED_PACKAGES list
- Migrate all SvelteKit apps to use createViteConfig/mergeViteConfig
- Matrix preserves special WASM config for matrix-js-sdk crypto
- Update consolidation docs with completed Vite config task

Savings: ~350 LOC (-318 net lines)
2026-01-29 16:47:55 +01:00
Till-JS
d0d2855adb 🔧 chore: create @manacore/shared-tsconfig and migrate 13 backends
- Create shared TypeScript config package with:
  - base.json: Common options (ES2021, skipLibCheck, etc.)
  - nestjs.json: NestJS backend config (decorators, commonjs)
  - sveltekit.json: SvelteKit web config
  - expo.json: Expo mobile config
  - astro.json: Astro landing config

- Migrate 13 NestJS backends to use shared config:
  calendar, chat, clock, contacts, nutriphi, picture, planta,
  presi, questions, skilltree, storage, todo, zitare

- Skip manadeck (uses nodenext module system)

Savings: ~280 LOC (13 backends × ~22 LOC each)
2026-01-29 16:38:57 +01:00
Till-JS
4681ba8c36 ♻️ refactor: create createAppSettingsStore factory and migrate 3 apps
- Add createAppSettingsStore<T>() factory to @manacore/shared-stores
- Migrate todo, contacts, calendar settings stores to use factory
- Factory provides: localStorage persistence, type-safe set/update/reset
- Optional onSettingsChange callback for cloud sync (used by calendar)
- Reduces boilerplate by ~323 LOC across 3 apps

Savings:
- todo: 259 → 159 LOC (100 LOC)
- contacts: 278 → 173 LOC (105 LOC)
- calendar: 433 → 315 LOC (118 LOC)
2026-01-29 16:30:22 +01:00
Till-JS
a1ca002081 ♻️ refactor: migrate 6 backends to shared-nestjs-metrics
Replace local MetricsService implementations with @manacore/shared-nestjs-metrics:
- chat, calendar, todo, clock, contacts, skilltree

Removes ~350 LOC of duplicated metrics code:
- Delete local metrics directories (service, module, controller)
- Remove manual metrics middleware from main.ts
- Use MetricsModule.register({ prefix: 'app_' }) pattern

Part of consolidation effort - see docs/CONSOLIDATION_OPPORTUNITIES.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:23:32 +01:00
Till-JS
8804ab77a2 ♻️ refactor: centralize AppLoadingSkeleton in shared-ui
Add configurable AppLoadingSkeleton component to @manacore/shared-ui
with multiple layout presets: list, tasks, sidebar, centered, minimal.

Migrate 3 apps to use the shared component:
- contacts: uses default 'list' layout
- todo: uses 'tasks' layout
- questions: uses 'sidebar' layout

Apps with highly specific layouts (calendar, clock) retain their
local implementations for now.
2026-01-29 15:24:29 +01:00
Till-JS
69d405ca84 ♻️ refactor: centralize AuthGateModal in shared-auth-ui
- Create shared AuthGateModal component in @manacore/shared-auth-ui
- Migrate 4 apps to use shared component: chat, todo, contacts, calendar
- Remove duplicate local AuthGateModal components
- Support for 'save', 'sync', 'feature', 'ai' actions
- Built-in i18n (DE + EN) with custom translation support
- Optional migration info display for session data
- Uses Phosphor icons from @manacore/shared-icons
- Update CONSISTENCY_REPORT.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:03:52 +01:00
Till-JS
0c150df0f1 feat(auth): add resend verification email to all login pages
Add ability to resend verification email when login fails with
"Email not verified" error. Implemented across all 14 apps using
Mana Core Auth.

Changes:
- Add POST /api/v1/auth/resend-verification endpoint to mana-core-auth
- Add resendVerificationEmail method to shared-auth client
- Update LoginPage component with resend UI and translations
- Add resendVerificationEmail to all app auth stores
- Add translations for de, en, fr, es, it
- Add PlantaLogo to shared-branding
- Migrate planta login to shared LoginPage component
2026-01-29 14:55:49 +01:00
Till-JS
5a0815708c 🌐 feat: add i18n support to 6 web apps
Add internationalization (DE + EN) to previously missing apps:
- todo: task management translations
- skilltree: skill/XP system translations
- nutriphi: nutrition tracking translations
- planta: plant care translations
- questions: research app translations
- matrix: chat client translations (layout integration)

Each app includes:
- svelte-i18n setup with SSR support
- localStorage persistence ({app}_locale pattern)
- i18n loading state in +layout.svelte
- German (default) and English translations

Updated CONSISTENCY_REPORT.md to mark i18n task as complete.

Also includes:
- mana-tts service placeholder files
2026-01-29 14:48:35 +01:00
Till-JS
5322709fca ♻️ refactor: migrate todo, contacts, storage to shared-api-client
- Update todo, contacts, storage web apps to use @manacore/shared-api-client
- Maintain backward compatibility with existing legacy wrappers
- Todo: apiClient wrapper for setAccessToken/getAccessToken pattern
- Contacts: fetchWithAuth/fetchWithAuthFormData wrappers
- Storage: toLegacyResponse wrapper for ApiResponse format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:27:11 +01:00
Till-JS
f3424c26aa ⬆️ chore: standardize web app dependencies
Update all 15 web apps to consistent dependency versions:

- @sveltejs/kit: ^2.47.1 (was mixed ^2.0.0 to ^2.47.1)
- svelte: ^5.41.0 (was mixed ^5.0.0 to ^5.41.0)
- svelte-check: ^4.3.3 (was mixed ^4.0.0 to ^4.3.3)
- typescript: ^5.9.3 (was mixed ^5.0.0 to ^5.9.3)

Benefits:
- Consistent type checking behavior across apps
- All apps benefit from latest Svelte 5 features
- Easier maintenance with unified versions
2026-01-29 13:49:55 +01:00
Till-JS
b89749deed ♻️ refactor: migrate all web apps to Phosphor icons
Replace lucide-svelte with @manacore/shared-icons across all web apps
for consistent icon usage throughout the monorepo.

Apps migrated:
- calendar (12 files)
- contacts (1 file)
- matrix (16 files)
- nutriphi (7 files)
- presi (6 files)
- questions (9 files)
- skilltree (9 files)
- storage (16 files)
- todo (package.json only)

Key icon mappings:
- Trash2 → Trash
- ChevronLeft/Right/Up/Down → CaretLeft/Right/Up/Down
- Search → MagnifyingGlass
- Settings → Gear
- Loader2 → CircleNotch
- AlertCircle → WarningCircle
- ExternalLink → ArrowSquareOut
- LogOut → SignOut
2026-01-29 13:15:13 +01:00
Till-JS
ff427b1625 📝 docs(todo): update commit hash in cleanup plan 2026-01-28 16:13:15 +01:00
Till-JS
3389252d3a fix(todo-web): remove localhost fallbacks triggering local network permission
- Remove localhost:3018 pattern from service worker cache strategies
- Update auth store to only use localhost fallback in development mode
- Bump service worker cache version to v3 to force update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:33:36 +01:00
Till-JS
1dc4f58edb feat(todo): prepare for production deployment
- Fix type-check errors (subtask id, duplicate currentLocale)
- Add complete Astro landing page with Hero, Features, Pricing, CTA
- Add production environment templates (.env.example, .env.production.example)
- Add docker-compose.prod.yml for production deployment
- Add deploy.sh script for server deployment
- Add /health endpoint for web app health checks
- Improve docker-entrypoint.sh with database wait logic
- Remove references to deleted statistics and session-tasks stores

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:04:27 +01:00
Till-JS
99fdf1d17f ♻️ refactor(todo): remove statistics, network view and session tasks; implement demo mode
Remove complex, low-usage features to simplify codebase:
- Statistics/Heatmap: ~1,900 LOC removed (charts, store, page)
- Network View: ~800 LOC removed (D3.js graph, store, API, page)
- Session Tasks: ~190 LOC removed, replaced with demo mode

Demo mode improvements:
- Static sample tasks instead of confusing sessionStorage behavior
- Auth gate shows when users try to create/edit/complete tasks
- Clear "Demo-Modus" banner for unauthenticated users
- Better UX: users can explore the app without frustration

Total estimated savings: ~2,800 LOC
2026-01-28 13:58:15 +01:00
Till-JS
14c83cb4bd feat(shared-auth-ui): add GuestWelcomeModal for guest onboarding
Add a unified welcome modal for guest mode that displays:
- App icon, name, and description from shared-branding
- Feature list of what guests can do (localized DE/EN)
- Warning about local-only data storage
- Login, Register, Help, and "Continue as Guest" buttons

New files:
- GuestWelcomeModal.svelte - The modal component
- guestWelcome.ts - localStorage utilities for tracking seen state

Integrated into: contacts, chat, todo, calendar, and clock apps
2026-01-27 16:57:14 +01:00
Till-JS
d1e9c87b1c fix(todo): correct health check URL in startup log
The health endpoint is at /health (excluded from api/v1 prefix),
not /api/v1/health.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 03:39:32 +01:00
Till-JS
cb3c1ffb93 ♻️ refactor(todo): replace edit modal with inline task editing
Redesign TaskItem to expand inline for editing instead of opening
a separate modal. Improves UX by keeping user context and reducing
visual interruption. Removes modal-related code from pages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:32:14 +01:00
Till-JS
09b8d7b384 feat(auth-ui): show email verified banner on login pages
Add verified banner and email pre-fill to LoginPage component when
users are redirected after email verification. Updates all app login
pages to pass verification params from URL query string.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:31:55 +01:00
Till-JS
2ccd063628 feat(auth): redirect users to source app after email verification
Add sourceAppUrl tracking during registration to redirect users back
to the app they registered from after email verification. Includes
URL validation for security (only *.mana.how, mana.how, localhost).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:31:31 +01:00
Till-JS
def7249058 🚸 feat(todo): redesign homepage empty state and section visibility
- Remove "Meine Aufgaben" header (sections are self-explanatory)
- Add enhanced empty state with animated sparkle icon, motivational
  message, and clickable syntax examples that insert into input bar
- Implement smart section visibility (only show sections with tasks,
  but always show "Today" as primary workspace)
- Add onboarding tip for users with 1-3 tasks showing #tags and
  !priority syntax
- Add quick-input-set event listener to InputBar for example clicks
2026-01-26 16:29:42 +01:00
Till-JS
4973cf8cf9 feat(todo): consolidate bars using ExpandableToolbar pattern from Calendar app
- Refactor TodoToolbar to use ExpandableToolbar (FAB + sliding panel)
- Create TodoToolbarContent with filter, sort, and view options
- Move toolbar from page to layout (consistent with Calendar app)
- Add dynamic bottomOffset to QuickInputBar when toolbar expands
- Add isToolbarCollapsed state with localStorage persistence
- Remove auth redirects from kanban and settings pages for guest mode support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:33:24 +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
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
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
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
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
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
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
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
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
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
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