Files
breakpilot-core/admin-core/lib/navigation.ts
Benjamin Admin 5fe2617857
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 29s
CI / test-python-voice (push) Successful in 27s
CI / test-bqas (push) Successful in 29s
CI / nodejs-lint (push) Has been skipped
refactor: Unified Inbox aus Core entfernt (nach Lehrer migriert)
- Mail-Seite, API-Route, Kommunikation-Kategorie entfernt
- Screen-Flow: Mail-Node und Kommunikation-Legende entfernt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:05:48 +01:00

168 lines
4.9 KiB
TypeScript

/**
* Navigation Structure for Admin Core
*
* 3 Categories: Communication, Infrastructure, Development
*/
export type CategoryId = 'infrastructure' | 'development'
export interface NavModule {
id: string
name: string
href: string
description: string
purpose: string
audience: string[]
subgroup?: string
}
export interface NavCategory {
id: CategoryId
name: string
icon: string
color: string
colorClass: string
description: string
modules: NavModule[]
}
export const navigation: NavCategory[] = [
// =========================================================================
// Infrastruktur & DevOps (Orange)
// =========================================================================
{
id: 'infrastructure',
name: 'Infrastruktur',
icon: 'server',
color: '#f97316',
colorClass: 'infrastructure',
description: 'GPU, Security, CI/CD & Monitoring',
modules: [
{
id: 'gpu',
name: 'GPU Infrastruktur',
href: '/infrastructure/gpu',
description: 'vast.ai GPU Management',
purpose: 'GPU-Instanzen auf vast.ai fuer ML-Training und Inferenz verwalten.',
audience: ['DevOps', 'Entwickler'],
subgroup: 'Compute',
},
{
id: 'middleware',
name: 'Middleware',
href: '/infrastructure/middleware',
description: 'Rate Limiting, IP Whitelist/Blacklist',
purpose: 'Middleware-Stack und API Gateway ueberwachen und konfigurieren.',
audience: ['DevOps'],
subgroup: 'Netzwerk',
},
{
id: 'security',
name: 'Security Dashboard',
href: '/infrastructure/security',
description: 'DevSecOps & Vulnerability Scans',
purpose: 'Security-Scans, Vulnerability-Reports und OWASP-Compliance.',
audience: ['DevOps', 'Security'],
subgroup: 'DevOps Pipeline',
},
{
id: 'sbom',
name: 'SBOM',
href: '/infrastructure/sbom',
description: 'Software Bill of Materials',
purpose: 'Software-Abhaengigkeiten und deren Lizenzen verwalten.',
audience: ['DevOps', 'Compliance'],
subgroup: 'DevOps Pipeline',
},
{
id: 'ci-cd',
name: 'CI/CD Dashboard',
href: '/infrastructure/ci-cd',
description: 'Gitea & Woodpecker Pipelines',
purpose: 'CI/CD Dashboard mit Pipelines, Deployment-Status und Container-Management.',
audience: ['DevOps', 'Entwickler'],
subgroup: 'DevOps Pipeline',
},
{
id: 'tests',
name: 'Test Dashboard',
href: '/infrastructure/tests',
description: '280+ Tests aus allen Services',
purpose: 'Zentrales Dashboard fuer alle Tests. Unit, Integration, E2E und Quality Tests.',
audience: ['Entwickler', 'QA', 'DevOps'],
subgroup: 'DevOps Pipeline',
},
],
},
// =========================================================================
// Entwicklung (Slate)
// =========================================================================
{
id: 'development',
name: 'Entwicklung',
icon: 'code',
color: '#64748b',
colorClass: 'development',
description: 'Docs, Screen Flow & Brandbook',
modules: [
{
id: 'docs',
name: 'Developer Docs',
href: '/development/docs',
description: 'MkDocs Dokumentation',
purpose: 'API-Dokumentation und Architektur-Diagramme durchsuchen.',
audience: ['Entwickler'],
},
{
id: 'screen-flow',
name: 'Screen Flow',
href: '/development/screen-flow',
description: 'UI Screen-Verbindungen',
purpose: 'Navigation und Screen-Verbindungen der Core-App visualisieren.',
audience: ['Designer', 'Entwickler'],
},
{
id: 'brandbook',
name: 'Brandbook',
href: '/development/brandbook',
description: 'Corporate Design',
purpose: 'Referenz fuer Logos, Farben, Typografie und Design-Richtlinien.',
audience: ['Designer', 'Marketing'],
},
],
},
]
// Meta modules (always visible)
export const metaModules: NavModule[] = [
{
id: 'dashboard',
name: 'Dashboard',
href: '/dashboard',
description: 'Uebersicht & Statistiken',
purpose: 'Zentrale Uebersicht ueber alle Core-Systeme.',
audience: ['Alle'],
},
]
// 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]
}