Commit graph

855 commits

Author SHA1 Message Date
Till-JS
29c5d2b29a feat(auth): add OIDC login page for Matrix SSO
Add a simple login page at /login for OIDC authorization flows.
When users access the authorization endpoint without being logged in,
Better Auth redirects them to this page. After successful login,
users are redirected back to continue the authorization flow.

- Create OidcLoginController with login page HTML
- Add controller to AuthModule
- Exclude /login from global prefix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:55:02 +01:00
Till-JS
0c1008d725 debug(auth): add detailed logging for OIDC handler response
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:51:56 +01:00
Till-JS
ac976f242a 🔧 chore(skilltree): add dev commands and database setup
- Add pnpm dev:skilltree:* commands to package.json
- Add SkillTree section to COMMANDS.md
- Configure setup-databases.sh for skilltree database
2026-01-29 12:50:43 +01:00
Till-JS
baea194677 fix(auth): add OAuth2 routes for OIDC discovery compatibility
Better Auth's OIDC discovery document advertises endpoints at
/api/auth/oauth2/* paths. Add routes for these native paths to
ensure Matrix Synapse and other OIDC clients can complete the
authorization flow.

Routes added:
- GET /api/auth/oauth2/authorize
- POST /api/auth/oauth2/token
- GET /api/auth/oauth2/userinfo
- GET /api/auth/jwks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:48:50 +01:00
Till-JS
c3dd7703b2 test(skilltree): add comprehensive test suite for web and backend
Add 91 tests covering the SkillTree application:

Web (Vitest - 53 tests):
- Level calculation and XP progress functions
- Branch validation and factory functions
- createDefaultSkill and createActivity helpers

Backend (Jest - 38 tests):
- SkillService CRUD operations
- XP system with level-up detection
- User stats aggregation
- Custom Drizzle ORM mock with thenable query builder
2026-01-29 12:43:19 +01:00
Till-JS
42dafe593b fix(auth): fix global prefix exclusion for OIDC routes
Add explicit path exclusions and path-to-regexp wildcard patterns
to ensure /api/auth/jwks and other OIDC routes are excluded from
the /api/v1 global prefix. This fixes JWKS endpoint accessibility
for Matrix Synapse OIDC integration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:31:25 +01:00
Till-JS
e46a4c96df fix(auth): expose JWKS at /api/auth/jwks for OIDC discovery
Better Auth's discovery document points to /api/auth/jwks,
so we need to expose this route directly in NestJS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:21:39 +01:00
Till-JS
2021cf9e22 feat(matrix): configure OIDC SSO with Mana Core Auth
Update Synapse OIDC configuration to use the registered
matrix-synapse client for SSO authentication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:20:44 +01:00
Till-JS
e145c642d7 📝 docs(devlog): add 2026-01-28 massive feature sprint devlog
Document 74 commits covering:
- SkillTree app (gamified skill tracking with XP system)
- Questions app (AI research assistant with mana-search)
- mana-search microservice (SearXNG meta-search)
- Matrix Client Phase 2 (file upload, message actions, room management)
- @manacore/bot-services shared package
- matrix-mana-bot unified gateway
- 4 new Matrix bots (Todo, NutriPhi, Zitare, Clock)
- OIDC Provider for Matrix SSO
- VictoriaMetrics + DuckDB monitoring upgrade
- Demo mode for Calendar, Todo, Contacts apps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:19:38 +01:00
Till JS
5e92a52b8e
Merge pull request #28 from Memo-2023/claude/skill-tree-app-planning-CO4xH
Add SkillTree app with backend API and web frontend
2026-01-29 12:13:20 +01:00
Till JS
a930e285b2
Merge pull request #27 from Memo-2023/claude/plan-questions-app-UKqD5
Add Mana Search Service design document and architecture
2026-01-29 12:12:29 +01:00
Till JS
8692690f51
Merge pull request #26 from Memo-2023/claude/matrix-setup-documentation-Ketxw
feat: Add Matrix Mana Gateway Bot with unified bot architecture
2026-01-29 12:12:02 +01:00
Till JS
f623c1fc36
Merge pull request #25 from Memo-2023/claude/matrix-client-options-F0UhN
Add Matrix chat client built with SvelteKit and matrix-js-sdk
2026-01-29 12:10:20 +01:00
Till JS
df5a9e2ebe
Merge pull request #24 from Memo-2023/claude/review-server-services-NrMEv
docs: Add comprehensive infrastructure recommendations guide
2026-01-29 12:09:01 +01:00
Claude
076e5518cc
feat(skilltree): connect web app to backend API
- Add API client for backend communication
- Add skills and activities API modules
- Add auth store with Mana Core Auth integration
- Update skills store to use API when authenticated
- Keep IndexedDB as offline fallback
- Add hooks.server.ts for runtime env injection

https://claude.ai/code/session_015XCsTDS9aLZ64Zin4HU6ex
2026-01-29 11:05:32 +00:00
Claude
928cac6799
feat(questions): add production-ready pages and components
- Add forgot-password page with email recovery flow
- Add settings page with account, theme, notifications, privacy options
- Add collections management page with create/edit/delete functionality
- Add CollectionModal component for collection CRUD
- Add ErrorAlert component for consistent error handling
- Add loading skeletons (QuestionSkeleton, QuestionDetailSkeleton, AppLoadingSkeleton)
- Update layouts and pages to use skeletons and error handling

https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
2026-01-29 00:43:59 +00:00
Claude
370b5d3196
fix(matrix-mana-bot): correct service method calls and add deploy script
- Fix AiHandler to use correct service methods:
  - setSessionModel instead of setModel
  - clearSessionHistory instead of clearHistory
  - compareModels for model comparison
- Fix TodoHandler to use index-based methods:
  - completeTaskByIndex instead of completeTask
  - deleteTaskByIndex instead of deleteTask
- Add deploy-mana-bot.sh script for full deployment automation

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:42:50 +00:00
Claude
e96d76ab8e
feat(infra): integrate matrix-mana-bot into deployment
- Add matrix-mana-bot to docker-compose.macmini.yml
- Add setup-mana-bot.sh script for bot registration
- Add dev:matrix:* scripts to root package.json
- Add devlog entry documenting the new architecture

The gateway bot is now ready for deployment alongside
the existing standalone Matrix bots.

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:37:38 +00:00
Claude
2d879b327e
feat(services): add matrix-mana-bot unified gateway
Introduces a unified Matrix bot that combines all features:
- AI Chat (Ollama integration)
- Todo management
- Calendar events
- Timers & Alarms
- Cross-feature orchestration (!summary, !ai-todo)

Architecture:
- Uses @manacore/bot-services for shared business logic
- Command router with natural language support
- Handlers delegate to shared services
- Orchestration layer for cross-feature AI features

This enables users to interact with a single bot for all features,
while standalone bots remain available for dedicated use cases.

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:23:46 +00:00
Claude
68a6c7a8d6
feat(packages): add @manacore/bot-services shared package
Introduces a new shared package containing transport-agnostic business
logic services for Matrix bots and the Gateway. This enables:

- Individual bots to import shared services
- A unified Gateway bot to combine all features
- Code reuse without duplication

Services included:
- TodoService: Task management with projects, priorities, dates
- CalendarService: Events, calendars, reminders
- AiService: Ollama LLM integration, chat sessions, vision
- ClockService: Timers, alarms, world clocks (API client)
- Placeholder modules for Nutrition, Quotes, Stats, Docs

Key features:
- Pluggable storage providers (file-based, in-memory, custom)
- German natural language input parsing
- NestJS module system with dependency injection
- Fully testable in isolation

https://claude.ai/code/session_015bwcqVRiFmSydYTjvDJGTc
2026-01-29 00:07:32 +00:00
Claude
f93ca53dfb
feat(questions): implement SvelteKit web app
Complete web app implementation with Svelte 5 runes:

Features:
- Authentication: Login, register pages with mana-core-auth integration
- Question List: Filterable list with search, status, and collection filters
- Question Detail: View research results and sources
- New Question: Create questions with depth selection and auto-research
- Collections Sidebar: Navigate and organize questions by collection
- Dark Mode: Full theme support with toggle

Structure:
- src/lib/api/: API clients for all backend endpoints
- src/lib/stores/: Svelte 5 reactive stores (auth, questions, collections)
- src/lib/types/: TypeScript interfaces
- src/routes/(app)/: Protected app routes
- src/routes/(auth)/: Public auth routes

Configuration:
- Port: 5111
- Tailwind CSS with shared theme
- lucide-svelte icons

Also updated:
- CLAUDE.md: Added web app documentation
- package.json: Updated dev:questions:full to include web

https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
2026-01-29 00:00:53 +00:00
Claude
7a0b26eb3d
feat(skilltree): add NestJS backend with Docker deployment
- Add NestJS backend with Drizzle ORM and PostgreSQL
- Implement skills CRUD API with XP/level progression system
- Add activities tracking endpoint
- Configure Docker containers for backend (port 3024) and web (port 5195)
- Add skilltree services to docker-compose.macmini.yml
- Add CI build jobs for skilltree-backend and skilltree-web

https://claude.ai/code/session_015XCsTDS9aLZ64Zin4HU6ex
2026-01-28 23:59:50 +00:00
Claude
c9f3d8ae47
feat(matrix): add Phase 2 features
File Upload & Media:
- Send images, videos, audio, and files
- Display media in timeline with thumbnails
- Download links for files
- Upload progress indicator

Message Actions:
- Reply to messages with quote preview
- Edit own text messages
- Delete (redact) own messages
- React with emoji (store only, UI pending)

Room Management:
- Create room dialog (DM or group)
- User search and invite
- Room settings panel with member list
- Leave room functionality

UI Improvements:
- German translations
- Message hover actions
- Reply/Edit preview in input
- Date separators in timeline

https://claude.ai/code/session_01RUrt2qN1D3nVh9HcGpwoby
2026-01-28 23:54:24 +00:00
Claude
ec96d4e952
feat(questions): implement questions app NestJS backend
Complete backend implementation for the AI-powered research assistant app:

Database Schema (Drizzle ORM):
- collections: Organize questions into folders with colors and icons
- questions: User questions with status, priority, tags, and research depth
- research_results: Results from mana-search service with summaries and key points
- sources: Extracted content from web search results
- answers: AI-generated answers with ratings and citations

NestJS Modules:
- QuestionModule: CRUD operations with filtering, pagination, and status management
- CollectionModule: Collection management with reordering and question counts
- ResearchModule: Integration with mana-search microservice for web search
- AnswerModule: Answer management with ratings and acceptance tracking
- SourceModule: Source content retrieval and management
- HealthModule: Health checks for database and search service

Features:
- Full JWT authentication via @manacore/shared-nestjs-auth
- Research depths: quick (5 sources), standard (15), deep (30)
- Automatic content extraction and summarization
- Follow-up question generation

Also updated:
- Root package.json: Added questions:* development scripts
- setup-databases.sh: Added questions database setup

https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
2026-01-28 23:52:22 +00:00
Claude
c0802af67f
fix(search): fix TypeScript errors in extract service
- Remove unsupported signal option from article-extractor
- Use Promise.race for timeout handling instead
- Remove non-existent language property from ArticleData

https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
2026-01-28 23:38:00 +00:00
Claude
bd72b4d6d5
feat(search): implement mana-search microservice
Central search microservice for all ManaCore apps featuring:

- NestJS API on port 3021
- SearXNG meta-search engine integration (40+ search engines)
- Redis caching layer for search results and extracted content
- Content extraction with markdown conversion
- Prometheus metrics for monitoring

API Endpoints:
- POST /api/v1/search - Web search with categories/engines
- POST /api/v1/extract - Content extraction from URLs
- POST /api/v1/extract/bulk - Bulk extraction
- GET /health - Health check
- GET /metrics - Prometheus metrics

Search categories: general, news, science, it, images, videos
Supported engines: Google, Bing, DuckDuckGo, Wikipedia, arXiv,
GitHub, StackOverflow, and many more.

https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
2026-01-28 20:41:59 +00:00
Claude
5b291c1a17
feat(skilltree): add edit, level-up celebration, templates, and tree view
- Edit skill modal with delete confirmation
- Animated level-up celebration with particles
- Skill templates for quick onboarding (Web Dev, Fitness, Languages, etc.)
- Radial skill tree visualization (/tree)
- Export/import functionality for data backup
- Tree view link in header

https://claude.ai/code/session_015XCsTDS9aLZ64Zin4HU6ex
2026-01-28 20:38:49 +00:00
Claude
12ad8e83d5
feat(skilltree): add SkillTree MVP - gamified skill tracking app
- SvelteKit web app with Svelte 5 runes
- IndexedDB storage for offline-first experience
- 6 skill branches: Intellect, Body, Creativity, Social, Practical, Mindset
- XP system with 6 levels (Unbekannt -> Meister)
- Activity logging with timestamps
- Stats overview (total XP, skills, streak)
- Branch filtering and recent activities feed

https://claude.ai/code/session_015XCsTDS9aLZ64Zin4HU6ex
2026-01-28 20:32:05 +00:00
Claude
590529c547
feat(planning): add mana-search microservice design document
Central search microservice for all ManaCore apps featuring:
- Self-hosted SearXNG meta-search engine (246 search engines)
- Content extraction with markdown conversion
- Redis caching layer
- Unified API for search + extraction
- Shared client package for consumers

Designed to serve questions app, chat app, and future apps
requiring web search and content grounding capabilities.

https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
2026-01-28 20:27:36 +00:00
Claude
4e622a66de
feat(matrix): add SvelteKit Matrix client (Phase 1)
Implements a minimal self-hosted Matrix chat client with:
- matrix-js-sdk integration with Svelte 5 runes store
- Password login with homeserver discovery
- Room list (DMs and groups) with unread counts
- Message timeline with typing indicators
- Send messages with Enter key
- Responsive chat UI with Tailwind CSS

Project structure:
- apps/matrix/apps/web: SvelteKit client (port 5180)
- apps/matrix/packages/shared: Shared types

Commands: pnpm dev:matrix:web

https://claude.ai/code/session_01RUrt2qN1D3nVh9HcGpwoby
2026-01-28 20:21:13 +00:00
Claude
c03f2e5d83
docs: add comprehensive guide for recommended server services
Detailed documentation covering:
- Current infrastructure overview (what's already running)
- Critical additions: Backup (restic/borgmatic), Logging (Loki+Promtail)
- Important additions: Uptime Kuma, Reverse Proxy (Traefik/Caddy)
- Recommended additions: Secrets Management (Vault/Infisical), API Gateway
- Optional services: CI/CD Runner, Whisper STT, Container Registry
- Apps already developed but not yet deployed (Zitare, Picture, etc.)
- Prioritized roadmap for implementation

Each service includes: what it is, why it's needed, Docker Compose examples,
and resource requirements.

https://claude.ai/code/session_015LN6cVr58JJRBGEe2CTpHL
2026-01-28 20:12:22 +00:00
Claude
9b8a564e1c
feat(planning): add comprehensive questions app design document
Planning document for a new "questions" app that enables users to:
- Collect and manage open questions
- Run AI-powered research on questions
- Track sources and citations
- Organize knowledge with collections and tags

Includes database schema, API endpoints, UI components, and
implementation roadmap based on existing chat/zitare patterns.

https://claude.ai/code/session_01Rk3YVJCU3nM8uvVPghRz6r
2026-01-28 17:49:43 +00:00
Till-JS
bea066c7f8 fix(auth): correct JWKS route mapping for OIDC
JWKS is at /api/auth/jwks, not /api/auth/oauth2/jwks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:13:28 +01:00
Till-JS
f6382ead87 fix(auth): map OIDC routes to Better Auth's /api/auth/oauth2/* paths
Better Auth's OIDC Provider plugin uses routes under /api/auth/oauth2/
rather than /api/oidc/. This commit maps incoming routes correctly:
- /.well-known/openid-configuration → /api/auth/.well-known/openid-configuration
- /api/oidc/* → /api/auth/oauth2/*

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:10:41 +01:00
Till-JS
ef7f906215 debug(auth): add OIDC request logging
Add console.log statements to debug OIDC routing issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:05:45 +01:00
Till-JS
e2a3277fa1 feat(matrix-clock-bot): add Matrix bot for time tracking
- Add Docker build configuration with npm overrides for matrix-sdk
- Update port from 3317 to 3318 to avoid conflict with Zitare bot
- Add tsconfig.build.json for production builds
- Add clock-bot service to docker-compose.macmini.yml
- Bot supports timers, alarms, and world clocks via Matrix chat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:04:45 +01:00
Till-JS
9a7afea7fe fix(auth): use object syntax for global prefix excludes
Use { path, method } syntax for NestJS global prefix excludes to ensure
OIDC routes (.well-known/*, api/oidc/*) are properly excluded from the
/api/v1 prefix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:52:27 +01:00
Till-JS
00d28bc522 feat(auth): add OIDC Controller for Matrix SSO endpoints
- Add OidcController to expose Better Auth OIDC Provider endpoints
- Add handleOidcRequest method to BetterAuthService
- Exclude OIDC routes from global /api/v1 prefix
- Register OidcController in AuthModule

Endpoints:
- GET /.well-known/openid-configuration
- GET /api/oidc/authorize
- POST /api/oidc/token
- GET /api/oidc/userinfo
- GET /api/oidc/jwks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:49:26 +01:00
Till-JS
577b96156c 🔧 chore: update pnpm-lock.yaml for matrix-zitare-bot 2026-01-28 16:46:58 +01:00
Till-JS
a532790d99 feat(matrix-zitare-bot): add Matrix bot for daily inspiration quotes
Features:
- Random quotes and daily quote of the day
- 10 categories (motivation, wisdom, love, life, success, etc.)
- Search functionality
- Login integration with Zitare backend
- Favorites and lists management
- Voice note transcription via mana-stt
- Natural language command support (German/English)
2026-01-28 16:45:11 +01:00
Till-JS
29595a9d3d chore(matrix): add SYNAPSE_OIDC_CLIENT_SECRET env var
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:43:21 +01:00
Till-JS
158aaf7e67 feat(auth): add OIDC Provider for Matrix SSO integration
- Add OIDC Provider plugin to Better Auth configuration
- Add OIDC database tables (oauth_applications, oauth_access_tokens,
  oauth_authorization_codes, oauth_consents)
- Configure Synapse as OIDC client in homeserver.yaml
- Update Element Web config for SSO support
- Add seed script for OIDC clients (db:seed:oidc)
- Update Cloudflare tunnel config with Matrix URLs

This enables Single Sign-On between Mana Core Auth and Matrix/Synapse,
allowing users to authenticate via their existing Mana account.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:40:33 +01:00
Till-JS
dbd14f7134 feat(matrix-clock-bot): add Matrix bot for time tracking
Features:
- Timer commands: !timer 25m, !stop, !resume, !reset, !status
- Alarm commands: !alarm 07:30, !alarms
- World clock: !zeit, !weltuhr Berlin, !weltuhren
- Voice note support via mana-stt transcription
- Natural language parsing for German time formats
2026-01-28 16:27:49 +01:00
Till-JS
bd10762107 🙈 chore: add Python and ML model files to gitignore 2026-01-28 16:15:01 +01:00
Till-JS
1f5df44cb0 🙈 chore(matrix-nutriphi-bot): add dockerignore 2026-01-28 16:13:32 +01:00
Till-JS
1e9169cb94 📝 docs(landing): add devlog for telegram/matrix bots integration 2026-01-28 16:13:24 +01:00
Till-JS
ff427b1625 📝 docs(todo): update commit hash in cleanup plan 2026-01-28 16:13:15 +01:00
Till-JS
3b9d99ccd9 feat(matrix-bots): add voice note transcription via mana-stt
- Switch matrix-project-doc-bot from OpenAI Whisper to local mana-stt
- Add voice note support to matrix-nutriphi-bot (auto-analyze meals)
- Add voice note support to matrix-todo-bot (create todos via voice)
- All bots now use STT_URL config for the mana-stt service (port 3020)
2026-01-28 16:10:20 +01:00
Till-JS
57b9d4cb37 feat(matrix-nutriphi-bot): add Matrix bot for nutrition tracking
- NestJS bot with matrix-bot-sdk integration
- Commands: !help, !login, !analyze, !today, !week, !goals, !favorites, !tips
- Integrates with NutriPhi backend API (port 3023)
- User session management with JWT authentication
- Image analysis via Gemini AI (NutriPhi backend)
- Port 3316

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:57:49 +01:00
Till-JS
111fc473d9 🐛 fix(auth): implement password reset email link handler
- Add GET /api/auth/reset-password/:token endpoint to handle email links
- Create password-reset-redirect store to track source app URLs
- Include callbackURL in reset emails for proper app redirection
- Add redirectTo parameter to forgotPassword in shared-auth
- Create /reset-password page in calendar app with DE/EN translations
- Update calendar authStore with resetPasswordWithToken method

Fixes 404 error when clicking password reset link from email
2026-01-28 15:49:33 +01:00