Commit graph

1416 commits

Author SHA1 Message Date
Till JS
2ea7bb7a18 feat(context): add SvelteKit web app with Svelte 5 runes
- Add 15 routes: dashboard, spaces, documents, editor, tokens, settings, auth, etc.
- Add 10 components: DocumentCard, DocumentEditor, AIToolbar, SpaceCard, BatchCreateModal, etc.
- Add 7 Svelte 5 rune stores: documents, spaces, tokens, auth, theme, navigation, user-settings
- Add i18n with DE + EN locales
- Add types for Document, Space, AI models, token economy
- Add SvelteKit config with node adapter (port 5192)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:15:20 +01:00
Till JS
30ee708a6f feat(branding): add Context and Mukke app branding
- Add Context app icon (sky blue document/knowledge SVG)
- Add Context to MANA_APPS registry with descriptions (DE/EN)
- Add Context app URL mapping (dev: 5192, prod: context.manacore.app)
- Add ContextLogo Svelte component
- Add 'context' and 'mukke' to AppId type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:15:09 +01:00
Till JS
135c636516 fix(calendar,contacts,todo): second round of pre-launch audit fixes
Calendar: validate startTime < endTime on event create/update, verify
share invitation recipient matches accepting user, add @MaxLength on
search DTO, use ConfigService for FRONTEND_URL, fix Docker default port.

Contacts: replace Error with NotFoundException in tag controller, verify
contact ownership before tag operations, add @ArrayMaxSize(100) on batch
DTOs, add unique constraint on contact tags (userId, name), add
@MaxLength(10000) on note content, reorder photo upload for safety.

Todo: add self-referencing FK on parentTaskId with cascade delete,
validate parent task ownership on create, add @Min/@Max on query
limit/offset, add @MaxLength(500) on search, add error handling to
quick add in web app.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:12:20 +01:00
Till JS
83d0b64119 docs(devlog): add 9 missing devlogs from Feb 16 to Mar 18
Covers all working days with commits since the last devlog (Feb 15):
- 2026-02-16: LightWrite launch, PWA rollout, Stripe SEPA
- 2026-02-17: spiral-db, Planta bot, Mana Values manifest
- 2026-03-06: Manalink mobile Matrix client
- 2026-03-07: Manalink Expo SDK 55 fixes
- 2026-03-11: CD pipeline with Mac Mini self-hosted runner
- 2026-03-12: Manalink EAS Build fixes
- 2026-03-15: Traces app, Calendar production hardening
- 2026-03-17: Mukke mobile, E2E tests, pre-commit hook
- 2026-03-18: Unit test coverage for contacts and todo

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:35:46 +01:00
Till JS
8c9d01a1f6 feat(audits): add production readiness scoring system with 19 app audits
- Add audits content collection to manacore landing (Astro schema with 8 category scores)
- Create scoring methodology doc (docs/PROD_READINESS_SCORE.md)
- Add audit list page with client-side filtering (status) and sorting (score/name/date)
- Add audit detail page with score bars, metrics, and markdown content
- Write audits for all 19 apps: calendar (76), contacts (80), todo (79), chat (74),
  picture (72), mukke (71), matrix (68), manacore (65), nutriphi (63), photos (62),
  zitare (62), context (60), skilltree (58), clock (58), storage (55), presi (55),
  planta (50), manadeck (48), questions (48), traces (35)
- Default sort: score descending; filters: All/Production/Beta/Alpha
- Deployed to Cloudflare Pages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:20:18 +01:00
Till JS
313db7646d chore: remove old lightwrite directory (renamed to mukke)
The lightwrite app was renamed to mukke in commit 7a56699d.
This removes the leftover tracked files from the old location.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:15:11 +01:00
Till JS
0e496f7a00 fix(auth): add missing reset-password page to 13 apps
All SvelteKit web apps now have complete auth flows:
- login, register, forgot-password, and reset-password

Changes:
- Add reset-password page to: chat, clock, contacts, context,
  manadeck, nutriphi, planta, presi, questions, skilltree,
  todo, zitare, photos
