Commit graph

1691 commits

Author SHA1 Message Date
Till JS
56ffcbac39 feat: add Ollama memory optimization, LLM metrics, and chat streaming
Three improvements to the unified LLM infrastructure:

1. Ollama memory optimization (scripts/mac-mini/configure-ollama.sh):
   - OLLAMA_KEEP_ALIVE=5m → models unload after 5min idle (saves 3-16GB RAM)
   - OLLAMA_NUM_PARALLEL=1 → predictable memory usage
   - OLLAMA_MAX_LOADED_MODELS=1 → max 1 model in RAM at a time

2. Request-level metrics in @manacore/shared-llm:
   - LlmRequestMetrics interface (model, latency, tokens, fallback detection)
   - LlmMetricsCollector class with summary stats (for health endpoints)
   - Optional onMetrics callback in LlmModuleOptions
   - Automatic metrics emission in chatMessages() (success + error)

3. Chat streaming (token-by-token SSE):
   - Backend: POST /chat/completions/stream SSE endpoint
   - OllamaService.createStreamingCompletion() via llm.chatStreamMessages()
   - ChatService.createStreamingCompletion() with upfront credit consumption
   - Web: chatApi.createStreamingCompletion() SSE consumer
   - Chat store: sendMessage() now streams tokens into assistant message
   - UI updates reactively as each token arrives

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 09:41:33 +01:00
Till JS
ecda4535d8 feat: add right-click context menus to calendar agenda, chat, contacts, and storage
- Calendar AgendaView: edit, duplicate, delete events (reuses WeekView i18n)
- Chat ConversationList: rename, archive, delete conversations
- Contacts ContactGridView: open, favorite, call, email, delete
- Storage FileCard: replace custom dropdown with shared ContextMenu

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:51:07 +01:00
Till JS
45063b88be feat(mana-llm): add Google Gemini fallback provider with auto-routing
Add Google Gemini as a fallback provider that activates automatically
when Ollama is overloaded or unavailable, ensuring LLM requests always
succeed even under load.

New provider (src/providers/google.py):
- Full LLMProvider implementation using google-genai SDK
- Chat completions (streaming + non-streaming)
- Vision/multimodal support (base64 images)
- Embeddings via text-embedding-004
- Model mapping: Ollama models → Gemini equivalents
  (gemma3:4b → gemini-2.0-flash, llava:7b → gemini-2.0-flash, etc.)

Auto-fallback routing (src/providers/router.py):
- Concurrent request tracking for Ollama (OLLAMA_MAX_CONCURRENT=3)
- When Ollama concurrent > max: route to Google automatically
- When Ollama fails: retry on Google with model mapping
- Health check caching (5s TTL) to avoid hammering Ollama
- Non-Ollama providers (openrouter, groq, together) are never fallback-routed
- Fallback info included in /health endpoint response

New config (src/config.py):
- GOOGLE_API_KEY: enables Google provider
- GOOGLE_DEFAULT_MODEL: default gemini-2.0-flash
- AUTO_FALLBACK_ENABLED: toggle fallback (default: true)
- OLLAMA_MAX_CONCURRENT: concurrent request threshold (default: 3)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:44:09 +01:00
Till JS
28286d126c feat: add right-click context menus to presi, manadeck, photos, and zitare
Use shared ContextMenu component across 4 more apps:
- Presi: open/delete decks
- ManaDeck: open/delete decks
- Photos: view/favorite/delete photos, open/delete albums
- Zitare: remove favorite, copy/share quotes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:34:57 +01:00
Till JS
421ef55457 feat(manacore): implement mukke, presi, and context dashboard widgets
Add the 3 missing widget components that were registered but not implemented:

- MukkeLibraryWidget: shows library stats (songs, playlists, favorites),
  recent songs with artist/duration
- PresiDecksWidget: shows recent presentations with public/private
  indicator, descriptions, and update dates
- ContextDocsWidget: shows recent documents grouped by type (text,
  context, prompt) with space names, falls back to space list

