Commit graph

1358 commits

Author SHA1 Message Date
Till-JS
845859cae4 feat(todo): add PNG import functionality to spiral page 2026-02-17 14:11:50 +01:00
Till-JS
5c630c3fa4 feat(nutriphi-bot): add smart meal feedback with positive aspects and improvement suggestions
- Generate automatic feedback based on nutritional values
- Show positive aspects (fiber, protein, whole grains, nuts, fruits/vegetables)
- Suggest improvements (portion size, fat content, missing nutrients)
- Detect multiple oils and suggest simplification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 14:09:33 +01:00
Till-JS
212f4992c1 fix(manacore-web): handle contacts API response format
The Contacts API returns { contacts: Contact[], total: number }
but the service was treating it as a direct Contact[] array.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 13:56:47 +01:00
Till-JS
bf5df284ff 🔧 chore(todo): switch todo-web to local build for spiral-db 2026-02-17 13:49:29 +01:00
Till-JS
9517e1e7a9 🐛 fix(todo): add missing packages to Dockerfile for spiral-db 2026-02-17 13:48:05 +01:00
Till-JS
1d44f918c5 fix(manacore-web): add missing packages to Dockerfile
Add shared-pwa, qr-export, and wallpaper-generator packages
to the Docker build context for manacore-web.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 13:43:08 +01:00
Till-JS
03d90f2bda fix(lightwrite): add /api/v1 prefix to backend API calls
The backend uses a global prefix of /api/v1 but the frontend was
calling endpoints without it, causing 404 errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 13:41:12 +01:00
Till-JS
497b12c561 ♻️ refactor(shared-ui): simplify PillNavigation - remove sidebar mode
- Remove isSidebarMode and onModeChange props from PillNavigation
- Remove desktopPosition prop (always bottom now)
- Remove toolbarContent snippet support
- Simplify PillTabGroup (remove sidebar mode)
- Update navigation-simple.ts store factory
- Remove navigation position settings from GlobalSettingsSection
- Update all 12 app layouts to use simplified navigation
- Add missing @sqlite.org/sqlite-wasm dependency to calendar

BREAKING CHANGE: PillNavigation no longer supports sidebar mode.
Navigation is now always horizontal at the bottom of the screen.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 13:27:23 +01:00
Till-JS
e5109da732 feat(wallpaper-generator): add device wallpaper generation package
Add new @manacore/wallpaper-generator package for creating device
wallpapers from QR codes and images.

Features:
- 30 device presets (phones, tablets, desktops)
- 3 layout types (center, corner, pattern)
- 5 gradient presets + solid color backgrounds
- Browser (Canvas) and Node.js (Sharp) renderers
- Svelte WallpaperModal UI component

Integrations:
- @manacore/qr-export: toWallpaper() function
- @manacore/spiral-db: toWallpaper() function
- QRExportModal: "Als Wallpaper" button

Also includes the full @manacore/qr-export package which was
previously untracked.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 12:57:43 +01:00
Till-JS
c480231128 fix(planta-bot): make I18nService optional to diagnose DI issue
Also restore @Global() decorator to I18nModule while keeping
global: true in DynamicModule config for consistency with other
modules like CreditModule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 12:51:04 +01:00
Till-JS
fd30fdc620 fix(bot-services): add global: true to I18nModule dynamic module config
The @Global() decorator on a module class doesn't apply when using
dynamic modules (forRoot/forRootAsync). The global: true property
must be set directly in the DynamicModule return object.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 12:48:28 +01:00
Till-JS
9b01c094c1 fix(bot-services): remove SessionModule import from I18nModule to prevent DI conflicts
The I18nModule was importing SessionModule.forRoot() internally, which
conflicted with bots that import SessionModule with different options
(e.g., storageMode: 'redis').