- Add forgot-password page to photos (was also missing)
- Add resetPasswordWithToken() method to all 13 auth stores
- Each page customized with app-specific logo, colors, branding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:13:18 +01:00
Till JS
8e4b331cb3 fix(calendar,contacts,todo): pre-launch architecture audit fixes
Critical bugs: fix contacts delete() inverted logic, fix photo URLs
hardcoded to localhost:9000. Add missing DB indexes across all three
apps (27 indexes total). Add data integrity constraints: cascade delete
on tasks.projectId, unique label names per user, unique default calendar
per user with race condition handling. Wrap 12 multi-step operations in
transactions (todo). Replace contacts duplicate detection full-table scan
with targeted SQL GROUP BY queries. Fix calendar N+1 event tag queries
with batch loading. Fix contacts tagId filter not being applied. Add
proper RRULE error logging. Clear calendar auth store on sign-out.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:00:08 +01:00
Till JS
7a56699d45 feat(mukke): rename LightWrite to Mukke and add music library, player, playlists
Combines LightWrite (beat/lyrics editor) and Mukke (iOS music player) into
a single web-based music workspace app. Archives the old Mukke mobile app.

- Rename: @lightwrite/* → @mukke/*, all branding, configs, Dockerfiles
- New DB schemas: songs, playlists, playlist_songs + songId FK on projects
- New backend modules: SongModule, PlaylistModule, LibraryModule
- New web: app shell with sidebar, library (songs/albums/artists/genres),
  web player (queue/shuffle/repeat/MediaSession), playlists, search,
  upload, dashboard, album/artist/genre detail pages
- Auth: add forgot-password + reset-password pages, extend auth store
- Tests: 40 backend unit tests (song, playlist, library services)
- Config: env generation, MinIO bucket, docker-compose prod, cloudflare
- Docs: update CLAUDE.md, auth guidelines with SvelteKit checklist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:55:56 +01:00
Till JS
ea4b585f37 feat(context): add NestJS backend, PostgreSQL database, and migrate web app from Supabase to API
- Create NestJS backend on port 3020 with 4 modules (space, document, ai, token)
- Add Drizzle schema with 5 tables (spaces, documents, token_transactions, model_prices, user_tokens)
- Rewrite web services (spaces, documents, tokens, ai) to use shared API client instead of Supabase
- Move AI API keys server-side (Azure OpenAI, Google Gemini)
- Add seed script for model prices (gpt-4.1, gemini-pro, gemini-flash)
- Add 70 unit tests across 4 test suites (space, document, token, ai services)
- Add monorepo integration (setup-databases.sh, generate-env.mjs, docker init-db, root scripts)
- Remove @supabase/supabase-js dependency and delete supabase.ts from web app
- Update CLAUDE.md with full API documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:28:01 +01:00
Till JS
7f4edb3dfb fix: upgrade calendar jest to v30 and add rate limiting to contacts/todo backends
- Calendar backend: upgrade jest 29→30 to fix broken pnpm symlink
  (jest 29 wasn't resolving in pnpm store, all 63 tests now pass)
- Contacts backend: add @nestjs/throttler (100 req/min)
- Todo backend: add @nestjs/throttler (100 req/min)
- Consistent rate limiting across all three backends (calendar already had it)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 09:02:35 +01:00
Till JS
37a699131c test: expand test coverage across calendar, contacts, and todo apps
Calendar Web (3 new test files, 29 tests):
- dateNavigation: getOffsetDate for week/month/agenda views
- eventDateHelpers: toDate, getEventStart/End/Times
- eventFiltering: calendar visibility, timed/all-day filtering, hour ranges, overflow events, tag filtering

Contacts Backend (jest setup + 1 test file, 14 tests):
- Add jest config and test scripts
- contact.service.spec.ts: findByUserId, findById, create, update, toggleFavorite, toggleArchive, count

Contacts Web (1 new test file, 6 tests):
- duplicates API: findDuplicates, mergeContacts, dismissDuplicate

Todo Backend (2 new test files, 24 tests):
- project.service.spec.ts: CRUD, archive, reorder, default project protection
- label.service.spec.ts: CRUD with NotFoundException handling

Todo Web (2 new test files, 14 tests):
- projects API: CRUD, archive, reorder
- reminders API: getReminders, createReminder, deleteReminder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:41:53 +01:00
Till JS
8f71ed134d fix(todo): add default title, remove unused d3-force, add unit tests (39 tests)
- Add <title>Todo</title> to app.html for proper browser tab display
- Remove unused d3-force and @types/d3-force dependencies
- Add vitest config and test scripts
- Add task-parser tests (22 tests): priority, project, labels, preview
- Add tasks API tests (17 tests): CRUD, complete/uncomplete, move, labels, subtasks, reorder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:28:52 +01:00
Till JS
8debd2b8c7 test(contacts): add unit tests for web app (62 tests)
- contact-parser.test.ts: parsing names, companies, phones, tags, preview formatting
- contacts.test.ts: API client for contacts, notes, activities CRUD
- filter.test.ts: filter store state, setters, toggles, persistence, reset
- Add vitest config and test scripts to package.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:14:19 +01:00
Till JS
a5d270154c fix(contacts): add default title and remove unused network view remnants
- Add default <title>Kontakte</title> to app.html
- Remove NetworkGraphSkeleton component
- Remove network view option from toolbar, settings, and view-mode store
- Remove d3-force, d3-selection, d3-zoom dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:05:45 +01:00
Till JS
5d86753e47 fix(contacts): add missing PUBLIC_TODO_BACKEND_URL to contacts-web production config
Without this variable, the contacts web app falls back to localhost:3031 for todo integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 16:55:52 +01:00
Till JS
ee6e9ec7fc docs(calendar): add settings audit documentation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 13:26:17 +01:00
Till JS
6c91805b2f feat(mukke): add offline-first iOS music player app
Mukke is a local, offline-first music player for iOS. Songs are imported
from iCloud/local files via document picker, stored on device, and played
with expo-audio including background playback and lock screen controls.

Stack: Expo SDK 55, expo-audio, expo-sqlite, expo-document-picker,
@missingcore/audio-metadata, Zustand, NativeWind, Expo Router with NativeTabs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 13:23:58 +01:00
Till JS
3dc6ec13a4 fix(traces): configure EAS Build for TestFlight and fix bot-services build
Traces:
- Change bundle ID from com.memoro.locations to com.mana.traces
- Update BGTask identifiers to match new bundle ID
- Add react-native-worklets dependency for reanimated compatibility
- Configure eas.json with monorepo-optimized build settings
- Add pnpm patch for reanimated 4.1.x to accept worklets 0.7.x
- Skip auto-fingerprint on EAS (pnpm hoisted mode)
- Disable default cache paths to avoid ENOENT

Bot-services:
- Add types: ["node"] to tsconfig to prevent RN type conflicts in hoisted mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 13:16:38 +01:00
Till JS
d4c11920c2 Revert "test: verify pre-commit hook works"
This reverts commit abbe12e7e7.
2026-03-17 13:11:31 +01:00
Till JS
abbe12e7e7 test: verify pre-commit hook works 2026-03-17 13:11:24 +01:00
Till JS
77b82c5ce3 fix(devtools): fix pre-commit hook - add eslint-config dep, remove type-check
- Add @manacore/eslint-config as root devDependency so eslint.config.mjs
  can resolve the shared config
- Remove full monorepo type-check from pre-commit hook (too slow for
  commit-time, belongs in CI). Keep lint-staged (eslint + prettier on
  changed files).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 13:08:51 +01:00
Till JS
6e1af0d889 feat(calendar): add Playwright E2E tests for web app
Add 22 E2E tests across 5 test suites covering auth, calendar views,
settings, event CRUD, and calendar management. Tests that require the
calendar backend gracefully skip when it's not running.

Also fixes: hooks.server.ts env fallbacks, ThrottlerGuard DI error,
and auth metrics service TypeScript error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 13:08:09 +01:00
Till JS
f922d2c4a1 fix(auth): return proper 403 for unverified email on login
Better Auth throws APIError("FORBIDDEN") when email is not verified,
but the signIn catch block didn't handle this case, causing a 500.
Now returns ForbiddenException with EMAIL_NOT_VERIFIED code so the
client can show the resend verification link.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:33:27 +01:00
Till JS
14ca0ae0b5 fix(auth): align reset-password min length to 8 characters
The ResetPasswordDto required 12 characters while registration and
change-password only required 8, causing a mismatch with frontend UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:22:56 +01:00
Till JS
7f5c70c7cd feat(calendar): production hardening - cleanup, tests, a11y, error handling
- Remove unused components (DayView, YearView, MultiDayView, context menus, swipe nav, NLP parser)
- Narrow CalendarViewType to week/month/agenda (was 14 types)
- Add global HttpExceptionFilter with structured error responses
- Add LIKE pattern injection prevention in search queries
- Add GET request deduplication in API client
- Add 48 web app tests (events API, events store, view store)
- Improve accessibility (ARIA roles, labels, live regions, grid semantics)
- Add i18n keys for a11y labels across all 5 languages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 12:43:36 +01:00
Till JS
7bb4b1dd5b fix(ci): auto-generate CALENDAR_ENCRYPTION_KEY in prod env
Adds a step to the CD pipeline that ensures CALENDAR_ENCRYPTION_KEY
exists in .env.macmini, generating one if missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 09:07:52 +01:00
Till JS
2ac05ef4aa fix(picture-mobile): make patch-package non-fatal in postinstall
patch-package fails when packages are hoisted to monorepo root
(node-linker=hoisted). Making it non-fatal prevents EAS Build
failures for other apps in the workspace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 09:01:21 +01:00
Till JS
d72dfa26b9 fix(calendar): add @nestjs/throttler as explicit dependency
The package was imported but not listed in package.json, causing
Docker builds to fail since hoisted node_modules aren't available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 08:55:32 +01:00
Till JS
a2569eb14e fix(monorepo): add .npmrc with node-linker=hoisted for EAS Build compatibility
pnpm's default isolated dependency resolution prevents Metro/Babel from
finding transitive dependencies like babel-preset-expo and
@babel/plugin-transform-react-jsx during EAS Build. Using hoisted mode
creates a flat node_modules structure compatible with React Native tooling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 08:50:18 +01:00
Till JS
a39e4ca7f7 fix(calendar): fix Dockerfile healthcheck ports and add ENCRYPTION_KEY to prod
- Backend/Web Dockerfiles: use PORT env var in healthcheck (was hardcoded)
- Web Dockerfile: align default port to 5012 (matching docker-compose)
- docker-compose.macmini.yml: add ENCRYPTION_KEY env var for calendar-backend

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 08:41:04 +01:00
Till JS
32c6f099b1 feat(calendar): add critical production security and performance fixes
- Add AES-256-GCM encryption for CalDAV/Apple passwords in sync service
- Add rate limiting (100 req/min) via @nestjs/throttler
- Add pagination (limit/offset) to events API with metadata response
- Add security headers (CSP, X-Frame-Options, etc.) to web app

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 08:36:45 +01:00
Till JS
bd1178edf8 feat(traces): integrate traces app into monorepo with NestJS backend and AI city guides
Restructure standalone traces app into monorepo pattern with mobile + backend + shared types.
Add NestJS backend with Drizzle ORM schema for locations, cities, places, POIs, and AI guides.
Add mobile sync layer, cities tab, and guide generation UI. Fix pre-existing type errors across
mobile codebase, matrix-mana-bot (sendDirectMessage), llm-playground, and all web auth stores
(signUp call signature).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 08:12:42 +01:00
Till JS
402e135179 fix(matrix-mobile): add EAS Build pre-install hook for pnpm hoisted mode
pnpm's strict isolated dependency resolution prevents @babel/core from
finding babel-preset-expo and @babel/plugin-transform-react-jsx during
Metro bundling. The pre-install hook creates .npmrc with node-linker=hoisted
at the monorepo root so pnpm uses a flat node_modules on EAS Build.

Also simplified metro.config.js by removing manual monorepo watchFolders
config (handled automatically by expo/metro-config since SDK 52).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:08:52 +01:00
Till JS
713f4f7c33 fix(matrix-mobile): add babel-preset-expo as explicit dependency for EAS Build
pnpm strict module resolution prevents @babel/core from finding
babel-preset-expo as a transitive dependency during Metro bundling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:16:38 +01:00
Till JS
50b1a07669 fix(matrix-mobile): use sdk-55 build image instead of deprecated default
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:49:03 +01:00
Till JS
2491440fd8 fix(matrix-mobile): migrate from expo-av to expo-audio for SDK 55 compatibility
expo-av was removed in Expo SDK 55, causing 'EXEventEmitter.h' not found
build errors. Migrated VoiceRecorder and VoiceMessage to use expo-audio.
Also changed EAS build image from "latest" (Xcode 26.2 beta) to "default".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:48:20 +01:00
Till JS
b35b9fd76e fix(matrix-mobile): align dependency versions with Expo SDK 55
Downgrade react-native from 0.84.1 to 0.83.2 and fix all other
dependency version mismatches that caused iOS build failures
(bundleConfiguration, RCTDevMenuConfiguration errors).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:26:12 +01:00
Till JS
37fe02e9fc fix(ci): add PATH env to CD workflow for docker access on Mac Mini runner
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:13:25 +01:00
Till JS
3308a78f3a docs: update Mac Mini docs with active runner status and correct SSH config
- Update runner setup guide to reflect completed installation status
- Simplify docs: runner is active, show maintenance commands instead of install steps
- Fix SSH config in server docs (user mana, local IP, add CI/CD section)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:10:43 +01:00
Till JS
67843b6d72 fix(matrix-web): add missing shared-pwa package to Dockerfile
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:58:51 +01:00
Till JS
3096378748 fix(ci): correct Mac Mini username from till to mana
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:57:56 +01:00
Till JS
2059411d64 docs: add SSH setup instructions to Mac Mini runner guide
Adds Part A covering SSH key setup, SSH config for local and remote
access, and useful SSH commands for manual server management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:44:39 +01:00
Till JS
e926a39818 feat(ci): add CD pipeline with self-hosted runner for Mac Mini auto-deploy
Adds a GitHub Actions workflow that detects changed services on push to
main and automatically rebuilds/restarts only the affected Docker containers
on the Mac Mini. Includes setup guide for the self-hosted runner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:36:23 +01:00
Till JS
f784612f83 fix(matrix-web): prevent chat input bar from being hidden behind PillNavigation
Replace padding-bottom on .main-content with a flex spacer element to
properly reserve space for the fixed PillNavigation, and remove redundant
lg:pb-20 from MessageInput.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:30:53 +01:00
Till JS
b840a21af6 fix(matrix-mobile): block matrix-sdk-crypto-wasm in Metro resolver
The WASM crypto module uses import.meta which Hermes doesn't support.
Since E2EE is not implemented, resolve it as empty module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:24:08 +01:00
Till JS
d9b3775fcc fix(matrix-mobile): add react-native-css-interop as explicit dependency
Required by NativeWind but not hoisted properly by pnpm on EAS builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:01:19 +01:00
Till JS
538833a5b9 fix(matrix-mobile): add react-native-worklets for Reanimated 4.2 compatibility
Reanimated 4.2.2 requires react-native-worklets >= 0.7.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 08:55:42 +01:00
Till JS
10b880b6a1 feat(matrix-mobile): upgrade to Expo SDK 55
- Upgrade all expo packages to SDK 55 (expo 55.0.5, react-native 0.84.1, react 19.2.4)
- Migrate expo-file-system to new File/Paths API (cacheDirectory removed)
- Import SharedValue directly from react-native-reanimated (Animated namespace change)
- Simplify polyfills to use globalThis instead of global
- Remove events import (no longer needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 08:23:56 +01:00
Till JS
1976c26f19 fix(monorepo): add sharp to neverBuiltDependencies for EAS builds
sharp native compilation fails on EAS build servers. It's not needed
for mobile app builds, so skip its postinstall build step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:54:43 +01:00