Commit graph

47 commits

Author SHA1 Message Date
Wuesteon
6239cc7749 fix: use $env/dynamic/private for runtime env vars in SvelteKit hooks
- 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>
2025-12-10 02:20:49 +01:00
Till-JS
b148a72e36 feat(referral): integrate referral system frontend
- 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>
2025-12-09 13:01:43 +01:00
Till-JS
fb76cdc63d fix(settings): unify global settings across all web apps
- 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>
2025-12-09 12:37:49 +01:00
Wuesteon
4398fbc29b fix(manacore-web,todo-web): use runtime URLs for backend API services
- 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>
2025-12-08 22:03:12 +01:00
Wuesteon
7caeea4abd fix(manacore-web): add runtime env injection for auth URLs
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>
2025-12-08 21:47:02 +01:00
Wuesteon
fd1c0ee6a2 fix(docker): preserve pnpm symlink structure in web Dockerfiles
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>
2025-12-08 19:38:49 +01:00
Wuesteon
75d9d18e0d fix(web): copy node_modules from builder instead of npm install
npm doesn't understand pnpm's workspace:* protocol. Copy node_modules
from the builder stage to get all dependencies including workspace packages.

Affected: todo, manacore, chat, calendar, clock web apps.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 19:24:52 +01:00
Wuesteon
ef44c065f9 fix(web): remove silent npm install failures in all web Dockerfiles
The production stage was silently ignoring npm install failures with
`|| true`, causing dependencies to be missing at runtime.

Affected: clock, manacore, chat, calendar web apps.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 18:59:08 +01:00
Wuesteon
ee091c4b10 ♻️ refactor: migrate manacore-web from Supabase to mana-core-auth
- Add password reset functionality to mana-core-auth using Better Auth
- Add forgot-password and reset-password endpoints with DTOs
- Update shared-auth package with resetPassword method and endpoint
- Update manacore-web auth store with resetPassword method
- Refactor reset-password pages to use mana-core-auth instead of Supabase
- Remove Supabase dependencies from manacore-web package.json
- Remove Supabase server code (hooks.server.ts, supabase.ts, API routes)
- Update Dockerfile to remove shared-supabase dependency

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 17:04:35 +01:00
Wuesteon
48c5cb48f7 🐛 fix: add MIDDLEWARE_URL to manacore-web Dockerfile
Add MIDDLEWARE_URL as build argument and environment variable
for SvelteKit's $env/static/private at build time.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:37:18 +01:00
Wuesteon
f0d57c1922 🐛 fix: switch web apps to adapter-node for Docker builds
- Change calendar-web, clock-web, todo-web, manacore-web from adapter-auto/netlify to adapter-node
- This ensures the 'build' directory is created for Docker production stage
- adapter-node outputs to 'build' folder which Dockerfiles expect

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:30:04 +01:00
Wuesteon
63a5674c0b 🐛 fix: add build args for SvelteKit env vars in web Dockerfiles
SvelteKit apps using $env/static/public require environment variables
at build time. Added ARG/ENV directives with defaults for Docker builds.
2025-12-08 16:15:42 +01:00
Wuesteon
5e0b5a8e7a 🚀 ci: add Docker deployment for Manacore, Todo, Calendar, and Clock apps
Add complete Docker deployment infrastructure for 4 new applications:
- Dockerfiles for backend (NestJS) and web (SvelteKit) apps
- docker-entrypoint.sh scripts with PostgreSQL wait and schema push
- Updated docker-compose.staging.yml with 7 new services
- Updated CI/CD workflows with build matrix and health checks
2025-12-08 16:04:50 +01:00
Wuesteon
bb4e12c36e 🐛 fix: resolve auth issues in Manacore, Calendar, and Clock apps
- Manacore: fix import path for authStore (authStore.svelte → auth.svelte)
- Calendar: simplify root layout by moving PillNavigation to (app) layout
- Clock: update login page to use correct shared-auth-ui props (onSignIn, logo, goto)
- Add ClockLogo component to shared-branding package
2025-12-08 15:51:57 +01:00
Till-JS
6f8585e9bb fix(manacore): improve API response handling and auth flow
- Fix calendar/todo API services to handle wrapped response format
  ({ events: [...] }, { tasks: [...] }, etc.)
- Add null-safety guards in dashboard widgets for data arrays
- Simplify default dashboard to 3 widgets: Clock, Tasks, Calendar
- Fix auth layout initialization to prevent redirect race conditions
- Update auth store import path in dashboard page

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 16:10:51 +01:00
Till-JS
a6cc0b83aa fix(manacore): auth flow and dashboard widget API fixes
Auth fixes:
- Update fetchInterceptor skip patterns for ManaCore auth endpoints
- Fix URL matching to compare full origins instead of partial matches
- Update token manager state after successful login
- Remove Supabase session dependency from layouts
- Use authStore for auth state in route layouts

