Commit graph

627 commits

Author SHA1 Message Date
Till-JS
a514879e4b refactor(calendar): reorganize routes into (app) layout group
Move all authenticated routes into (app) layout group for better
code organization and layout management.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 04:19:51 +01:00
Till-JS
f1ed3e3f2e feat(inventory): add new Inventory app scaffolding
Add new Inventory management app with:
- Backend NestJS setup with Drizzle schema for items, categories, locations
- Web SvelteKit app with item management UI
- Shared branding config (logo, icon, colors)
- Storage bucket configuration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 04:19:36 +01:00
Wuesteon
0fe397504c fix(cd): use drizzle-kit push for schema migration
- Change db:migrate (non-existent) to drizzle-kit push --force
- Add --force flag to skip interactive confirmation in CI
- Document Problem 7: Missing Database Schema
- Add lessons learned about schema vs database creation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 04:16:32 +01:00
Wuesteon
113495add3 docs: add client-side env injection and CORS troubleshooting
Documented two additional staging deployment issues discovered today:

Problem 5: Client-Side Calling localhost Instead of Public IP
- Root cause: process.env not available in browser
- Solution: Use hooks.server.ts transformPageChunk to inject window.__VAR__
- Pattern: Separate _CLIENT env vars for browser access

Problem 6: CORS Blocking Cross-Origin Requests
- Root cause: Different ports = different origins
- Solution: Add CORS_ORIGINS env var to mana-core-auth
- Verification: Test with curl OPTIONS preflight

