Files
breakpilot-core/admin-core/lib/navigation.ts
Benjamin Admin fe9a9c2df2
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-consent (push) Successful in 29s
CI / test-python-voice (push) Successful in 31s
CI / test-bqas (push) Successful in 28s
refactor: Entwicklung-Kategorie aus Core Admin entfernt
Screen Flow, Brandbook und Developer Docs waren veraltet und werden nicht mehr benoetigt.

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

131 lines
3.7 KiB
TypeScript

/**
* Navigation Structure for Admin Core
*
* 3 Categories: Communication, Infrastructure, Development
*/
export type CategoryId = 'infrastructure'
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',
},
],
},
]
// 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]
}