Dashboard fixes:
- Add network error detection in base-client to prevent infinite retries
- Update all 9 dashboard widgets to not retry on service unavailable
- Add /api/v1 prefix to all backend service URLs (chat, calendar, contacts, todo, zitare, picture, manadeck)

Commands:
- Add dev:manacore:backends to start all 9 dashboard backends
- Add dev:manacore:full to start web + all backends together
- Update COMMANDS.md with new commands and backend port table

Auth service:
- Fix TypeScript error: crossApp → cross_app in referrals schema

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 14:44:58 +01:00
Wuesteon
d41d060bb3 Merge branch 'dev-1' into dev 2025-12-05 17:57:26 +01:00
Till-JS
fca93a9d35 fix(manacore): update app layout
Minor updates to manacore app layout.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 04:20:27 +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
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
9c47119535 Fix wrong type
import, make auth and chat work
2025-12-04 23:25:25 +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
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
Wuesteon
4900106021 🎨 style: fix Prettier formatting issues
Fixed formatting in 21 files across calendar, contacts, manacore, manadeck,
picture, storage apps and shared-ui package.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 01:05:10 +01:00
Wuesteon
843cf1e678 fixes 2025-12-04 00:51:40 +01:00
Wuesteon
e9caa4a217 fix lint 2025-12-04 00:32:13 +01:00
Wuesteon
16cb8e753b improve code quality 2025-12-03 23:42:37 +01:00
Till-JS
0e5d923faf feat(auth): add centralized user settings synced across all apps
- Add settings module to mana-core-auth with REST API endpoints
- Create user_settings table with globalSettings and appOverrides (JSONB)
- Add createUserSettingsStore() factory in shared-theme package
- Integrate user settings in all app layouts (calendar, chat, contacts, etc.)
- Support for nav position, theme, locale settings with per-app overrides
- Optimistic updates with localStorage caching for offline support
- Add comprehensive documentation in docs/USER_SETTINGS.md

API Endpoints:
- GET /api/v1/settings - Get all user settings
- PATCH /api/v1/settings/global - Update global settings
- PATCH /api/v1/settings/app/:appId - Set app override
- DELETE /api/v1/settings/app/:appId - Remove app override

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:09:47 +01:00
Till-JS
ef8fd6a101 feat(landing): add Cloudflare Pages deployment setup
- Add wrangler.toml for all 5 landing pages (chat, picture, manacore, manadeck, zitare)
- Add wrangler CLI as dev dependency
- Add deploy scripts: pnpm deploy:landing:{project} and pnpm deploy:landing:all
- Add Cloudflare helper scripts: cf:login, cf:projects:list, cf:projects:create
- Document Cloudflare Pages setup in CLAUDE.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 12:35:54 +01:00
Wuesteon
3f57b842d8 fix(ci): fix test-config and upgrade vitest to v4
- Remove deprecated watchExclude from vitest configs
- Upgrade vitest to 4.x and @vitest/coverage-v8 to match
- Upgrade @vitest/ui to 4.x

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:37:47 +01:00
Wuesteon
0ebfde0851 fix(ci): build shared packages before tests and fix formatting
- Add build:packages step to all test.yml jobs (fixes @manacore/shared-nestjs-auth not found)
- Handle missing coverage artifacts gracefully in test-coverage.yml
- Update .prettierignore to exclude apps-archived/ and problematic files
- Format all source files to pass CI checks

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:15:00 +01:00
Till-JS
4e4db4612c feat(apps): add unified Apps page and PillNavigation to all web apps
- Add AppsPage component to shared-ui for displaying all Mana apps
- Add allAppsHref prop to PillNavigation with "Alle Apps" link in dropdown
- Integrate PillNavigation in archived apps (maerchenzauber, news, uload, wisekeep)
- Add /apps route to all web apps (active and archived)
- Replace custom sidebars/headers with unified PillNavigation

Apps updated:
- Active: chat, manacore, manadeck, picture, presi, zitare
- Archived: maerchenzauber, memoro, news, nutriphi, uload, wisekeep

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 14:48:00 +01:00
Till-JS
9a29a8e1ed feat: improve language switcher integration across all web apps
- Add language selector to PillNavigation in all apps
- Update LanguageSelector components to use shared-i18n utils
- Simplify AppSlider components
- Add getLanguageDropdownItems and getCurrentLanguageLabel utils

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:46:13 +01:00
Till-JS
6bb8285349 refactor(apps): unify AppSlider to use centralized MANA_APPS config
- Update ManaCore, ManaDeck, and Picture AppSlider components
- Replace hardcoded app lists with getActiveManaApps() from shared-branding
- Use APP_STATUS_LABELS and APP_SLIDER_LABELS for translations
- Archived apps (Memoro, Märchenzauber, WiseKeep, Nutriphi) now auto-filtered
- All 5 apps with AppSlider now use the same centralized config

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:46:13 +01:00
Till-JS
74b824d0a5 fix(manacore): use manaHref for proper Mana icon in user dropdown
Move Mana link from navItems to manaHref prop for consistent display
with the special Mana icon (water drop) in the user dropdown, matching
the Chat app pattern.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:40:54 +01:00
Till-JS
b970473a25 feat(manacore): add Mana subscription page to navigation
- Improve /mana page with German labels and styling
- Add Mana to nav with fire icon (between Dashboard and Credits)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:37:16 +01:00
Till-JS
2d17b720f8 feat(theme): add complete theme support to all web apps
- ManaCore: add /themes page, use bg-background, add themeMode props
- ManaDeck: fix bg-gray to bg-background, add themeMode/onThemeModeChange
- Picture: add themeMode/onThemeModeChange props
- Zitare: add themeMode/onThemeModeChange props
- Presi: add themeMode/onThemeModeChange props

