managarten/docs/central-services
Till JS 99efb93816 refactor(arcade, shared-ui): migrate CommandBar to GlobalSpotlight, delete CommandBar
CommandBar was a near-duplicate of QuickInputBar's InputBar with the UX
of a Cmd+K modal. Only arcade still used it. Migrate arcade onto the
existing GlobalSpotlight (hosted by PillNavigation) so there is a single
Cmd+K modal across all mana apps, then remove CommandBar entirely.

Arcade changes (games/arcade/apps/web/src/routes/(app)/+layout.svelte):
- Merge commandBarQuickActions into spotlightActions (nav-level items)
- Convert handleCommandBarSearch into a ContentSearcher that returns the
  game list grouped under a single 'Spiele' category
- Drop the standalone Cmd+K handler; PillNavigation + GlobalSpotlight
  handle the shortcut
- Remove the <CommandBar> render; add `contentSearcher` +
  spotlightPlaceholder to <PillNavigation>

shared-ui cleanup:
- Delete packages/shared-ui/src/command-bar/ (CommandBar.svelte,
  CommandBar.types.ts, index.ts)
- Drop CommandBar / CommandBarItem from the public @mana/shared-ui export
- Delete docs/central-services/COMMAND-BAR.md (stale)

No more duplication: highlight + debounce live in search-core, and the
only remaining Cmd+K surface is GlobalSpotlight.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 01:17:55 +02:00
..
HELP.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
README.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
SPLIT-SCREEN.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
TAGS.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
THEMING.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00

Central Services

Dieses Verzeichnis dokumentiert zentrale Services, die von allen Mana-Apps gemeinsam genutzt werden. Diese Services laufen in mana-auth und bieten einheitliche APIs.

Übersicht

Service Beschreibung Dokumentation
Tags Einheitliche Tags/Labels für Todo, Calendar, Contacts TAGS.md
Theming Theme-Varianten, Dark Mode, Accessibility, Custom Themes THEMING.md
Help Zentrale Hilfeseite mit FAQ, Features, Shortcuts, Changelog HELP.md
Command Bar Globale Schnellsuche und Navigation (Cmd/Ctrl+K) COMMAND-BAR.md
Split-Screen Zwei Apps nebeneinander im Browser (iFrame-basiert) SPLIT-SCREEN.md

Architektur-Prinzipien

Zentralisierung

Bestimmte Daten und Funktionen werden zentral in mana-auth verwaltet:

  • User-bezogen: Jeder Service speichert Daten pro User (userId)
  • App-übergreifend: Daten sind in allen Apps verfügbar
  • API-basiert: Zugriff erfolgt über REST-APIs

Soft References

Da die Apps ihre eigenen Datenbanken haben, können keine Foreign Keys zu mana-auth erstellt werden:

Todo-DB                      mana-auth-DB
┌─────────────────┐         ┌─────────────────┐
│ task_to_tags    │         │ tags            │
│                 │         │                 │
│ tag_id ─ ─ ─ ─ ─│─ ─ ─ ─ ▶│ id              │
│ (keine FK)      │         │                 │
└─────────────────┘         └─────────────────┘

Konsequenz: Apps müssen ungültige IDs beim Laden ignorieren.

Shared Packages

Für jeden zentralen Service gibt es ein entsprechendes Client-Package:

Service Package
Tags @mana/shared-tags

Diese Packages enthalten:

  • TypeScript Types
  • API Client Klasse
  • Helper-Funktionen

Lokale Entwicklung

Alle zentralen Services starten

# Infrastruktur
pnpm docker:up

# Auth-Service (enthält alle zentralen APIs)
pnpm dev:auth

Datenbank-Schema pushen

cd services/mana-auth
pnpm db:push

Shared Packages

Package Beschreibung
@mana/shared-tags Tags Client für zentrale Tags API
@mana/shared-theme Theme Store, A11y Store, User Settings
@mana/shared-theme-ui Svelte UI-Komponenten für Theming
@mana/shared-help-types TypeScript-Typen für Help-Inhalte
@mana/shared-help-content Content-Loader, Parser, Merger, Suche
@mana/shared-help-ui Svelte UI-Komponenten für Hilfeseite
@mana/shared-help-mobile React Native Komponenten für Hilfe
@mana/shared-splitscreen Split-Screen Container, Store, Komponenten

Hinzufügen neuer zentraler Services

  1. Schema erstellen: services/mana-auth/src/db/schema/<name>.schema.ts
  2. Module erstellen: services/mana-auth/src/<name>/
  3. In app.module.ts registrieren
  4. Shared Package erstellen: packages/shared-<name>/
  5. Dokumentation schreiben: docs/central-services/<NAME>.md