All widgets follow the established pattern: APP_URLS for links,
WidgetSkeleton/WidgetError for loading/error, auto-retry on failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:34:56 +01:00
Till JS
7f7c6e6fde fix(manacore): replace hardcoded localhost URLs with APP_URLS in all widgets
All 6 remaining widgets now use APP_URLS from shared-branding for
dev/prod-aware URL resolution instead of hardcoded localhost ports:
- CalendarEventsWidget → APP_URLS.calendar
- ChatRecentWidget → APP_URLS.chat
- ClockTimersWidget → APP_URLS.clock
- ManadeckProgressWidget → APP_URLS.manadeck
- PictureRecentWidget → APP_URLS.picture
- StorageUsageWidget → APP_URLS.storage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:09:24 +01:00
Till JS
e2f144962c feat: add unified @manacore/shared-llm package and migrate all backends
Create a shared LLM client package that provides a unified interface
to the mana-llm service, replacing 9 individual fetch-based integrations
with consistent error handling, retry logic, and JSON extraction.

Package (@manacore/shared-llm):
- LlmModule with forRoot/forRootAsync (NestJS dynamic module)
- LlmClientService: chat, json, vision, visionJson, embed, stream
- LlmClient standalone class for non-NestJS consumers
- extractJson utility (consolidates 3 markdown-stripping implementations)
- retryFetch with exponential backoff (429, 5xx, network errors)
- 44 unit tests (json-extractor, retry, llm-client)

Migrated backends:
- mana-core-auth: raw fetch → llm.json()
- planta: raw fetch + vision → llm.visionJson()
- nutriphi: raw fetch + regex → llm.visionJson() + llm.json()
- chat: custom OllamaService (175 LOC) → llm.chatMessages()
- context: raw fetch → llm.chat() (keeps token tracking)
- traces: 2x raw fetch → llm.chat()
- manadeck: @google/genai SDK → llm.json() + llm.visionJson()
- bot-services: raw Ollama API → LlmClient standalone
- matrix-ollama-bot: raw fetch → llm.chatMessages() + llm.vision()

New credit operations:
- AI_PLANT_ANALYSIS (2 credits, planta)
- AI_GUIDE_GENERATION (5 credits, traces)
- AI_CONTEXT_GENERATION (2 credits, context)
- AI_BOT_CHAT (0.1 credits, matrix)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:06:30 +01:00
Till JS
e7bf58c5b6 feat(calendar-web): add right-click context menu to events in week view
Use shared ContextMenu component on EventCard for quick actions:
edit, duplicate, and delete. Includes i18n for all 5 languages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:02:46 +01:00
Till JS
250e0b20af feat: add onboarding to 6 new apps and feature intro step to all 16 apps
Add onboarding with feature overview, preference selection, and tips to
Zitare, Mukke, Photos, Planta, SkillTree, and Questions. Insert a new
first "features" info step into all 10 existing onboarding flows so every
app now starts with a core-features overview page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:58:14 +01:00
Till JS
89ca3b0454 fix(manacore): update todo service test mock to match new Task type
Update mockTask to use labels/subtasks instead of removed labelIds field.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:57:52 +01:00
Till JS
0893e47ad3 feat(todo-web): add right-click context menu to task list
Use shared ContextMenu component for quick actions: edit, toggle
complete, change priority, move to project, and delete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:56:58 +01:00
Till JS
3b883af064 feat(manacore): improve todo dashboard widgets and fix port mismatch
- Fix todo dev port in APP_URLS (5188, was swapped with inventory 5189)
- Use APP_URLS for all links instead of hardcoded localhost ports
- TasksTodayWidget: add priority dots, subtask progress, label tags,
  completed/total counter, clickable task links
- TasksUpcomingWidget: add priority dots, label tags, overdue/today
  date highlighting with colored badges, clickable task links
- Extend Task type with labels and subtasks for richer widget display

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:48:29 +01:00
Till JS
cb18384905 fix(contacts-web): add spiral-db to Dockerfile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:28:23 +01:00
Till JS
ff419f069a feat: add QuickInputBar to 6 more apps (mukke, matrix, manadeck, planta, photos, presi)
- Mukke: search songs by title/artist/album via libraryStore
- Matrix: search rooms/contacts, select navigates to chat
- ManaDeck: search decks by title/description
- Planta: search plants by name/species via plantsApi
- Photos: search albums and tags
- Presi: search presentation decks