All apps now support:
- Theme variant dropdown (Lume, Ocean, Nature, Ember)
- Light/Dark/System mode selector
- Dynamic background colors via CSS variables

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:36:47 +01:00
Till-JS
52d43b25e6 fix(manacore): use correct nav icons for Credits and Feedback
- Credits: sparkles → creditCard (credit card icon)
- Feedback: message-square → chat (chat bubble icon)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:34:58 +01:00
Till-JS
8965328937 feat(manacore): add credits management and improve dashboard
- Add credits API service with balance, transactions, packages support
- Create Credits page with overview, transaction history, and package store
- Improve Dashboard with real-time credit data and recent transactions
- Update Settings page with credits overview and German localization
- Add Credits and Feedback to navigation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:29:25 +01:00
Till-JS
9432a73a1f feat: integrate shared PageHeader and ProfilePage across all web apps
- Add backHref prop to PageHeader component for back navigation
- Integrate PageHeader in Chat app (archive, documents, spaces, templates)
- Integrate PageHeader in Picture app (board, generate, profile, tags, upload)
- Integrate PageHeader in Manacore app (dashboard, organizations, teams)
- Integrate PageHeader in Presi app (home, profile)
- Integrate PageHeader in Zitare app (authors, lists)
- Update Picture, Manadeck, Presi profiles to use shared ProfilePage
- Create new profile pages for Manacore and Zitare using shared ProfilePage
- Add profile navigation links to Manacore and Zitare
- Add Mana subscription pages to Presi and Zitare
- Fix shared-profile-ui tsconfig.json (remove invalid extends)
- Add @manacore/shared-profile-ui dependency to all web apps

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:06:29 +01:00
Till-JS
353cf6adb2 feat: rename subscription routes to /mana across all apps
- Add /mana route to chat web app with SubscriptionPage
- Add manaHref prop to PillNavigation for user dropdown link
- Add mana icon to PillDropdown component
- Rename /subscription to /mana in picture, manacore, and manadeck apps
- Update navigation items to use mana icon and label

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:42:32 +01:00
Till-JS
7deb5b9a1e feat(shared-ui): add reusable settings components with glass styling
- Add SettingsPage, SettingsSection, SettingsCard components
- Add SettingsRow, SettingsToggle for interactive elements
- Add SettingsDangerZone, SettingsDangerButton for destructive actions
- Apply glass morphism styling matching PillNavigation
- Migrate settings pages in manacore, presi, zitare apps
- Migrate archived apps: maerchenzauber, memoro, nutriphi, uload

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:22:12 +01:00
Till-JS
655da23d14 fix(presi): resolve CORS issues and add strictPort to all web apps
- Add port 5180 to CORS_ORIGINS in .env.development
- Add port 5178 to Presi backend CORS config
- Fix Presi API client to use /api prefix
- Add strictPort: true to all web app vite configs to prevent port switching:
  - manacore: 5173
  - chat: 5174
  - picture: 5175
  - manadeck: 5176
  - zitare: 5177
  - presi: 5178
  - voxel-lava: 5180

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 06:58:00 +01:00
Till-JS
0acd7c3e7e feat(shared-branding): add global app icons and centralized app config
- Add app-icons.ts with SVG data URLs for all Manacore apps
- Add mana-apps.ts with centralized app configuration (de/en translations)
- Update AppSlider components across all apps to use global APP_ICONS
- Use real SVGs for memoro, manacore, mana, moodlit, maerchenzauber
- Placeholder icons for apps without original SVGs (chat, presi, manadeck, picture, zitare, wisekeep)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:54:50 +01:00
Wuesteon
d36b321d9d style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write
  - TypeScript/JavaScript files
  - Svelte components
  - Astro pages
  - JSON configs
  - Markdown docs

  13 files still need manual review (Astro JSX comments)
2025-11-27 18:33:16 +01:00
Wuesteon
ff80aeec1f refactor: restructure
monorepo with apps/ and services/
  directories
2025-11-26 03:03:24 +01:00