Files
breakpilot-compliance/admin-compliance/lib/navigation.ts
Benjamin Admin b298cc55d0
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 35s
CI / test-python-backend-compliance (push) Successful in 40s
CI / test-python-document-crawler (push) Successful in 22s
CI / test-python-dsms-gateway (push) Successful in 22s
fix: Sidebar — OCR-Labeling entfernt (nur im Lehrer Admin noetig)
OCR-Labeling ist bereits im Core Admin (macmini:3002/ai/ocr-pipeline)
vorhanden und wird im Compliance Dashboard nicht benoetigt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:14:37 +01:00

246 lines
8.9 KiB
TypeScript

/**
* Navigation Structure for Admin v2
*
* Main categories with color-coded modules.
* All DSGVO and Compliance modules are now consolidated under the SDK.
*/
export type CategoryId = 'ai' | 'sdk-docs'
export interface NavModule {
id: string
name: string
href: string
description: string
purpose: string
audience: string[]
gdprArticles?: string[]
oldAdminPath?: string // Reference to old admin for migration
subgroup?: string // Optional subgroup for visual grouping in sidebar
}
export interface NavCategory {
id: CategoryId
name: string
icon: string
color: string
colorClass: string
description: string
modules: NavModule[]
}
export const navigation: NavCategory[] = [
// =========================================================================
// KI & Automatisierung
// =========================================================================
{
id: 'ai',
name: 'KI & Automatisierung',
icon: 'brain',
color: '#14b8a6', // Teal
colorClass: 'ai',
description: 'LLM, OCR, RAG & Machine Learning',
modules: [
// -----------------------------------------------------------------------
// KI-Daten-Pipeline: Indexierung -> Suche
// -----------------------------------------------------------------------
{
id: 'rag-pipeline',
name: 'RAG Pipeline',
href: '/ai/rag-pipeline',
description: 'Dokument-Indexierung',
purpose: 'RAG-Pipeline fuer Bildungsdokumente: NiBiS Erwartungshorizonte, Schulordnungen, Custom EH. OCR, Chunking und Vektor-Indexierung in Qdrant.',
audience: ['Entwickler', 'Data Scientists', 'Bildungs-Admins'],
oldAdminPath: '/admin/training',
subgroup: 'KI-Daten-Pipeline',
},
{
id: 'rag',
name: 'Daten & RAG',
href: '/ai/rag',
description: 'Vektor-Suche & Collections',
purpose: 'Verwalten und durchsuchen Sie indexierte Dokumente. Zeigt Status aller Qdrant Collections und ermoeglicht semantische Suche.',
audience: ['Entwickler', 'Data Scientists', 'Compliance Officer'],
oldAdminPath: '/admin/rag',
subgroup: 'KI-Daten-Pipeline',
},
// -----------------------------------------------------------------------
// KI-Werkzeuge: Standalone-Tools fuer Entwicklung & QA
// -----------------------------------------------------------------------
{
id: 'llm-compare',
name: 'LLM Vergleich',
href: '/ai/llm-compare',
description: 'KI-Provider Vergleich',
purpose: 'Vergleichen Sie verschiedene LLM-Anbieter (Ollama, OpenAI, Anthropic) hinsichtlich Qualitaet, Geschwindigkeit und Kosten. Standalone-Werkzeug fuer Modell-Evaluation.',
audience: ['Entwickler', 'Data Scientists'],
oldAdminPath: '/admin/llm-compare',
subgroup: 'KI-Werkzeuge',
},
{
id: 'ocr-compare',
name: 'OCR Vergleich',
href: '/ai/ocr-compare',
description: 'OCR-Methoden & Vokabel-Extraktion',
purpose: 'Vergleichen Sie verschiedene OCR-Methoden (lokales LLM, Vision LLM, PaddleOCR, Tesseract, Anthropic) fuer Vokabel-Extraktion. Grid-Overlay, Block-Review und LLM-Vergleich.',
audience: ['Entwickler', 'Data Scientists', 'Lehrer'],
subgroup: 'KI-Werkzeuge',
},
{
id: 'test-quality',
name: 'Test Quality (BQAS)',
href: '/ai/test-quality',
description: 'Golden Suite, RAG & Synthetic Tests',
purpose: 'BQAS Dashboard mit Golden Suite (97 Referenz-Tests), RAG/Korrektur Tests und Synthetic Test Generierung. Ueberwacht die Qualitaet der KI-Ausgaben.',
audience: ['Entwickler', 'Data Scientists', 'QA'],
oldAdminPath: '/admin/quality',
subgroup: 'KI-Werkzeuge',
},
// -----------------------------------------------------------------------
// KI-Anwendungen: Endnutzer-orientierte KI-Module
// -----------------------------------------------------------------------
{
id: 'agents',
name: 'Agent Management',
href: '/ai/agents',
description: 'Multi-Agent System & SOUL-Editor',
purpose: 'Verwaltung des Multi-Agent-Systems. Bearbeiten Sie Agent-Persoenlichkeiten (SOUL-Files), ueberwachen Sie Sessions und analysieren Sie Agent-Statistiken. Architektur-Dokumentation fuer Entwickler.',
audience: ['Entwickler', 'Lehrer', 'Admins'],
subgroup: 'KI-Anwendungen',
},
],
},
// =========================================================================
// SDK Dokumentation
// =========================================================================
{
id: 'sdk-docs',
name: 'SDK Dokumentation',
icon: 'code-2',
color: '#06b6d4', // Cyan
colorClass: 'sdk-docs',
description: 'Consent SDK Dokumentation & Integration',
modules: [
{
id: 'consent-sdk',
name: 'Consent SDK',
href: '/developers/sdk/consent',
description: 'DSGVO/TTDSG-konformes Consent Management',
purpose: 'Vollstaendige Dokumentation des Consent SDK fuer Web, PWA und Mobile Apps. Inklusive Framework-Integrationen (React, Vue, Angular) und Mobile SDKs (iOS, Android, Flutter).',
audience: ['Entwickler', 'Frontend-Entwickler', 'Mobile-Entwickler'],
gdprArticles: ['Art. 6', 'Art. 7', 'Art. 13', 'Art. 14', 'Art. 17', 'Art. 20'],
},
{
id: 'sdk-installation',
name: 'Installation',
href: '/developers/sdk/consent/installation',
description: 'SDK Installation & Setup',
purpose: 'Schritt-fuer-Schritt Anleitung zur Installation des Consent SDK in verschiedenen Umgebungen.',
audience: ['Entwickler'],
},
{
id: 'sdk-frameworks',
name: 'Frameworks',
href: '/developers/sdk/consent/frameworks',
description: 'React, Vue, Angular Integration',
purpose: 'Framework-spezifische Integrationen mit Hooks, Composables und Services.',
audience: ['Frontend-Entwickler'],
},
{
id: 'sdk-mobile',
name: 'Mobile SDKs',
href: '/developers/sdk/consent/mobile',
description: 'iOS, Android, Flutter',
purpose: 'Native Mobile SDKs fuer iOS (Swift), Android (Kotlin) und Flutter (Dart).',
audience: ['Mobile-Entwickler'],
},
{
id: 'sdk-api',
name: 'API Referenz',
href: '/developers/sdk/consent/api-reference',
description: 'Vollstaendige API-Dokumentation',
purpose: 'Detaillierte Dokumentation aller Methoden, Konfigurationsoptionen und Events.',
audience: ['Entwickler'],
},
{
id: 'sdk-security',
name: 'Sicherheit',
href: '/developers/sdk/consent/security',
description: 'Security Best Practices',
purpose: 'Sicherheits-Features, DSGVO/TTDSG Compliance-Hinweise und Best Practices.',
audience: ['Entwickler', 'DSB', 'Security'],
gdprArticles: ['Art. 6', 'Art. 7', '§ 25 TTDSG'],
},
],
},
]
// Meta modules (always visible)
export const metaModules: NavModule[] = [
{
id: 'dashboard',
name: 'Dashboard',
href: '/dashboard',
description: 'Uebersicht & Statistiken',
purpose: 'Zentrale Uebersicht ueber alle Systeme mit wichtigen Kennzahlen.',
audience: ['Alle'],
oldAdminPath: '/admin',
},
{
id: 'architecture',
name: 'Architektur',
href: '/architecture',
description: 'Backend-Module & Datenfluss',
purpose: 'Uebersicht aller Backend-Module und deren Verbindung zum Frontend. Essentiell fuer Migration und Audit.',
audience: ['Entwickler', 'DevOps', 'Auditoren', 'Manager'],
},
{
id: 'onboarding',
name: 'Onboarding',
href: '/onboarding',
description: 'Lern-Wizards',
purpose: 'Gefuehrte Tutorials fuer neue Benutzer.',
audience: ['Alle'],
oldAdminPath: '/admin/onboarding',
},
{
id: 'backlog',
name: 'Production Backlog',
href: '/backlog',
description: 'Go-Live Checkliste',
purpose: 'Verfolgen Sie den Fortschritt zum Production-Launch.',
audience: ['Entwickler', 'Manager'],
oldAdminPath: '/admin/backlog',
},
{
id: 'rbac',
name: 'RBAC',
href: '/rbac',
description: 'Rollen & Berechtigungen',
purpose: 'Verwalten Sie Benutzerrollen und Zugriffsrechte.',
audience: ['Admins', 'DSB'],
oldAdminPath: '/admin/rbac',
},
]
// Helper function to get category by ID
export function getCategoryById(id: CategoryId): NavCategory | undefined {
return navigation.find(cat => cat.id === id)
}
// Helper function to get module by href
export function getModuleByHref(href: string): { category: NavCategory; module: NavModule } | undefined {
for (const category of navigation) {
const module = category.modules.find(m => m.href === href)
if (module) {
return { category, module }
}
}
return undefined
}
// Helper function to get all modules flat
export function getAllModules(): NavModule[] {
return [...navigation.flatMap(cat => cat.modules), ...metaModules]
}