'use client' import type { ArchitectureContext as ArchitectureContextType } from './types' interface ArchitectureContextProps { context: ArchitectureContextType currentStep?: string highlightedComponents?: string[] } const LAYER_CONFIG = { frontend: { label: 'Frontend', color: 'blue', icon: '🖥️' }, api: { label: 'API', color: 'purple', icon: '🔌' }, service: { label: 'Service', color: 'green', icon: '⚙️' }, database: { label: 'Datenbank', color: 'orange', icon: '🗄️' }, } export function ArchitectureContext({ context, currentStep, highlightedComponents = [] }: ArchitectureContextProps) { const layerConfig = LAYER_CONFIG[context.layer] return (

🏗️ Architektur-Kontext{currentStep && `: ${currentStep}`}

{/* Data Flow Visualization */}
{context.dataFlow.map((component, index) => { const isHighlighted = highlightedComponents.includes(component.toLowerCase()) const isCurrentLayer = component.toLowerCase().includes(context.layer) return (
{component} {isCurrentLayer && ( ← Sie sind hier )}
{index < context.dataFlow.length - 1 && ( )}
) })}
{/* Layer Info */}
Aktuelle Schicht
{layerConfig.icon} {layerConfig.label}
Beteiligte Services
{context.services.map((service) => ( {service} ))}
{/* Dependencies */} {context.dependencies.length > 0 && (
Abhaengigkeiten
{context.dependencies.map((dep) => ( {dep} ))}
)}
) }