Since I18nService uses @Optional() for SessionService, the module should
not force its own SessionModule import. Users who want per-user language
preferences should import SessionModule in their app before I18nModule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 12:46:33 +01:00
Till-JS
9faa1fcc68 debug: add detailed logging to planta bot handleTextMessage 2026-02-17 12:40:57 +01:00
Till-JS
07a4c1c4bc debug: add message handler logging for planta-bot investigation 2026-02-17 12:38:27 +01:00
Till-JS
352388bb78 docs(manacore): add comprehensive Mana Values manifest
- Create central MANA_VALUES.md reference document in docs/
- Expand unsere-werte.md with full values manifest for landing page
- Add table and hr styling to mission page for proper rendering

Content includes: Vision, Mission, Three Pillars (Transparency, Fairness,
Innovation), Mana Principle with cost breakdown, Guiding Principles,
Responsibility (Ecological, Social, European Independence), and Future
Perspectives.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 11:08:11 +01:00
Till-JS
dcf4438804 feat(mana-bot): add daily morning summary feature
Add configurable morning summaries that aggregate data from multiple sources:
- Weather forecast via Open-Meteo API (free, no API key needed)
- Today's calendar events
- Today's tasks + overdue tasks
- Birthdays from contacts
- Plants needing water from Planta

New commands:
- !morning / !morgen - Get summary now
- !morning-on/off - Enable/disable automatic delivery
- !morning-time HH:MM - Set delivery time
- !morning-location [city] - Set weather location
- !morning-timezone [zone] - Set timezone
- !morning-format [kompakt|ausfuehrlich] - Set format
- !morning-settings - Show current settings

New shared services in @manacore/bot-services:
- WeatherService - Open-Meteo integration with geocoding
- ContactsApiService - Birthday fetching
- PlantaApiService - Watering schedule
- MorningSummaryService - Aggregates all sources
- MorningPreferencesService - User preferences storage

Includes scheduler for automatic daily delivery at user-configured time.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 11:01:47 +01:00
Till-JS
3b00303e7b fix(planta-backend): correct health check endpoint to /api/v1/health
- Update Dockerfile HEALTHCHECK to use /api/v1/health
- Update docker-compose.macmini.yml health check endpoint
- Increase start_period to 30s

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 10:55:40 +01:00
Till-JS
4c3ca3bdf6 feat(todo): integrate spiral-db visualization
Add interactive spiral database visualization to todo app:
- SpiralCanvas component for pixel-based image rendering
- Reactive Svelte 5 store for SpiralDB state management
- Full /spiral page with stats, zoom, grid toggle, emoji view
- Import existing todos into spiral format
- PNG export/download functionality
- Navigation link in app layout
2026-02-17 10:55:29 +01:00
Till-JS
c5c8907758 fix(planta-backend): add shared-drizzle-config to Dockerfile
Required by drizzle.config.ts for schema push in docker-entrypoint.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 10:51:16 +01:00
Till-JS
ceac5444ca fix(planta-bot): rewrite Dockerfile to use pnpm workspace pattern
- Use node:20-slim like other bots
- Copy and build shared packages (bot-services, matrix-bot-common)
- Use pnpm instead of npm
- Add non-root user for security
- Fix healthcheck port to 4022

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 10:48:55 +01:00
Till-JS
d9c5554189 feat(manacore): add QR code export to my-data page
- Add @manacore/qr-export dependency to web app
- Create qr-export.ts service to collect contacts, events, todos
- Create QRExportModal.svelte with QR preview and download buttons
- Add QR-Code button to my-data settings page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 10:47:24 +01:00
Till-JS
c999999456 feat(planta): add Docker deployment for planta-backend and matrix-planta-bot
- Add Dockerfile and docker-entrypoint.sh for planta-backend
- Add planta-backend service to docker-compose.macmini.yml (port 3022)
- Add matrix-planta-bot service to docker-compose.macmini.yml (port 4022)
- Configure dependencies: mana-auth, minio, redis, synapse, planta-backend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 10:45:35 +01:00
Till-JS
f1518e8c39 feat(spiral-db): add pixel-based spiral database package
Implement SpiralDB - a novel data storage format that encodes structured
data into PNG images using an 8-color palette. Data grows in a spiral
pattern from the center outward, enabling infinite expansion.