All with locale-aware syntax highlighting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:25:51 +01:00
Till JS
49457c354a feat(todo-web): auto-save task edits, remove save/cancel buttons
Changes in the expanded inline task editor are now saved automatically
with a 500ms debounce. Removes the need to manually click "Speichern".
The delete button remains for intentional destructive actions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:24:00 +01:00
Till JS
ee3e815f1d fix(contacts-web): add shared-app-onboarding to Dockerfile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:19:20 +01:00
Till JS
08a7d2a097 fix(todo-web): clean up list design and make onboarding tip dismissable
- Remove spiral binding holes (ring elements) from notepad container
- Remove vertical red margin line from left side
- Add X close button to onboarding tip so users can dismiss it

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:19:14 +01:00
Till JS
dc372ee744 fix(contacts-web): add shared-pwa package to Dockerfile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:07:20 +01:00
Till JS
436e92c560 feat: unify QuickInputBar across all apps with locale + deferSearch
- Add `locale` prop to all 6 apps using QuickInputBar
  (todo, contacts, zitare, citycorners, questions, calendar)
- Enable `deferSearch` on apps with create flow
  (contacts, zitare, questions) to match todo behavior
- Pass locale through Calendar's UnifiedBar wrapper
- Questions: default to 'en' locale (English-first app)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:06:58 +01:00
Till JS
534b55b566 test(todo-web): add tests for unified TaskFilters and viewStore filter state
- Extract applyTaskFilters as pure utility function for testability
- Add 21 tests for task filtering (priority, project, labels, search, combined)
- Add 13 tests for viewStore filter methods (setters, clearFilters, reset)
- All 87 tests passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:04:21 +01:00
Till JS
c1ca93b2f1 fix(contacts-web): add patches dir to Dockerfile for pnpm install
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:04:06 +01:00
Till JS
9edd1c6e2e feat(shared-ui): locale-aware highlighting + success feedback for InputBar
1. Extract hardcoded German highlight patterns into locale-specific sets
   (de, en, fr, it, es). InputBar accepts `locale` or custom
   `highlightPatterns` prop, defaulting to German for backward compat.

2. Add visual success feedback after creating: input bar flashes green
   with a checkmark icon for 1.2s, confirming the action was successful.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:55:31 +01:00
Till JS
45db42720c fix(todo): pixel-perfect skeleton loaders, PillNav tab group, and SSR head fix
- Rewrite TaskListSkeleton to match notepad design (spiral holes, red margin line, cream background)
- Rewrite TaskItemSkeleton as flat rows with border-bottom instead of card style
- Rewrite KanbanColumnSkeleton with glassmorphism and pill-shaped task cards
- Update KanbanBoardSkeleton with matching border-radius and dark mode support
- Group navigation pills (Liste/Kanban/Tags) into PillTabGroup for clear UX distinction from toggle pills (Filter)
- Add Phosphor icon support to PillTabGroup component
- Fix %sveltekit.head% appearing as literal text in production by removing duplicate placeholder from HTML comment
- Disable PWA service worker in dev mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:51:41 +01:00
Till JS
f5842ea50e refactor(todo-web): unify FilterStrip and KanbanFilters into TaskFilters
Replace two separate filter components with a single TaskFilters component
that supports both layouts via a variant prop ("strip" for bottom pill bar,
"bar" for inline kanban-style). Fixes a bug where FilterStrip's priority
and project filters were dead local state that never actually filtered tasks.

