Add comprehensive code review document analyzing the major update PR:
- Summary of 382 changed files with +39,514/-6,251 lines
- Code quality analysis highlighting strengths and improvements
- Security considerations and authorization patterns
- Recommendations for future PRs and test coverage
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users were getting signed out after ~15 minutes because API clients were
reading tokens directly from localStorage without triggering the refresh
logic. The tokenManager exists with proper refresh capability but was
never being used.
Changes:
- Add getValidToken() method to auth stores in 9 web apps
- Update API clients to use authStore.getValidToken() instead of localStorage
- Token refresh now happens proactively before requests fail
Apps updated: chat, calendar, picture, zitare, contacts, todo, clock, manacore, manadeck
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Chat:
- Add OpenRouter as primary AI provider with multiple models
- Update chat service with new model configurations
- Add model seed data for Llama, DeepSeek, Mistral, Claude, GPT-4o
Picture:
- Integrate @mana-core/nestjs-integration for credit system
- Implement freemium model (3 free generations, then 10 credits)
- Migrate storage to @manacore/shared-storage
- Add comprehensive project documentation
- Add staging-config-check.yml workflow to validate HTTPS URLs on PRs
- Add CODEOWNERS to require team lead review for critical config files
- Update GIT_WORKFLOW.md with config file protection guidelines
Prevents accidental reversion of staging URLs (HTTP vs HTTPS) during rebases.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The chat-backend build failed because the storage module imports from
@manacore/shared-storage which was not being copied into the Docker build
context.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Documents the squash-before-PR workflow, conflict resolution strategies,
and best practices for the monorepo development process.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## Runtime Environment Fix
- Updated all web app hooks.server.ts to use $env/dynamic/private
- This allows Docker containers to inject env vars at runtime
- Updated docker-compose.staging.yml with HTTPS staging domains
- Fixes Mixed Content errors when accessing staging via domains
## New Features
- Added email service to mana-core-auth for sending emails
- Added storage module to chat backend
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated all web app hooks.server.ts to use $env/dynamic/private
instead of process.env for reading environment variables
- This allows Docker containers to inject env vars at runtime
- Updated docker-compose.staging.yml with HTTPS staging domains
- Fixes Mixed Content errors when accessing staging via domains
Affected apps: clock, chat, calendar, todo, manacore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace Coolify with Docker Compose throughout documentation.
The project never used Coolify - a removal script was created but
never executed, leaving incorrect documentation.
Changes:
- Delete 13 heavily Coolify-focused docs files
- Update ~30 files replacing Coolify → Docker Compose
- Remove obsolete removal script
- Fix deployment references in active and archived projects
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds a new 'migrations' job that runs after deploy to automatically
push schema changes to the database. Features:
- Runs db:push after container deployment
- Retry logic with exponential backoff (3 attempts)
- 2-minute timeout per attempt
- Skipped for web-only projects (manacore)
- Reports migration status in deployment summary
This ensures schema changes are automatically applied when deploying
new versions via tags (e.g., todo-staging-v1.0.0).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Better Auth generates non-UUID user IDs (32-char base62 format like
'otUe1YrfENPdHnrF3g1vSBfpkQfambCZ'). Changed all `uuid('user_id')` to
`text('user_id')` in Drizzle schemas for consistency with auth system.
Affected packages/apps:
- apps/calendar, clock, picture, zitare
- games/figgos, voxelava
- packages/manadeck-database, news-database, uload-database
- services/mana-core-auth (feedback schema)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Better Auth generates non-UUID user IDs (e.g., otUe1YrfENPdHnrF3g1vSBfpkQfambCZ).
Changed all user_id columns from uuid to text type to prevent
"invalid input syntax for type uuid" errors.
Also documented this requirement in:
- .claude/guidelines/authentication.md (new User ID Format section)
- .claude/guidelines/database.md (User ID Column Type section)
- apps/todo/CLAUDE.md (Database Schema section)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove stale containers before deploying (fixes 'name already in use' error)
- Always use --force-recreate flag for consistent deployment behavior
- Add troubleshooting docs for container name conflicts
- Add multiple boards support with board navigation (pill-style)
- Add global board for all tasks
- Board CRUD operations with color/icon customization
- Task detail modal: click on card opens full edit modal
- Inline title editing: double-click on title for quick edit
- Right-click context menu: edit, complete, delete actions
- Responsive board navigation (top on desktop, bottom on mobile)
- Remove flip animations for cleaner board switching
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add web app manifest with app metadata and shortcuts
- Add service worker with network-first, cache-first, and network-only strategies
- Add offline fallback page with auto-reload on reconnection
- Add SVG placeholder icon for PWA
- Add PWA meta tags for iOS, Android, and Windows support
- Add comprehensive PWA guide documentation (docs/PWA_GUIDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add storyPoints, effectiveDuration, funRating to TaskMetadata
- Add UI controls in TaskEditModal for new metadata fields
- Add columns/kanban icon to shared-ui PillNavigation
- Add Mana subscription page to todo app
- Update TASK_METADATA.md documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add TaskEditModal with full task editing (title, description, dates,
priority, status, project, labels, subtasks, recurrence, notes,
storypoints, duration, fun rating)
- Add SubtaskList component with drag-and-drop reordering
- Add onEdit prop to TaskItem and TaskList for modal integration
- Fix task loading on homepage by simplifying fetchAllTasks to load
all tasks without isCompleted filter
- Fix isCompleted query parameter parsing in backend DTO
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Document all available task properties including scheduling, priority,
recurrence (RFC 5545 RRULE), subtasks, labels, and metadata fields.
Includes examples and notes on current QuickAdd implementation status.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add referral code input to RegisterPage with live validation
- Create ReferralWidget for dashboard with stats, code sharing, and tier display
- Extend authService.signUp to accept optional referralCode parameter
- Add validateReferralCode function to authStore
- Create referrals.ts API service for frontend
- Add 'referral' widget type to dashboard configuration
- Fix drizzle.config.ts to include 'referrals' schema filter
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- QuickAddTask: Add glass-morphism pill design with date, priority,
and project pickers. Auto-focus on mount, fixed position on mobile
above navigation bar with dropdowns opening upward
- TaskItem: Redesign with pill-shaped glass-morphism style, matching
the navigation components. Includes hover effects, priority dot,
and inline meta information
- TaskList: Remove redundant spacing since TaskItem has its own margin
- New tasks now default to today's date
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace custom settings implementations with GlobalSettingsSection
- Add appId prop to all GlobalSettingsSection instances
- Remove duplicate local theme/language controls
- Standardize settings across Chat, Picture, and Manacore apps
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add extensive documentation for staging deployment issues:
- Lazy client initialization pattern for runtime URLs
- PostgreSQL ALTER TABLE USING clause requirement
- Debugging checklist for common issues (API, CORS, 500, 401)
- Summary table of common mistakes and prevention
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add documentation explaining the correct tag format for mana-core-auth
deployments. Using `auth-staging-*` instead of `mana-core-auth-staging-*`
causes the CD workflow to fail.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add console.log statements to JwtAuthGuard to diagnose
401 errors on /api/v1/settings endpoint.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Documents common issues encountered during staging deployments:
- Runtime env injection for SvelteKit (import.meta.env vs window)
- CORS configuration for cross-app API calls
- CD workflow version tag handling
- Database creation for new backends
- Better Auth user ID format (text vs uuid)
Includes quick debugging commands and port reference.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Allow manacore-web (port 5173) to call todo-backend, calendar-backend,
and clock-backend APIs by adding it to their CORS_ORIGINS.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- manacore-web: Update todo, calendar, contacts service files to use
runtime URLs from window instead of import.meta.env (baked at build time)
- manacore-web: Add backend URL env vars to docker-compose.staging.yml
- manacore-web: Fix fallback ports (todo: 3017→3018, calendar: 3014→3016)
- todo-web: Update API client to use runtime URL from window
This enables Docker containers to use runtime-injected URLs instead of
build-time environment variables.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Same fix as todo, calendar, clock - uses hooks.server.ts to inject
PUBLIC_MANA_CORE_AUTH_URL_CLIENT at runtime for Docker deployments.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added CORS origins for all staging web apps:
- manacore-web: 5173
- calendar-web: 5186
- clock-web: 5187
- todo-web: 5188
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The CD workflow was pulling the correct versioned image but docker-compose
was using the default 'latest' tag because version variables weren't being
set. Now the workflow:
1. Computes the correct version variable name (e.g., TODO_WEB_VERSION)
2. Updates the .env file on the staging server with the version
3. docker-compose reads from .env and uses the correct image tag
4. Verifies the correct image is running after deployment
This fixes deployments where the container would keep running an old
image even after a new version was pushed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive guide in .claude/guidelines/sveltekit-web.md about
build-time vs runtime environment variables for Docker deployments
- Document the correct hooks.server.ts + window injection pattern
- Add Problem 9 to TROUBLESHOOTING.md for hardcoded localhost URLs
- List which apps are fixed vs need fixing
- Add checklist for fixing new apps
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
All three apps were hardcoding localhost:3001 for auth, which broke
staging deployments. Now uses hooks.server.ts to inject the correct
PUBLIC_MANA_CORE_AUTH_URL_CLIENT at runtime (same pattern as chat-web).
Changes:
- Add hooks.server.ts to todo, calendar, clock web apps
- Update auth.svelte.ts to use window.__PUBLIC_MANA_CORE_AUTH_URL__
- Update user-settings.svelte.ts to use runtime URL
- Fix feedback services to use runtime URL
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The production stage was copying node_modules to /app, but pnpm creates
symlinks pointing to ../../../../../node_modules/.pnpm/ (relative to the
app's node_modules location). When the directory structure changed, these
symlinks broke, causing "Cannot find package" errors.
Fix:
- Keep same directory structure in production (/app/apps/*/apps/web)
- Copy the root .pnpm store that symlinks point to
- Copy the app's node_modules which contains the symlinks
Affected apps: todo, manacore, chat, calendar, clock
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>