Features:
- 8-color palette (3-bit per pixel) for compression robustness
- Spiral coordinate system with ring-based organization
- Schema-based serialization (int, bool, string, timestamp, arrays)
- Record management with CRUD operations and status tracking
- PNG export/import with pako compression
- Browser support (Canvas, Blob, DataURL)
- Todo schema as reference implementation

Storage structure:
- Ring 0: Magic byte (validation)
- Ring 1: Database header (version, flags, counts)
- Ring 2: Schema definition
- Ring 3+: Master index (spans multiple rings if needed)
- Ring 4+: Record data
2026-02-17 10:42:09 +01:00
Till-JS
9704e88e78 feat(planta-bot): add AI plant identification via image upload
- Add handleImageMessage() to BaseMatrixService for image support
- Implement photo upload and Gemini Vision analysis in PlantaService
- Add image handler in MatrixService that downloads, uploads, and analyzes
- Format analysis results with health status, care tips, and confidence
- Update CLAUDE.md documentation with new feature
- Fix type mismatch in onboarding-bot (fullName → displayName)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 10:40:08 +01:00
Till-JS
d6303e4998 feat(storage): add public endpoint support for presigned URLs
When services run in Docker with internal endpoints (e.g., http://minio:9000),
presigned URLs are inaccessible from browsers. This adds S3_PUBLIC_ENDPOINT
support to generate presigned URLs using a publicly accessible endpoint
(e.g., https://minio.mana.how) while keeping internal operations on the
Docker network.

Changes:
- Add publicEndpoint to StorageConfig type
- Create separate S3Client for presigned URL generation
- Add S3_PUBLIC_ENDPOINT to factory configuration
- Configure lightwrite-backend with public MinIO endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:35:18 +01:00
Till-JS
9dc6c111d3 feat(lightwrite): add STT lyrics transcription integration
Integrate mana-stt service for automatic lyrics transcription:

- Add SttService to call mana-stt /transcribe endpoint
- Extend beats schema with transcription status fields
- Add POST /beats/:id/transcribe endpoint
- Add GET /beats/stt/available endpoint
- Update BeatUploader with auto-transcription after upload
- Show transcription progress and retry button on failure
2026-02-16 15:19:14 +01:00
Till-JS
20db01628a fix(auth): remove conflicting JSON body parser middleware
The manual bodyParser.json() middleware conflicts with NestJS rawBody mode.
When rawBody: true is enabled, NestJS consumes the body stream first, then
the manual parser tries to read it again causing "stream is not readable".

NestJS handles JSON parsing internally, so the manual middleware was redundant
and causing 500 errors on login requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 14:30:06 +01:00
Till-JS
f5a6fda0fa 🔧 chore(auth): add missing apps to CORS origins
Add lightwrite, zitare, questions, planta, manadeck, picture to
mana-core-auth CORS_ORIGINS to allow auth requests from these apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:58:07 +01:00
Till-JS
1328d92585 🐛 fix(lightwrite): add LightWriteLogo to shared-branding
- Add lightwrite to AppId type
- Add lightwrite branding config (orange theme, music note icon)
- Create LightWriteLogo.svelte component
- Update login/register pages to use proper logo component
- Fixes type-check errors in @lightwrite/web
2026-02-16 13:56:10 +01:00
Till-JS
2236f83a58 📝 docs: add Mana earning system documentation
Document fraud-resistant mechanisms for users to earn Mana credits:
- Karma/XP system (non-monetary gamification)
- Creator rewards with social proof and fraud detection
- Community bug bounty program with manual review
- Database schemas, API endpoints, and implementation TODOs
2026-02-16 13:52:22 +01:00
Till-JS
711db9ee3e 🐛 fix(lightwrite): add missing shared packages to Dockerfile
Added shared-pwa and shared-api-client to Docker build context.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:42:32 +01:00
Till-JS
46b986101e 🐛 fix(lightwrite): add missing Tailwind CSS vite plugin
CSS was not loading because @tailwindcss/vite plugin was missing from
the vite config. This caused all Tailwind classes to be ignored.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:38:04 +01:00
Till-JS
31f3d80fd6 ✈️ feat(pwa): add PWA dependencies to all 18 web apps
Add @vite-pwa/sveltekit and @manacore/shared-pwa devDependencies
to enable unified PWA architecture across all web applications:
- Calendar, Chat, Clock, Contacts, LightWrite
- ManaCore, ManaDeck, Matrix, NutriPhi, Photos
- Picture, Planta, Presi, Questions, Skilltree
- Storage, Todo, Zitare

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:13:40 +01:00
Till-JS
14da5a28ef 📝 docs(auth): update organization endpoint documentation
- Add all new organization management endpoints to API table
- Add new Invitations section for invitation endpoints
- Update controller JSDoc with complete endpoint list
- Update last updated date
2026-02-16 12:57:29 +01:00
Till-JS
67a2d639fe 📝 docs: add app-specific mini-onboarding documentation 2026-02-16 12:52:44 +01:00
Till-JS
b92b9bd2b5 feat(onboarding): add app-specific mini-onboarding system
- Create @manacore/shared-app-onboarding package with:
  - createAppOnboardingStore factory function (Svelte 5 runes)
  - MiniOnboardingModal component for select/toggle/info steps
  - TypeScript types for flexible step configuration
- Integrate into Calendar app with questions for:
  - Week start (Monday/Sunday)
  - Default view (Day/Week/Month)
  - Timezone preference (Auto/Manual)
  - Welcome tips

The mini-onboarding stores completion state in deviceSettings,
allowing per-device, per-app onboarding experiences.
2026-02-16 12:50:04 +01:00
Till-JS
5fe16b5eec feat(auth): add organization management endpoints
Add missing organization features for Teams functionality:
- PUT /auth/organizations/:id - update organization
- DELETE /auth/organizations/:id - delete organization
- PATCH /auth/organizations/:orgId/members/:memberId/role - update member role
- GET /auth/organizations/:id/invitations - list org invitations
- GET /auth/invitations - list user invitations
- DELETE /auth/invitations/:id - cancel or reject invitation
2026-02-16 12:47:49 +01:00
Till-JS
9d618b107c 📝 docs: add SEPA activation checklist with TODOs and test cases 2026-02-16 12:42:02 +01:00
Till-JS
6e7b671a73 feat(lightwrite): add UX improvements and beat library
Phase 1-5 implementation:
- Keyboard shortcuts (Space, arrows, M, L, +/-)
- Dark/Light mode with theme store
- Loop regions for practice sections
- Mobile responsive view with tabs
- Beat library with preview and use functionality

Backend:
- Add library_beats schema
- Add library beat endpoints (GET list, GET download-url, POST use)

Frontend:
- BeatLibrary component with preview player
- BeatUploader tabs (Upload/Library)
- Theme-aware waveform colors
- Compact mobile playback controls

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 12:14:13 +01:00
Till-JS
b5d7524c77 💳 feat(stripe): add SEPA Direct Debit payment option
- Add sepa_debit to payment_method_types for credit purchases
- Add sepa_debit to subscription checkout sessions
- Handle payment_intent.processing webhook for SEPA status tracking
- Add blueprint article analyzing payment options (Stripe vs LSV+/FinTS)

SEPA offers lower fees (0.8% vs 1.5%+€0.25) for DACH customers.
Payments are confirmed 3-14 days after checkout (bank processing).
2026-02-16 12:05:19 +01:00
Till-JS
0e8f6f134e 📝 docs(credits): update documentation for simplified credit system
- Remove free credits and signup bonus references
- Remove B2B organization credits documentation
- Update API responses (no freeCreditsRemaining, dailyFreeCredits)
- Update environment variables (remove CREDITS_SIGNUP_BONUS, CREDITS_DAILY_FREE)
- Update JWT info to reflect EdDSA via Better Auth
- Simplify DATABASE_SCHEMA.md to B2C-only flow
2026-02-16 12:03:35 +01:00
Till-JS
d86e9031bb 🐛 fix(auth): skip body parser for Stripe webhooks
The JSON body parser was consuming the request body before NestJS
could access the rawBody needed for Stripe webhook signature
verification. Now webhooks to /api/v1/webhooks/stripe skip the
body parser middleware.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 12:01:24 +01:00
Till-JS
bfc2737ce5 ♻️ refactor(credits): simplify credit system by removing free credits and B2B
Remove free credits system (signup bonus, daily credits) and B2B organization
credits to simplify the codebase. Credits now only come from purchases or gifts.

Changes:
- Remove freeCreditsRemaining, dailyFreeCredits, lastDailyResetAt from balances
- Remove organizationBalances and creditAllocations tables from schema
- Simplify transaction types to: purchase, usage, refund, gift
- Remove B2B endpoints from credits controller
- Remove checkDailyReset, allocateCredits, deductCredits from service
- Add redeemPendingGifts method to auto-redeem gifts on registration
- Update frontend to remove free credits display
- Add database migration for the changes
- Update all related tests to match simplified system
2026-02-16 11:54:32 +01:00
Till-JS
b9669c3ba5 🎨 refactor(matrix): use elevation system for RoomSettingsPanel
Replace glassmorphic styling with semantic elevation classes:
- bg-surface-elevated for elevated overlays
- bg-surface for nested cards/inputs
- border-border for consistent borders
- hover:bg-surface-hover for hover states
- text-error and bg-success for semantic colors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 11:45:39 +01:00
Till-JS
2e660391ce 💳 feat(stripe): add ManaCore unified subscription plans
- Create Plus/Pro/Ultra subscription tiers with Stripe products & prices
- Add credit packs (100/500/1000) for one-time purchases
- Update seed script with new plan structure and Stripe IDs
- Configure webhook secret and customer portal
- Add all Stripe environment variables to .env.development

Plans:
- Free: 50 credits/month (default)
- Plus: 100 credits/month @ €4.99/mo or €49.99/yr
- Pro: 500 credits/month @ €11.99/mo or €119.99/yr
- Ultra: 2000 credits/month @ €24.99/mo or €249.99/yr

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 11:43:04 +01:00
Till-JS
7747ca6a36 📝 docs(devlog): add missing devlogs for Jan 24-27 and Feb 14-15
Add 5 devlogs covering previously undocumented development days:
- 2026-01-24: Guest mode improvements for Clock & Contacts
- 2026-01-25: NutriPhi app, Prometheus monitoring, Watchtower
- 2026-01-27: Matrix self-hosting, Stats/Doc/Ollama bots
- 2026-02-14: Matrix STT bot, gift code UI, onboarding bot
- 2026-02-15: Onboarding modal polish, Calendar ViewsBar
2026-02-16 11:40:37 +01:00
Till-JS
f77edbdedd 🐳 fix(lightwrite): add shared-nestjs-setup to Dockerfile
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 11:31:38 +01:00
Till-JS
bba3d975c1 🔒 chore: update pnpm-lock.yaml for lightwrite shared package
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 11:30:02 +01:00
Till-JS
ea0bf67f0d 🎨 style(matrix): fix RoomSettingsPanel styling to match app theme
Replace DaisyUI classes with the custom glassmorphic theme:
- Use bg-white/80 dark:bg-black/80 with backdrop-blur
- Use border-black/10 dark:border-white/10 for borders
- Use text-foreground and text-muted-foreground for text
- Add gradient avatars matching rest of app
- Fix tab styling with proper active states

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 11:25:54 +01:00
Till-JS
52f88af4c5 🐛 fix(clock-bot): enable Redis session storage for widget
Widget module now uses Redis storage mode to share sessions with
the bot module. This enables Matrix-SSO-Link auto-login for widget.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 11:20:54 +01:00