- Add filter state (priorities, project, labels, search) to viewStore
- Apply filters to all derived task lists in the list view
- Delete FilterStrip.svelte and KanbanFilters.svelte

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:48:34 +01:00
Till JS
e00e6ee8b7 feat(shared-ui): add deferred search mode to QuickInputBar
Instead of auto-searching on every keystroke (causing flickering loader),
show two static options: "create task" and "search". Search only runs
when explicitly selected, reducing API calls and improving UX.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:48:01 +01:00
Till JS
92adabc8e2 feat(todo,contacts): add TagStrip above PillNav, unified with Calendar design
Add horizontal glass-morphism tag filter strip to Todo and Contacts apps,
matching the existing Calendar TagStrip pattern. Includes TagStripModal for
inline tag search/create/edit/delete. Contacts app gets a centralized
tagsStore replacing multiple independent tag-loading calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:47:41 +01:00
Till JS
1075e811f2 feat(todo-web): show QuickInputBar only on list and kanban views
Hide the task input bar on non-task pages (settings, mana, tags, etc.)
where creating tasks doesn't make contextual sense.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:39:26 +01:00
Till JS
97d6787d40 feat(todo-web): redesign task list as physical notepad
Adds notepad container with cream paper background, spiral binding holes,
red margin line, and lined rows instead of card-style task items.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:16:40 +01:00
Till JS
43131986a9 fix(landing-builder): change prod port to 3050 (3030 used by chat)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:51:51 +01:00
Till JS
c78809834c fix(landing-builder): rework Dockerfile to copy workspace directly
Replace pnpm deploy with direct workspace copy approach since pnpm
deploy doesn't work well with workspace:* dependencies in partial copies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:50:22 +01:00
Till JS
9d4b59fcf8 docs(devlog): rewrite morning session devlog with all 61 commits
Comprehensive devlog covering Manalink deployment, CityCorners features,
Spiral-DB stabilization, auth migration, legacy cleanup, observability,
Mukke redesign, and landing page builder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:29:38 +01:00
Till JS
060eb01de7 fix(landing-builder): simplify Dockerfile COPY steps
Remove non-existent node_modules COPY for hoisted packages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:22:00 +01:00
Till JS
994f03c423 fix(landing-builder): add patches dir to Dockerfile for pnpm install
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:21:21 +01:00
Till JS
d29348d906 docs: add devlog for morning session + update guidelines to session-based
Switch devlog convention from daily to session-based (vormittag/abend).
Add devlog for Manalink prod-readiness work and deployment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:20:40 +01:00
Till JS
df0b849408 feat: add org landing page builder service
New service that generates static Astro landing pages for organizations
and deploys them to Cloudflare Pages at {slug}.mana.how.

Components:
- Landing Builder Service (NestJS, port 3030) with Astro template
- Admin UI in Manacore web dashboard at /organizations/[id]/landing
- TeamSection + ContactSection for shared-landing-ui
- Two org themes (classic dark, warm light)
- LandingPageConfig types in shared-types
- Docker + CI/CD integration for Mac Mini deployment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:20:10 +01:00
Till JS
da6dd4ecb8 chore: remove presi mobile app, update outdated mobile docs
- Delete apps/presi/apps/mobile/ (outdated Firebase-based, web app is primary)
- Update presi CLAUDE.md: remove mobile references, fix landing page status
- Update manadeck mobile CLAUDE.md: replace Supabase refs with Mana Core Auth
- Fix picture mobile: pin nativewind version, add shared-logger dependency
- Remove dev:presi:mobile script and env generation config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:16:29 +01:00
Till JS
efcb18a98f refactor(auth): standardize mobile auth return format to { success, error }
Align mobile AuthProviders (chat, manacore) with web auth stores:
- Replace { error: { message } | null } with { success: boolean, error?: string }
- Add needsVerification support to signUp return type
- Update all consumer screens (login, register, reset-password) accordingly

All auth methods across web and mobile now use the same return pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:59:13 +01:00
Till JS
71277ba7aa refactor(manadeck-mobile): migrate from custom auth to @manacore/shared-auth
Replace 900+ lines of custom auth implementation (authService, tokenManager,
deviceManager, safeStorage) with ~280 lines wrapping @manacore/shared-auth.
Auth now goes through mana-core-auth directly instead of manadeck backend.

Backward-compatible API: all consumers (stores, apiClient, hooks) work
without changes thanks to wrapper maintaining the same export interface.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:55:28 +01:00
Till JS
c59eba7285 test(citycorners): add backend test suite (31 tests) and update documentation
Tests: Jest + ts-jest with mock factories. 4 test suites covering LocationService (CRUD, search), FavoriteService (add/remove, conflicts), LocationLookupService (web search, extraction, error handling), LocationController (endpoints, query params).

