Commit graph

1620 commits

Author SHA1 Message Date
Till JS
ac3269bb3d chore: update pnpm-lock.yaml
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:26:05 +01:00
Till JS
8537d7c691 test(calendar): add tests for sync API, recurrence store, and external calendars
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:25:38 +01:00
Till JS
7d2eb335b0 feat(infra): add Picture/Storage to Caddyfile and Windows GPU server setup plan
Add reverse proxy entries for picture.mana.how and storage.mana.how to
Caddyfile.production. Create implementation plan and setup guide for
Windows GPU server as dedicated AI/ML node alongside Mac Mini.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:25:33 +01:00
Till JS
7641035a79 docs(storage): update audit score 78 → 82 with versioning and rate limiting
- Backend: 85 → 88 (versioning endpoints, rate limiting)
- Frontend: 80 → 82 (FileVersionsModal, upload new versions)
- Testing: 75 → 78 (7 version tests, total 205)
- Security: 72 → 78 (rate limiting: 100 req/min global, 20 for uploads)
- Overall: 78 → 82 (solid production status)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:24:35 +01:00
Till JS
05a595d6cf feat(storage): add file version history modal with upload support
FileVersionsModal:
- Shows version history sorted by version number
- Upload new version with optional comment
- File size and date formatting for each version
- Loading state while fetching versions
- Full ARIA accessibility (dialog, modal)

Integration:
- "Versionen" button added to FilePreviewModal action bar
- Opens FileVersionsModal overlay from file preview

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:23:57 +01:00
Till JS
9085dddfad feat(storage): add rate limiting, file versioning endpoints, and version tests
Rate Limiting:
- Add @nestjs/throttler with 100 req/min global limit
- Stricter limits for uploads: 20 req/min single, 10 req/min multi

File Versioning (Backend):
- GET /api/v1/files/:id/versions — list version history
- POST /api/v1/files/:id/versions — upload new version with optional comment
- Updates file metadata (size, name, storageKey) on new version
- 7 new tests for versioning service and controller

API Client (Frontend):
- Add FileVersion interface
- Add filesApi.getVersions() and filesApi.uploadVersion()

Total tests: 205 (140 backend + 65 web)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:23:28 +01:00
Till JS
c7b105bc00 docs: add devlog for 2026-03-21 — WhoPixels refactor, Storage animations, Picture hardening
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:22:20 +01:00
Till JS
190b64c7c9 fix(glitchtip): use python3 for health check — wget not in image
The GlitchTip Docker image doesn't include wget or curl, causing 692+
consecutive health check failures. Switch to python3 urllib which is
available in the image.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:18:12 +01:00
Till JS
b735f146bf feat(picture): PWA support, API timeouts, batch fix, credit/history endpoints
PWA:
- Switch to createOfflineFirstPWAConfig for offline-first PWA support
- Configure with Picture branding (purple theme, German metadata)

Replicate API timeouts:
- Add AbortController-based timeouts to all 7 fetch calls
- Create prediction: 30s, poll status: 60s, cancel: 10s, image fetch: 30s
- Polling timeouts are non-fatal (logged as warning, retry continues)

Batch service fix:
- Join images table via leftJoin to return actual imageUrl
- Previously always returned null (TODO comment)

New endpoints:
- GET /api/v1/generate/credits — returns credit balance, earned, spent
- GET /api/v1/generate/history — paginated generation history with images

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:17:44 +01:00
Till JS
512627b32a docs(storage): update audit score 75 → 78 with animations and integration tests
- Testing: 72 → 75 (39 integration tests, total 198)
- Frontend: 78 → 80 (staggered animations, drag feedback)
- Deployment: 55 → 58 (migrated to nestjs-base Docker image)
- UX: 72 → 75 (animations with prefers-reduced-motion support)
- Overall: 75 → 78

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 15:30:50 +01:00
Till JS
2ffd2596c4 feat(storage): add animations, drag feedback, integration tests, and optimize Dockerfile
Animations:
- Staggered fade-slide-in animation on FileGrid items (30ms delay per item)
- Drag feedback: dragged items show opacity 0.5 + scale 0.95
- Drop target: folder scales up 1.02 on hover with green dashed border
- Respects prefers-reduced-motion

