Commit graph

64 commits

Author SHA1 Message Date
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
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
d41d060bb3 Merge branch 'dev-1' into dev 2025-12-05 17:57:26 +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
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
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
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
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
Wuesteon
5ea7767833 🐛 fix(chat-backend): add missing shared-nestjs-auth package to Dockerfile
- Copy packages/shared-nestjs-auth in build stage
- Build shared-nestjs-auth before backend
- Resolves TS2307 errors in Docker build CI

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 01:16:02 +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
482509a574 🐛 fix(theme): add ShadCN-style CSS variable aliases for shared components
- Add aliases without color- prefix (--background, --foreground, --primary, etc.)
- Fix Mana/Subscription page styling across all apps
- Remove conflicting legacy aliases from contacts app.css
- Update contacts mana page to use toast instead of alert

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:20:49 +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
fb9945c0f7 🔧 fix(chat): update schema for Better Auth nanoid user IDs
- Change userId columns from uuid to text to support Better Auth's nanoid format
- Update conversations, spaces, space_members, templates, usage_logs schemas
- Fix web API endpoint path from /api to /api/v1

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 14:40:02 +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
4cc1ad2c92 🔧 chore: fix turbo infinite recursion and update dependencies
- Remove recursive `turbo run type-check` from parent packages (chat, zitare, voxel-lava)
- Increase turbo concurrency from 2 to 5
- Add documentation for turbo anti-pattern in CLAUDE.md
- Skip type-check temporarily for apps with pending migrations
- Update picture mobile stores to use camelCase API response properties
- Add shared-nestjs-auth dependency to chat and picture backends
- Clean up unused design-token files from picture package
- Update shared-landing-ui components and feedback service config
2025-12-02 02:43: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
Wuesteon
5b0b3095ff 🔒️ feat(auth): centralize JWT validation and add deployment docs
- Migrate Chat, Picture, Presi, Zitare backends to shared auth guards
- Remove duplicate local JWT guards and decorators
- Add CD staging workflow for tagged releases
- Add comprehensive auth architecture documentation
- Add Hetzner deployment and Docker setup guides
- Add environment configuration audit docs
- Update env generation scripts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 20:44:45 +01:00
Wuesteon
8a43bbfc25 🔀 merge: auth/complete branch with Better Auth implementation
Merged auth/complete into main with resolved conflicts:
- Kept Better Auth system (EdDSA JWT via JWKS)
- Removed all Coolify references
- Added dev:auth and dev:chat:full scripts for auth development
- Combined zitare scripts from main with auth scripts
- Exported both feedback.schema and organizations.schema

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:25:38 +01:00
Wuesteon
08057138a6 🐛 fix(chat): use correct token storage key from shared-auth
Match localStorage key '@auth/appToken' used by @manacore/shared-auth
2025-12-01 15:19:09 +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
Wuesteon
2a002bf6be first auth impl 2025-12-01 13:30:58 +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
eab69c512c feat(i18n): add language picker and 5-language support to all auth screens
- Add svelte-i18n and @manacore/shared-i18n to Chat, Presi, Zitare
- Create LanguageSelector component for each app
- Add locale files for DE, EN, IT, FR, ES in all apps
- Update auth pages (login, register, forgot-password) to use shared translations
- Add headerControls snippet to RegisterPage and ForgotPasswordPage
- Export ZitareLogo and NutriPhiLogo from shared-branding

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:28:14 +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
c85cd4556c feat: improve chat UX and add optional auth for public feedback
- Add debounced search (200ms) in chat sidebar for better performance
- Add toast notifications for conversation actions (archive, restore, delete, pin)
- Add race condition protection when loading conversations
- Add OptionalAuthGuard for public feedback endpoint (unauthenticated access)
- Add backHref prop to PageHeader component for back navigation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:10:03 +01:00
Till-JS
0893ed7daa feat(chat): add toast notification system and docker AI config
- Add global Toast component with success/error/warning/info types
- Create toastStore using Svelte 5 runes for centralized notifications
- Add GOOGLE_GENAI_API_KEY to mana-core-auth docker-compose config

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:02:52 +01:00
Till-JS
4f06301fe3 feat(chat): add conversation pinning and date-based sections
- Add pin/unpin functionality with UI button and visual indicator
- Group conversations by date sections (Today, Yesterday, This Week, This Month, Older)
- Pinned conversations appear in separate "Angepinnt" section at top
- Refactor services and store to use shared types from @chat/types

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:01:48 +01:00
Till-JS
819e4c9a2f feat(feedback): add centralized feedback system with AI-generated titles
- Add shared-feedback-types package with TypeScript types
- Add shared-feedback-service package with factory function
- Add shared-feedback-ui package with Svelte 5 components
- Add feedback module to mana-core-auth backend
- Add AI service using Gemini 2.0 Flash for title/category generation
- Add database schema and migration for feedback tables
- Integrate feedback page into Chat web app
- Add CORS support for X-App-Id header
- Add COMMANDS.md documentation for all dev commands

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:46:37 +01:00
Till-JS
05fe8ca5b6 feat(chat): add auto title generation, inline renaming, and styled delete modal
- Fix missing conversationsStore import for auto title generation
- Make model ID dynamic in generateTitle() with error handling and fallback
- Add inline editing for manual conversation renaming in sidebar
- Add updateConversationTitle API endpoint and store method
- Replace browser confirm() with styled ConfirmationModal for delete
- Update Modal and ConfirmationModal with glassmorphism styling
- Add DEV_BYPASS_AUTH and GOOGLE_GENAI_API_KEY to env generation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:43:41 +01:00
Till-JS
2dc289c595 feat(chat): add shared profile UI package and integrate into navigation
- Create @manacore/shared-profile-ui package with ProfilePage component
- Add glassmorphism-styled profile page with user info and actions
- Move profile link into user dropdown menu as first item
- Move layout toggle control to end of navigation
- Fix pill navigation styling in sidebar mode (full-width pills, proper spacing)
- Fix segmented control button hover states with proper border-radius
- Fix theme mode selector blur styling in dropdown

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 21:40:47 +01:00
Till-JS
0467ac3891 fix(chat): align frontend types with backend camelCase and redesign message bubbles
- Update all frontend types and components to use camelCase properties matching backend API
- Redesign MessageBubble with gradient avatars, shadows, and modern speech bubble styling
- Update TypingIndicator to match new bubble design with Robot avatar
- Fix marked.js undefined input error by ensuring proper property access

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:04:19 +01:00
Till-JS
a3247086eb feat(subscription-ui): redesign with glass morphism and responsive layout
- Update all subscription components with glass morphism styling
- Add backdrop blur, subtle borders, and proper dark mode support
- Fix responsive layout issues with proper min-width and overflow handling
- Position badges inside cards to prevent clipping
- Add responsive font sizes for mobile displays
- Simplify mana page wrapper in chat app

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:04:04 +01:00
Till-JS
f2c7950875 fix(chat): add shared-subscription-ui dependency for mana page
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:47:08 +01:00
Till-JS
7819c9c265 feat(chat): redesign chat UI with glassmorphism styling
- Redesign chat homepage with glass-styled empty state and suggestion pills
- Add floating search bar with backdrop blur
- Style conversation list items as glass cards
- Add consistent borders (border-black/10 dark:border-white/20)
- Remove hard borders, use subtle glassmorphism effects
- Add hover effects with shadow and lift animations
- Update model/template selector with glass pill styling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:45:42 +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
e28a1aae0b docs(chat): update CLAUDE.md with Gemini AI models and configuration
- Changed AI provider from Azure OpenAI to Google Gemini
- Updated model list with Gemini 2.5 Flash (default), 2.0 Flash-Lite, and 2.5 Pro
- Updated backend environment variables for Gemini API
- Changed default port from 3001 to 3002

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:29:10 +01:00
Till-JS
9b80d13740 fix(chat): update templates page to use Gemini 2.5 Flash as default model
Changed fallback model ID from GPT-4o-Mini to Gemini 2.5 Flash for template-based conversations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:28:38 +01:00
Till-JS
90c696caf3 fix(chat): add PATCH to CORS and use Gemini for title generation
- Add PATCH method to CORS allowed methods
- Change title generation to use Gemini 2.5 Flash instead of GPT-5

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:20:24 +01:00
Till-JS
24eafc5430 fix(chat-web): select default model instead of first model
- Update chat store to find model with isDefault: true
- Fix model selection in chat page and spaces page
- Falls back to first model if no default is set

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:18:53 +01:00
Till-JS
35a7b0b33f chore(chat): deactivate Azure models, only show Gemini in dropdown
Azure/GPT-5 models are disabled (isActive: false) since no deployments exist.
Only Gemini models are now shown in the model selection dropdown.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:15:59 +01:00
Till-JS
0cd5ad749d refactor(shared-ui): use PillDropdown for app switcher
- Replace custom PillAppDropdown with standard PillDropdown
- Add appItemsToDropdownItems helper function
- Use grid icon for app switcher
- Consistent styling with theme dropdown
- Delete unused PillAppDropdown component

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:15:00 +01:00
Till-JS
f8d8faab90 fix(chat): use correct Gemini model names
- Change gemini-2.5-flash-preview-05-20 to gemini-2.5-flash
- Change gemini-2.5-flash-lite-preview to gemini-2.0-flash-lite
- Change gemini-2.5-pro-preview-06-05 to gemini-2.5-pro

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:13:34 +01:00
Till-JS
9e90cea521 feat(chat): add app switcher to PillNavigation
- Import getPillAppItems from shared-branding
- Enable showAppSwitcher with all Mana apps
- Current app (chat) is marked in dropdown

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:12:57 +01:00
Till-JS
b68e0152da feat(chat): add settings page and improve chat UI components
- Add settings page to chat web and mobile apps
- Add ChatLayout component for consistent chat structure
- Update ChatInput component styling
- Improve chat page layout and navigation
- Update profile page

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:24:02 +01:00
Till-JS
95bba8ef6e feat(chat): add Google Gemini API support with Flash as default model
- Add @google/generative-ai package for Gemini integration
- Update ChatService to support both Azure OpenAI and Gemini providers
- Add Gemini 2.5 Flash, Flash-Lite, and Pro models to seed
- Set Gemini 2.5 Flash as the default model for fast responses
- Add DEV_BYPASS_AUTH mode for local development
- Make /api/models endpoint public (no auth required)
- Add port 5174 to CORS allowed origins
- Add isDefault field to models schema

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:22:58 +01:00