Docs: Complete CLAUDE.md rewrite with live URLs, all endpoints, web pages, features, environment variables, Docker config, and test overview.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:44:46 +01:00
Till JS
79207bf43f fix(matrix): strip react-native patches in Dockerfile before pnpm install
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:33:36 +01:00
Till JS
34adf50a8e fix(matrix): add eslint-config to Dockerfile, revert to explicit package copies
Copying all packages pulled in Astro deps that need git. Back to
explicit copies with eslint-config added.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:32:38 +01:00
Till JS
e0f7e325e0 fix(matrix): copy all packages dir in Dockerfile to fix workspace resolution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:31:42 +01:00
Till JS
c1d390b7ec fix(matrix): add patches dir to Dockerfile for pnpm install
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:27:23 +01:00
Till JS
0f93496364 feat(citycorners): add web lookup for new locations via mana-search
Backend: GET /locations/lookup?q= endpoint that searches via mana-search, extracts content from top results, auto-detects address and category, returns pre-filled data with source links.

Frontend: /add page now has a two-step flow:
1. Search step: user enters a place name, backend scrapes the web
2. Edit step: form pre-filled with found data (name, description, address, category), user can review/edit before submitting. Shows source links.

Also fixed all API paths to use /api/v1/ prefix via centralized api() helper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:23:24 +01:00
Till JS
416e031f69 feat(matrix): add tests, E2EE warning, and dynamic homeserver config
- Make SSO loginToken homeserver configurable via VITE_MATRIX_HOMESERVER
- Add vitest setup with 14 unit tests for Matrix client functions
  (discoverHomeserver, checkHomeserver, loginWithToken)
- Show amber warning banner when E2EE is not available

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:18:07 +01:00
Till JS
a4f52df138 fix(citycorners): add /api/v1/ prefix to all API calls and add location submission form
API paths: Created centralized api() helper in $lib/api.ts. All fetch calls now use /api/v1/ prefix matching the production NestJS route structure.

New feature: /add page where authenticated users can submit new locations with name, category, description, and optional address. Added "Hinzufügen" nav item with plus icon.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:12:56 +01:00
Till JS
241cb3332a refactor(auth): standardize URL resolution and token handling across all web auth stores
Align all 20 web app auth stores to a consistent pattern:
- Use DEV_* constants with import.meta.env.DEV guard (no localhost leak in prod)
- Pass backendUrl to initializeWebAuth for automatic 401 token refresh
- Add redirectTo to forgotPassword for correct post-reset redirect

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:11:52 +01:00
Till JS
f71e7d371b docs: add TODO for rotating leaked API keys from git history
Keys were removed from .env.development but remain in git history.
OpenAI, Gemini, Replicate, and Supabase keys need rotation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:10:53 +01:00
Till JS
b76746229e chore: remove @manacore/shared-supabase package
Package was unused — no imports found across the entire codebase.
All apps have migrated to direct PostgreSQL (Drizzle ORM) for backends
and mana-core-auth API for mobile/web clients.

Removes package and all documentation references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:07:14 +01:00
Till JS
5bd967900f refactor(context-mobile): migrate from Supabase to backend API + mana-core-auth
Complete migration of Context mobile app from direct Supabase access
to NestJS backend API with mana-core-auth authentication.

New files:
- context/AuthProvider.tsx: mana-core-auth integration via @manacore/shared-auth
- services/backendApi.ts: Backend API client for spaces, documents, AI, tokens

Rewritten services (same exports, backend implementation):
- supabaseService.ts: Now thin wrapper around backendApi
- aiService.ts: Uses backendApi for auth token
- tokenCountingService.ts: Model prices from backend API
- tokenTransactionService.ts: All token ops via backend API
- revenueCatService.ts: Token balance via backend API

Updated 16 consumer files (auth forms, token components, AI toolbars)

Deleted:
- utils/supabase.ts, context/AuthContext.tsx
- services/spaceService.ts, services/spaceServiceDirect.ts

Dependencies:
- Added: @manacore/shared-auth, expo-secure-store
- Removed: @supabase/supabase-js, @google/generative-ai, openai, @azure/openai

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