Integration Tests (39 new web tests, total 198):
- client-integration.test.ts: upload flow, download with fetch mock,
  folder contents, search encoding, share creation, trash restore,
  bulk operations, error propagation, tag operations, favorites

Docker:
- Migrate backend Dockerfile to nestjs-base:local shared builder
- Prune devDependencies and test files in production image

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 15:30:10 +01:00
Till JS
9dc5570ec0 feat(whopixels): update Phaser from 3.55.2 to 3.80.1
Migrate particle API from deprecated ParticleEmitterManager
(add.particles + createEmitter) to new Phaser 3.60+ API
(add.particles with direct emitter config). All 21 improvements
now complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 15:29:24 +01:00
Till JS
c26a48e16a fix(picture): resolve critical issues — dead stores, type-check, test coverage
Store cleanup:
- Remove 12 dead duplicate .svelte.ts store files (1,306 lines of unused code)
- All components use the .ts writable stores, runes versions were never imported

Type-check re-enabled:
- Fix Modal prop mismatch: open→visible, size→maxWidth in ImagePickerModal and board page
- Fix __BUILD_TIME__/__BUILD_HASH__ declarations in app.d.ts (declare global block)
- Fix vite.config.ts plugin type incompatibility with `as any` casts
- Re-enable type-check script (was skipped since shared-ui component fixes)

Test coverage:
- Add generate.service.spec.ts with 35 tests covering:
  checkGenerationAccess, generateImage, checkStatus, cancelGeneration, handleWebhook
- Tests cover credit logic, sync/async modes, ownership checks, error handling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 15:27:58 +01:00
Till JS
c0c11c325a feat(whopixels): major refactor with 20 improvements across architecture, gameplay, UX, security, and i18n
Split monolithic RPGScene.js (1210 lines) into modular manager classes:
- WorldManager, PlayerManager, NPCManager, ChatUI, StorageManager,
  SoundManager, TouchControls

Key improvements:
- Constants config (GAME_CONFIG) replacing all magic numbers
- JSDoc types + jsconfig.json for IDE type-safety
- LocalStorage persistence for progress, stats, and custom avatars
- Synthesized sound effects via Web Audio API
- 26 NPCs (up from 10) in 3 categories
- Stats/leaderboard in main menu
- Pixel editor avatar integration with RPG game
- Mobile touch controls (virtual joystick + interact button)
- Chat UI with typing indicator and conversation history
- Interactive tutorial overlay for first-time players
- Floating question mark over NPCs in range
- Server hardened: rate limiting, input sanitization, CORS restrictions,
  API timeouts, conversation history cap