Also added:
- Updated checklist with CORS and client URL verification
- 4 new lessons learned (#7-#10)
- Environment variable flow diagram

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 04:09:11 +01:00
Wuesteon
00281a86d3 fix(staging): add CORS_ORIGINS to mana-core-auth
Allow cross-origin requests from chat-web (port 3000) and chat-backend (port 3002)
to mana-core-auth (port 3001) on staging server.

Without this, browser requests from chat-web to mana-core-auth are blocked
by CORS policy since they're on different ports (3000 vs 3001).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:56:30 +01:00
Till-JS
5fd5423f8e feat(manacore): add Picture, ManaDeck, and Clock dashboard widgets
- Add 3 new widget types: picture-recent, manadeck-progress, clock-timers
- Create API services for Picture, ManaDeck, and Clock apps
- Add PictureRecentWidget showing recent AI-generated images
- Add ManadeckProgressWidget showing learning progress and due cards
- Add ClockTimersWidget showing active timers and alarms
- Update WidgetContainer to include new widget components
- Add i18n translations (DE/EN) for all new widgets
- Extend WIDGET_REGISTRY with metadata for new widgets

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:45:07 +01:00
Wuesteon
44608074fc fix(chat-web): inject runtime env vars for client-side auth
Problem: Browser was calling localhost:3001 instead of staging server IP
because environment variables from Docker aren't available client-side.

Solution:
1. Add PUBLIC_*_CLIENT env vars to docker-compose.staging.yml for browser URLs
2. Inject these into window.__PUBLIC_*__ via hooks.server.ts transformPageChunk
3. Auth store reads from window variable for client-side requests

This pattern properly handles:
- SSR: Uses Docker internal URLs (http://mana-core-auth:3001)
- Client: Uses public URLs (http://46.224.108.214:3001)
- Local dev: Falls back to localhost

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:38:53 +01:00
Till-JS
acb5d74420 📝 docs: add release plan and manacore roadmap
- Add RELEASE-PLAN.md with prioritized app release order
- Add MANACORE-TODOS.md with detailed development roadmap
- Update apps.ts config with all 14 active apps
- Remove archived apps (memoro, storyteller) from config
- Add features and descriptions for all apps
- Add helper functions for app categories

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:38:27 +01:00
Till-JS
cfbc8a2c15 ♻️ refactor: unify web app patterns across monorepo
- Rename authStore.svelte.ts to auth.svelte.ts (manacore, manadeck, moodlit)
- Add i18n setup to Finance and Mail apps (DE, EN, FR, ES, IT)
- Add feedback pages using shared component to Finance and Mail
- Create @manacore/shared-api-client package with API client factory
- Create @manacore/shared-vite-config package with SSR config helpers
- Create @manacore/shared-stores package with toast, navigation, theme factories

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:35:26 +01:00
Wuesteon
0c05097459 docs: add staging deployment troubleshooting guide
Comprehensive documentation of the staging deployment journey including:

- Problem 1: GitHub workflow file extensions (.yml.bak to disable)
- Problem 2: chat-backend health check path (/api/v1/health not /api/health)
- Problem 3: SvelteKit static env imports (use runtime patterns for Docker)
- Problem 4: Orphan Docker containers

Also fixes the cd-staging.yml health check path for chat-backend to match
the actual NestJS endpoint at /api/v1/health.

Includes checklists, debugging commands, and lessons learned.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:35:10 +01:00
Wuesteon
4a56c888b0 fix(staging): correct chat-backend health check path to /api/v1/health
The chat-backend NestJS health endpoint is at /api/v1/health, not /api/health.
This was causing the container to be marked as unhealthy, preventing chat-web
from starting due to its depends_on condition.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:32:22 +01:00
Wuesteon
0aa9ba0c7e chore(ci): disable PR and dependency workflows for minimal setup
Only active workflows now:
- ci-main.yml (Docker builds)
- cd-staging.yml (staging deploy)
- cd-staging-tagged.yml (tagged releases)
- cd-production.yml (production deploy)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:06:24 +01:00
Wuesteon
c1d14a4aff chore(ci): rename backup files to .bak to prevent GitHub detection
GitHub was running .full.yml files as workflows. Changed extension
to .bak which GitHub won't recognize.

To restore:
  mv file.yml.bak file.yml

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 03:04:01 +01:00
Wuesteon
be37808966 fix(chat-web): use runtime env vars instead of static imports
Changed PUBLIC_MANA_CORE_AUTH_URL from $env/static/public to runtime
environment variables so the Docker build doesn't fail.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 02:49:32 +01:00
Wuesteon
8253fbba9b chore(ci): disable test workflows for rapid iteration
Renamed test.yml and test-coverage.yml to .disabled extension to
completely stop them from running during rapid iteration testing.

Only mana-core-auth and chat Docker builds run now on main branch.

To re-enable later:
  mv .github/workflows/test.yml.disabled .github/workflows/test.yml
  mv .github/workflows/test-coverage.yml.disabled .github/workflows/test-coverage.yml

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 02:47:20 +01:00
Wuesteon
eaf82b49c4 fix(ci): remove validate job - Docker builds are self-contained
Before: validate job installed ALL deps + built ALL packages (~10 min)
After: Just build 3 Docker images in parallel (~3-5 min)

Each Dockerfile handles its own dependencies, no pre-validation needed.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 02:45:06 +01:00
Wuesteon
1ecdee462b chore(ci): simplify pipelines for rapid testing
- ci-main.yml: Only builds mana-core-auth, chat-backend, chat-web
- test.yml: Disabled (manual trigger only)
- test-coverage.yml: Disabled (manual trigger only)

Archived full configs with .full.yml suffix for restoration.

To restore full pipelines:
  cp .github/workflows/ci-main.full.yml .github/workflows/ci-main.yml
  cp .github/workflows/test.full.yml .github/workflows/test.yml
  cp .github/workflows/test-coverage.full.yml .github/workflows/test-coverage.yml

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 02:12:59 +01:00
Wuesteon
714298f7c8 feat(chat-web): add Docker deployment for chat frontend
- Add @sveltejs/adapter-node for server-side rendering
- Create Dockerfile for chat web SvelteKit app
- Add /health endpoint for container health checks
- Add chat-web service to docker-compose.staging.yml
- Update CI/CD workflow with chat-web health check

The chat app now deploys with both backend and web frontend:
- mana-core-auth (port 3001) - central auth
- chat-backend (port 3002) - API
- chat-web (port 3000) - web frontend

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 02:10:32 +01:00
Wuesteon
80f80053f3 refactor(staging): simplify CI/CD to mana-core-auth + chat-backend only
Archived full staging config for future restoration:
- docker-compose.staging.full.yml (includes manadeck, nginx)
- .github/workflows/cd-staging.full.yml (includes all health checks)

Simplified staging deployment:
- Only deploys postgres, redis, mana-core-auth, chat-backend
- Added database creation step for manacore_auth and chat DBs
- Faster iteration for testing central auth integration

To restore full config:
  cp docker-compose.staging.full.yml docker-compose.staging.yml
  cp .github/workflows/cd-staging.full.yml .github/workflows/cd-staging.yml

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 01:33:01 +01:00
Wuesteon
6c3b2971bf fix route 2025-12-05 00:50:23 +01:00
Wuesteon
b6115a63c7 add health route 2025-12-05 00:15:44 +01:00
Wuesteon
952f246055 fix styleing 2025-12-04 23:40:25 +01:00
Wuesteon
9c47119535 Fix wrong type
import, make auth and chat work
2025-12-04 23:25:25 +01:00
Wuesteon
b8f9bc107c 🐛 fix(chat-backend): remove type-only ConfigService import
Fixed NestJS dependency injection error in ChatService by converting type-only import to regular import.

Root cause: Type-only imports are erased at compile time, causing NestJS to fail dependency injection at runtime.

Error: "Nest can't resolve dependencies of the ChatService (?, DATABASE_CONNECTION)"

This was the same issue we fixed in mana-core-auth services.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 23:02:26 +01:00
Wuesteon
9b26caf5a1 🐛 fix(mana-core-auth): remove type-only imports from services and controllers
Fixed remaining NestJS dependency injection issues by converting type-only imports to regular imports for all injectable services used in controllers and service dependencies.

Changes:
- feedback.service.ts: Fixed AiService import (was causing "argument Function at index [1]" error)
- auth.controller.ts: Fixed BetterAuthService import
- feedback.controller.ts: Fixed FeedbackService import
- credits.controller.ts: Fixed CreditsService import
- settings.controller.ts: Fixed SettingsService import

Root cause: Type-only imports (`import { type X }`) are erased at compile time, causing NestJS to fail dependency injection at runtime. All injectable classes must use regular imports.

Verified locally: All modules initialize successfully without DI errors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 22:58:45 +01:00
Wuesteon
60ecc24f6c 🐛 fix(auth): remove all type-only ConfigService imports
Found and fixed type-only ConfigService imports in 6 service files that were causing "Nest can't resolve dependencies" errors:

- better-auth.service.ts (BetterAuthService)
- ai.service.ts (AiService)
- settings.service.ts
- feedback.service.ts
- credits.service.ts
- jwt-auth.guard.ts
- optional-auth.guard.ts

Type-only imports are erased at compile time, preventing NestJS from injecting the ConfigService class at runtime.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 21:53:28 +01:00
Wuesteon
a865da99a8 📝 docs: add NestJS dependency injection troubleshooting
Document the type-only import issue that causes "Nest can't resolve dependencies" errors. This was the root cause of the AiService injection failure that took significant debugging to identify.

Key learnings:
- Type-only imports are erased at compile time
- NestJS needs actual class imports for DI
- Docker cache can mask source code changes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 19:09:38 +01:00
Wuesteon
d69cc60744 🐛 fix(auth): remove type-only import of ConfigService in AiService
The `type` keyword on ConfigService import was causing NestJS to fail resolving the dependency at runtime, as type-only imports are erased during compilation. Changed to regular import to fix DI.

Error was: "Nest can't resolve dependencies of the AiService (?)"

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 19:08:37 +01:00
Wuesteon
040d044496 🐛 fix(mana-core-auth): add ConfigModule import to AiModule
Fixes NestJS dependency injection error where AiService couldn't
resolve ConfigService dependency.

Error:
> Nest can't resolve dependencies of the AiService (?).
> Please make sure that the argument Function at index [0] is available

Root cause: AiModule was missing ConfigModule in its imports array,
but AiService constructor requires ConfigService to read ai.geminiApiKey.

This was preventing mana-core-auth from starting in staging deployment.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:46:39 +01:00
Till-JS
c93aca0cce 📝 docs: update COMMANDS.md and add APP-IDEAS.md
- Add finance app to command list
- Add comprehensive app overview (31 apps total) to COMMANDS.md
- Add APP-IDEAS.md with prioritized suggestions for new apps

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:28:16 +01:00
Till-JS
1b11ebc998 🐛 fix(shared-feedback-ui): use CreateFeedbackInput type in handleSubmit
Properly type the feedback submission handler with the exported
CreateFeedbackInput type from shared-feedback-service.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:27:58 +01:00
Till-JS
ed985d9500 feat(shared-ui): add centered mode to PageHeader component
Add optional 'centered' prop that centers the title with back button on
left and actions on right. Useful for mobile-style headers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:27:43 +01:00
Till-JS
05d074c57e 🔧 refactor(figgos): restructure to standard monorepo pattern
Migrate figgos from single Expo app to multi-app monorepo structure:
- Move mobile app to apps/mobile/
- Add apps/web/ (SvelteKit) and apps/backend/ (NestJS) scaffolds
- Add packages/shared/ for shared types and constants
- Update root package.json with new dev commands
- Temporarily skip type-check (run pnpm install first)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:27:15 +01:00
Till-JS
9dee75e06e feat(clock): improve UI across alarms, timers, pomodoro, and world clock pages
- Enhanced alarm page with preset suggestions and better layout
- Simplified timers page with cleaner controls
- Improved pomodoro with visual progress indicators
- World clock now shows interactive map with city markers
- Extended app.css with new utility classes and animations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:26:50 +01:00
Till-JS
f80b864ba8 feat(clock): add interactive world map to world clock page
Add D3.js powered world map with city markers showing timezone locations.
Extended timezone constants with lat/lng coordinates for 35 major cities.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:25:58 +01:00
Wuesteon
234703a130 ♻️ refactor(cd): hardcode non-sensitive config in staging workflow
Reduced GitHub Secrets requirements from 21 to 12 by hardcoding
non-sensitive configuration values directly in the workflow file.

Changes:
- Hardcoded: DB/Redis host/port, STAGING_HOST, STAGING_USER, MANA_SERVICE_URL
- Keep as secrets: passwords, API keys, JWT keys, SSH private key
- Updated generate-staging-secrets.sh to reflect reduced secret list
- Added get-ssh-key.sh helper script for SSH key extraction

Benefits:
- Fewer secrets to manage in GitHub
- Configuration visible in code review
- Easier to update non-sensitive values (no UI navigation)
- Better separation of config vs secrets

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:11:36 +01:00
Till-JS
b7eeae9590 feat(moodlit): add complete web app with fullscreen moods and sequences
- Add 24 default moods with various animation types (pulse, wave, candle, disco, etc.)
- Implement fullscreen mood view with play/pause, timer, and keyboard controls
- Add create mood dialog for custom moods with color picker and animation selection
- Implement sequences page with demo sequences and playback functionality
- Add MoodCard component with favorite toggle and animations
- Integrate with shared-branding (MoodlitLogo, AppId, APP_BRANDING config)
- Add i18n support (DE/EN) for all features
- Setup auth pages using shared-auth-ui
- Add feedback page with shared-feedback-service integration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:53:56 +01:00
Till-JS
ad0051a8fc feat(finance): add complete finance app with budget tracking
- Backend (NestJS, Port 3019):
  - Account management with multi-currency support
  - Categories with income/expense types and seed functionality
  - Transaction tracking with comprehensive filters
  - Monthly budgets with spending tracking
  - Transfers between accounts
  - Reports (dashboard, trends, category breakdown)
  - User settings (currency, locale, date format)
  - Exchange rates with ECB API integration
  - Bank sync architecture prepared (connected_accounts)

- Frontend (SvelteKit, Port 5189):
  - Dashboard with totals, budget progress, recent transactions
  - Transaction list with filters
  - Account management
  - Category management
  - Budget tracking per month
  - Reports & trends
  - Settings page
  - Auth pages (login, register, forgot-password)

- Shared package with types, constants, utilities
- Environment configuration for backend, web, mobile

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:41:43 +01:00
Till-JS
bbe540c3f1 feat: add global start page setting across all apps
- Add GeneralSettings types (startPages, weekStartsOn, soundsEnabled)
- Create app-routes.ts with available routes for 12 apps
- Extend UserSettingsStore with general settings support
- Update GlobalSettingsSection with start page selector UI
- Add start page redirect logic to all app layouts:
  - Clock, Calendar, Todo, Zitare, Picture
  - Manadeck, Presi, Chat, Manacore
- Create user-settings stores for Clock and Todo apps

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:31:04 +01:00
Till-JS
5b3c5ff4fb 🐛 fix: resolve type-check errors in finance and moodlit
- Add missing tsconfig.json to finance/packages/shared
- Remove recursive turbo scripts from moodlit/package.json

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:30:01 +01:00
Till-JS
949b9c85bc 🎮 feat(games): add figgos game to monorepo
- Rename barbiebox to figgos and integrate into monorepo
- Remove separate git repository
- Update package name to @figgos/game
- Add dev scripts (figgos:dev, dev:figgos:ios, dev:figgos:android)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:26:25 +01:00
Till-JS
03b77eec46 feat(clock): add life clock page with minimal homepage redesign
- Simplify homepage by removing Quick Access section
- Add date/time info below clock with countdown counters
- Create new Life Clock (/life) page showing days lived
- Add 3 switchable visualizations: Circular Progress, Dot Grid, Year Rings
- DotGrid shows weeks as grid with decade markers and current week highlight
- Store birthdate in localStorage for life statistics calculation
- Add navigation entry for Life Clock

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:00:54 +01:00
Till-JS
6080902444 feat(clock): add multi-stopwatch support with improved UI
- Extend stopwatch store to manage multiple stopwatches simultaneously
- Add localStorage persistence for stopwatches
- Implement focused/compact card layout with color coding
- Support lap tracking with best/worst markers per stopwatch
- Add editable labels and automatic color assignment
- Update i18n strings for all 5 languages (DE, EN, ES, FR, IT)
2025-12-04 15:42:12 +01:00
Till-JS
10f4da819b feat(manacore): add configurable cross-app dashboard with widgets
- Add widget system with 9 widget types (credits, tasks, calendar, chat, contacts, quotes, etc.)
- Implement drag-and-drop grid layout with edit mode
- Create API services for todo, calendar, chat, contacts, and zitare backends
- Add dashboard store with localStorage persistence
- Include German and English i18n translations
- Replace legacy dashboard with new configurable widget-based UI
2025-12-04 15:41:24 +01:00
Till-JS
9eb0b51c4c feat(clock): add 10 new clock face designs
Add 5 new analog clock faces:
- Vintage: Antique clock with aged patina and spade hands
- Nautical: Marine-style brass ship clock with compass rose
- Industrial: Factory-style with rivets and metal accents
- Bauhaus: Geometric design with primary color accents
- Railway: Swiss station clock (SBB-style) with red lollipop second hand

Add 5 new digital clock faces:
- Retro: Pixel-style CRT display with scanlines
- Gradient: Modern display with dynamic color shifts
- Terminal: Command-line interface style
- Typewriter: Vintage mechanical keyboard style
- Radar: Military radar screen with sweep animation

Includes translations for all 5 languages (DE, EN, ES, FR, IT)
2025-12-04 15:37:34 +01:00
Wuesteon
cf2b6aaa2b 🐛 fix(cd): fix postgres startup and health check issues in staging
Fixes two critical deployment issues:

1. Postgres Container Startup Failure:
   - Remove missing init.sql volume mount that caused postgres to fail
   - Postgres was trying to mount ./docker/postgres/init.sql which doesn't exist
   - Added REDIS_PASSWORD environment variable

2. Health Check SSH Issues:
   - Consolidated health checks into single SSH session
   - Increased wait time from 30s to 60s for services to fully initialize
   - Improved health check output with clear status messages
   - Added container status logging for debugging

3. Docker Compose Improvements:
   - Remove obsolete 'version: 3.9' field (deprecated in Compose v2)
   - Increase initial startup wait from 10s to 15s

Changes to docker-compose.staging.yml:
- Removed non-existent init.sql volume mount from postgres
- Removed obsolete version field

Changes to .github/workflows/cd-staging.yml:
- Added REDIS_PASSWORD to environment variables
- Consolidated health checks into single SSH session (fixes "ssh: command not found")
- Increased wait times for service initialization
- Improved logging and error messages

This should fix the "dependency failed to start: container manacore-postgres-staging is unhealthy" error.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:21:15 +01:00
Wuesteon
f7986bc1a7 🐛 fix(cd): fix staging deployment registry authentication and missing images
Changes to .github/workflows/cd-staging.yml:
- Add Docker login step for GitHub Container Registry (ghcr.io)
- Add permissions for packages:read
- Update service deployment options to only include services with Dockerfiles
- Update health checks to match deployed services

Changes to docker-compose.staging.yml:
- Comment out services without Dockerfiles:
  - maerchenzauber-backend (no Dockerfile yet)
  - nutriphi-backend (no Dockerfile yet)
  - news-api (no Dockerfile yet)
- Keep only services with Docker images:
  - mana-core-auth 
  - chat-backend 
  - manadeck-backend 
- Update nginx dependencies to remove disabled services

This fixes the "error from registry: denied" error that was preventing
staging deployments. The deployment was trying to pull Docker images
that were never built because those services don't have Dockerfiles.

Now only services with actual Docker images will be deployed to staging.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 03:22:07 +01:00
Wuesteon
a87e1389cf 🐛 fix(docker): fix manadeck backend Dockerfile to use pnpm
Changes:
- Replace npm with pnpm for workspace dependency support
- Copy workspace files (pnpm-workspace.yaml, package.json, pnpm-lock.yaml)
- Copy and build shared package dependencies:
  - @manacore/shared-errors
  - @manacore/manadeck-database
  - @mana-core/nestjs-integration
- Use pnpm install --frozen-lockfile
- Update base image to node:20-alpine
- Use dumb-init for proper signal handling

This fixes the "Unsupported URL Type 'workspace:'" error that was
preventing Docker builds. The new approach matches the pattern used
by the chat backend Dockerfile.

Fixes build error in CI/CD pipeline.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 02:43:58 +01:00
Wuesteon
aca6cdbaa5 🐛 fix(build): fix build errors and add troubleshooting docs
Fixes multiple build errors discovered after removing recursive turbo calls:

1. Documentation:
   - Add comprehensive TROUBLESHOOTING.md covering recursive turbo issues
   - Includes prevention checklist and validation scripts
   - Documents both build and linting recursive problems

2. Storage app fixes:
   - Fix nested button HTML validation in FileCard, FolderCard, FileRow, FolderRow
   - Fix theme constant imports (DEFAULT_VARIANT, THEME_VARIANTS)
   - Fix auth component imports (StorageLogo → ManaIcon)

3. Presi app fixes:
   - Fix authStore import mismatch (authStore → auth)

Build time improved from infinite loop to 36.3s (39/39 tasks successful).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 02:19:11 +01:00
Wuesteon
e32e4b1b3a 🐛 fix(build): remove recursive build scripts from parent packages
Parent workspace packages (apps/*/package.json, games/*/package.json) had
build scripts that called 'turbo run build' or 'pnpm run --recursive build',
creating infinite recursion when root turbo orchestrates builds.

When root turbo runs 'build', it finds packages with build scripts and
executes them. If those scripts also call 'turbo run build', it spawns
another turbo process → infinite loop.

Changes:
- Removed 'build' script from 7 parent packages (calendar, contacts, zitare, picture, presi, mana-games, voxel-lava)
- Also removed redundant 'clean', 'lint', 'type-check' scripts where they had recursive calls
- Root turbo.json already handles orchestration of these tasks

This follows the guideline in CLAUDE.md:
> Parent workspace packages must NEVER have scripts that call turbo run
> for tasks that turbo orchestrates from the root.

Fixes CI build timeout (was running for 10+ minutes with infinite task spawning).
2025-12-04 01:59:53 +01:00