- Particle effect object pooling
- i18n framework with DE/EN and language switcher

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 15:26:40 +01:00
Till JS
161f10596f docs(storage): update audit score 73 → 75 with drag & drop and E2E tests
- Testing: 65 → 72 (Playwright E2E tests added)
- Frontend: 75 → 78 (drag & drop file/folder moving)
- UX: 67 → 72 (drag & drop with visual feedback)
- Overall: 73 → 75 (production status confirmed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:17:22 +01:00
Till JS
4bbe4a27d1 feat(storage): add drag & drop file moving and Playwright E2E tests
Drag & Drop:
- FileCard: draggable with type/id data transfer
- FolderCard: draggable + drop target with visual feedback (dashed green border)
- FileGrid: onMoveToFolder callback for drag-to-folder operations
- filesStore: moveFile() and moveFolder() methods via API
- Wired up in /files and /files/[folderId] pages with toast notifications

E2E Tests (Playwright):
- playwright.config.ts with multi-browser support
- auth.spec.ts: login page rendering, invalid credentials, redirect
- files.spec.ts: file list UI, view toggle, new folder modal, empty state
- navigation.spec.ts: nav items, routing, page headings
- search.spec.ts: search input, button state, initial state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:16:29 +01:00
Till JS
a12cbeb8bb docs(storage): update audit score 70 → 73, status beta → production
- Testing: 50 → 65 (added 50 controller tests, total 159)
- Deployment: 45 → 55 (Caddy entries for storage.mana.how)
- UX: 62 → 67 (PWA full preset, shortcuts, offline page)
- Overall: 70 → 73 — now meets production threshold (71+)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:48:54 +01:00
Till JS
403b1c7b87 feat(storage): add controller tests, Caddy config, and PWA improvements
Controller tests (50 tests, all passing):
- FileController: 12 tests (CRUD, upload, download with headers/URL mode)
- FolderController: 8 tests (CRUD, move, favorite)
- TrashController: 6 tests (restore file/folder, permanent delete, empty)
- SearchController: 6 tests (search, empty query, favorites)
- ShareController: 7 tests (CRUD, expiresInDays conversion, public token)
- TagController: 7 tests (CRUD with optional color)

Total test count now: 159 (133 backend + 26 web)

Deployment:
- Add Caddy reverse proxy entries for storage.mana.how and storage-api.mana.how

PWA:
- Upgrade to 'full' preset for better offline caching (fonts, external resources)
- Add app shortcuts: Dateien, Suche, Favoriten
- Improve offline page with links to cached pages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:48:11 +01:00
Till JS
fc5dfe2f0f feat: show build date/time on login screen across all apps
- Add BUILD_TIME and BUILD_HASH exports to all version.ts files
- Add getBuildDefines() to all vite.config.ts for compile-time injection
- Add buildTime prop to shared LoginPage component
- Display formatted date/time next to version number (e.g. "v1.0.0 · 21.03.2026 10:30")
- Add app.d.ts type declarations for __BUILD_TIME__ and __BUILD_HASH__

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:40:57 +01:00
Till JS
a6a5265332 docs(storage): update audit score 55 → 70 after tests, preview, and a11y improvements
- Testing: 0 → 50 (109 tests: 83 backend Jest + 26 web Vitest)
- Frontend: 70 → 75 (FilePreviewModal, ARIA improvements)
- UX: 55 → 62 (SEO meta tags, accessibility, semantic HTML)
- Deployment: 42 → 45 (Dockerfile port fix)
- Overall: 55 → 70 (beta status maintained)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:39:43 +01:00
Till JS
62a13d2f45 fix(contacts): stop pruning 'docs' dirs — breaks googleapis sub-modules
The Dockerfile pruning step deleted all 'docs' directories in node_modules,
including googleapis/build/src/apis/docs/ which is the Google Docs API
sub-module. This caused 'Cannot find module ./docs' crash loop on startup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:35:17 +01:00
Till JS
ec8847cee3 fix(search): correct health check URL to /api/v1/health
The NestJS app uses a global /api/v1 prefix, but the health check was
hitting /health causing 5600+ consecutive failures and unhealthy status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:32:08 +01:00
Till JS
a17a3a7f58 feat(storage): add tests, file preview modal, and fix Dockerfile ports
Tests (109 total, all passing):
- Backend (Jest, 83 tests): file, folder, trash, search, share, tag services
- Web (Vitest, 26 tests): API client coverage for all endpoints
- Mock factories for File, Folder, Share, Tag entities

File Preview Modal:
- Image preview for image/* MIME types, file info display
- Action buttons: download, rename, share, favorite, delete
- Full ARIA accessibility, responsive, escape/click-outside close
- Integrated in /files, /files/[folderId], /favorites, /search pages

Dockerfiles:
- Fix incorrect port 3019 → 3016 in backend Dockerfile and web build arg

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:16:28 +01:00
Till JS
481a88d25a feat(todo): add onboarding wizard — default view, display mode, tips
3-step onboarding using shared-app-onboarding package:
1. Default view: Today (recommended), Inbox, or Kanban Board
2. Display mode: Normal (with details) or Compact (title + priority only)
3. Tips: quick-add syntax, @project #label shortcuts, focus mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:15:08 +01:00
Till JS
16fe3aa61e feat(contacts): add onboarding wizard — sort preference, import option, tips
3-step onboarding using shared-app-onboarding package (same as calendar):
1. Sort order: first name vs last name
2. Import: Google, vCard/CSV, or skip — navigates to import page on completion
3. Tips: self-contact card, quick input, focus mode, tags

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:31:38 +01:00
Till JS
78526f1d92 fix(storage): improve SEO, accessibility, and best practices for higher audit score
- Add meta description, Open Graph tags, theme-color, preconnect/dns-prefetch to app.html
- Add per-page meta descriptions (files, favorites, search, trash, shared, settings)
- Add ARIA attributes to all loading states (role="status", aria-live="polite")
- Add aria-label, aria-expanded, aria-haspopup to all menu buttons (FileCard, FolderCard, FileRow, FolderRow)
- Add role="menu" and role="menuitem" to all dropdown menus
- Add semantic table roles to FileList (role="table", role="columnheader", role="rowgroup")
- Add aria-label and progressbar ARIA to UploadZone
- Add role="img" with aria-label to emoji icons in trash
- Add aria-label to icon-only delete button in shared page
- Add aria-hidden to decorative SVGs and spinners
- Use type="search" with aria-label on search input
- Remove console.log statements from files, favorites, and search pages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:22:29 +01:00
Till JS
bbc5919448 fix(mukke): redirect root page to login instead of showing landing page
Replace the marketing landing page at / with an immediate redirect:
authenticated users go to /library, others go to /login. This matches
the behavior of other apps like calendar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:19:52 +01:00
Till JS
debd55ffcf feat(calendar): implement UnifiedBar — replace standalone bottom bars with layered system
Replaces individual QuickInputBar, DateStrip, DateStripFab, CalendarToolbar, and ViewsBar
with a single UnifiedBar component. Layers stack via flexbox, child positioning overridden
to relative. Overlay menu allows toggling layer visibility. View switcher integrated into
toolbar layer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:19:37 +01:00
Till JS
a336728e68 feat(calendar): add recurrence selector to quick event overlay
The RecurrenceSelector was already built but only available in the full
EventForm. Now it's integrated into the QuickEventOverlay so users can
set recurring events directly when creating via grid click.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:19:04 +01:00
Till JS
afa9f99705 feat(contacts): add "My Card" self-contact — auto-created on first load
Every user now gets their own contact card (like iOS "My Card") automatically
created on first API call, pre-filled with their email. The self-contact is
shown prominently at the top of the list with an "Ich/Me" badge, can be fully
edited, but cannot be deleted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:14:44 +01:00
Till JS
99091ecf9e docs+test: add audio format docs and shared-storage utils tests
- Document all supported audio formats in mukke CLAUDE.md with browser
  compatibility matrix and notes on formats needing transcoding
- Add utils.test.ts for shared-storage: MIME type mappings, audio
  extension validation, and AUDIO_EXTENSIONS completeness checks (19 tests)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:12:58 +01:00
Till JS
7a1ae1284c feat(mukke): support all common audio formats for upload and playback
Expand accepted audio formats beyond MP3/WAV/OGG to include FLAC, AAC,
M4A, AIFF, OPUS, WMA, WebM, ALAC, APE, WavPack, DSF, and DFF.
The HTML5 Audio player already handles whatever the browser supports.

Changes:
- BeatUploader: accept audio/* instead of hardcoded format list
- shared-storage: add MIME type mappings for all common audio formats

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:09:25 +01:00
Till JS
c3927c85f8 fix(calendar): use 1-hour default duration for grid click instead of 15 minutes
The click-to-create handler was using SNAP_INTERVAL_MINUTES (15) as the
initial event duration. Now uses DEFAULT_EVENT_DURATION_MINUTES (60) to
match the configured default. Drag behavior still uses snap interval.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:05:15 +01:00
Till JS
b51f18a910 feat(mukke): add right-click context menu to library songs
Uses the shared ContextMenu component from @manacore/shared-ui to provide
quick actions (play, edit metadata, open in editor, toggle favorite, delete)
on right-click in the song list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:05:12 +01:00
Till JS
4770e15499 fix(calendar): improve onboarding UX — clearer progress, better selection, apply preferences
- Replace thin progress bar with animated step dots
- Add checkmark icon and stronger highlight for selected options
- Remove redundant step emoji (duplicate of header)
- Hide "Zurück" button on first step instead of just opacity:0
- Remove timezone step (auto-detect is always correct, 4 options too limited)
- Replace unsupported "day" view with "agenda" in view options
- Wire onComplete to actually apply weekStart and defaultView to settingsStore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 11:00:28 +01:00
Till JS
8a0ab38958 chore: fix wallpaper-generator test script and update CLAUDE.md test count
- Replace vitest run with echo (no test files exist)
- Update Current State section: 25 → 128 test files,
  reflect actual CI/CD and pre-commit setup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 10:54:21 +01:00
Till JS
5b4da8913f feat(ci): add format check and tests to PR validation pipeline
- Add format:check step (prettier --check, hard fail)
- Make lint step a hard fail (remove || echo fallback)
- Add test step (soft fail for now — coverage is thin)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 10:51:11 +01:00
Till JS
683a4c5331 feat(docker): add shared NestJS builder base image
- Add docker/Dockerfile.nestjs-base with all shared packages pre-built
- Convert 6 backend Dockerfiles (chat, todo, calendar, clock, contacts,
  mukke) to inherit from nestjs-base:local
- Fix bugs: duplicate shared-nestjs-setup builds (mukke), unnecessary
  shared-error-tracking rebuild in production stage (chat, clock)
- CD pipeline builds base image before services when backends deploy
- Net reduction: 317 lines removed, 112 added (-205 lines)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 10:48:31 +01:00
Till JS
df2bf9ecb0 fix(deploy): fix image size measurement in deploy metrics
Use direct image name lookup (<service>:local) instead of
docker compose images --format which isn't supported.
Fallback via running container inspection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:13:03 +01:00
Till JS
1f9714d250 docs(devlog): add 2026-03-20 cross-app SSO & infrastructure fixes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:12:33 +01:00
Till JS
72ee82e516 docs(calendar): update complexity audit — all items resolved
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:11:55 +01:00
Till JS
3bace08b7a feat(calendar): add calendar sharing UI and service error boundaries
Calendar Sharing:
- Add shares store with full lifecycle (share, accept/decline, remove, permissions)
- Add missing API methods (getInvitations, getSharedWithMe)
- Create /settings/sharing page with:
  - Pending invitations section with accept/decline
  - "Shared with me" section
  - Per-calendar share management (expandable list, add/remove shares)
  - Share modal with email, permission selection
- Add link from main settings page

Error Boundaries:
- Create ServiceStatusBanner component for graceful degradation
- Integrate into main calendar page for Todo and Birthday services
- Shows warning when service unavailable with retry button
- Uses existing serviceAvailable flags from stores

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:11:15 +01:00
Till JS
9df908d838 refactor(calendar): simplify UnifiedBar and extract ViewCarousel gestures
UnifiedBar (633→559 LOC):
- Remove 3 duplicate DateStrip blocks (4→1) and 1 duplicate TagStrip block (2→1)
- Remove deprecated createEventDispatcher (Svelte 4→5)
- Remove unused component imports (DateStrip, TagStrip, CalendarToolbar, DateStripFab)

ViewCarousel (402→162 LOC, -60%):
- Extract all gesture handling (touch, wheel, velocity, snap, animation,
  chain navigation) into useSwipeNavigation composable (260 LOC)
- ViewCarousel now only handles layout, date calculation, and view rendering
- Composable is reusable for any carousel/swipe navigation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:04:25 +01:00
Till JS
e57b64590d fix(picture): add missing PUBLIC_GOOGLE/APPLE_CLIENT_ID build args to Dockerfile
SvelteKit $env/static/public requires these vars at build time even if empty.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:59:34 +01:00
Till JS
e64c298cec refactor(auth,planta): optimize storage usage
mana-core-auth:
- Replace manual key generation (Date.now) with generateUserFileKey()
- Replace manual validateFileSize with maxSizeBytes in upload()
- Remove OnModuleInit — init storage directly in constructor
- Add upload hooks for structured logging
- Remove redundant getPublicUrl() fallback chain (presigned URL for 1 year)
- Add deleteAllUserAvatars() for account deletion
- Simplify getAvatarUploadUrl() using storage.getPublicUrl()

planta:
- Replace createStorageClient() with manual config by createPlantaStorage()
- Replace manual uuid + path construction with generateUserFileKey()
- Remove uuid dependency for key generation
- Add maxSizeBytes validation (20MB)
- Add cacheControl header (immutable, 1 year)
- Add upload hooks for structured logging
- Add error handling in deletePhoto()
- Add deleteAllUserPhotos() for account deletion
- Make getPhotoUrl() synchronous (was async unnecessarily)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:59:14 +01:00
Till JS
6476521fd1 fix(picture): add patches directory to web Dockerfile
pnpm install fails without the patches/ directory since pnpm-lock.yaml
references patch files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:57:38 +01:00
Till JS
e5ba591680 refactor(storage): optimize cloud drive storage service
- Replace manual validateFileSize() with maxSizeBytes in upload()
- Add upload hooks for structured logging
- Add deleteFiles() for bulk deletion via deleteMany()
- Add deleteAllUserFiles() for account deletion via deleteByPrefix()
- Remove unused validateFileSize import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:57:18 +01:00
Till JS
69eac206fa refactor(picture): optimize storage service
- Replace manual key generation (Date.now + Math.random) with
  generateUserFileKey() for UUID-based collision-free keys
- Add maxSizeBytes validation (50MB images, 5MB thumbnails)
- Add cacheControl headers (immutable for images, 7d for thumbnails)
- Add upload hooks for structured logging
- Simplify constructor (remove OnModuleInit, init storage directly)
- Remove unused StorageMode type and getStorageMode()
- Add deleteAllUserFiles() for account deletion
- Consistent error handling in deleteFile() (warn + swallow)
- Board thumbnails use stable path (no timestamp) for overwrite

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:56:44 +01:00
Till JS
887b60c8c1 fix(picture): fix health endpoint and port consistency for Docker deployment
Exclude /health from global prefix so healthchecks hit /health instead of
/api/v1/health. Update Dockerfile EXPOSE and healthcheck to use port 3040
matching docker-compose config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:54:27 +01:00
Till JS
15cde622e4 refactor(mukke): optimize storage usage in song and beat services
SongService:
- Use deleteMany() for batch deletion of audio + cover (was sequential)
- Add maxSizeBytes validation on cover art (10MB) and tag writing (500MB)
- Add cacheControl header on cover art uploads (immutable, 1 year)
- Add upload hooks for structured logging
- Use 'songs' subfolder for audio, 'covers' for cover art (was flat)
- Add deleteAllUserFiles() for account deletion via deleteByPrefix()
- Log storage errors instead of silently swallowing

BeatService:
- Add upload:error hook for structured logging
- Use 'beats' subfolder for organized key structure
- Log storage deletion errors instead of swallowing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:53:23 +01:00