Phase 1 — Python (klausur-service): 5 monoliths → 36 files - dsfa_corpus_ingestion.py (1,828 LOC → 5 files) - cv_ocr_engines.py (2,102 LOC → 7 files) - cv_layout.py (3,653 LOC → 10 files) - vocab_worksheet_api.py (2,783 LOC → 8 files) - grid_build_core.py (1,958 LOC → 6 files) Phase 2 — Go (edu-search-service, school-service): 8 monoliths → 19 files - staff_crawler.go (1,402 → 4), policy/store.go (1,168 → 3) - policy_handlers.go (700 → 2), repository.go (684 → 2) - search.go (592 → 2), ai_extraction_handlers.go (554 → 2) - seed_data.go (591 → 2), grade_service.go (646 → 2) Phase 3 — TypeScript (admin-lehrer): 45 monoliths → 220+ files - sdk/types.ts (2,108 → 16 domain files) - ai/rag/page.tsx (2,686 → 14 files) - 22 page.tsx files split into _components/ + _hooks/ - 11 component files split into sub-components - 10 SDK data catalogs added to loc-exceptions - Deleted dead backup index_original.ts (4,899 LOC) All original public APIs preserved via re-export facades. Zero new errors: Python imports verified, Go builds clean, TypeScript tsc --noEmit shows only pre-existing errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
193 lines
5.8 KiB
TypeScript
193 lines
5.8 KiB
TypeScript
'use client'
|
|
|
|
import { useState } from 'react'
|
|
import Link from 'next/link'
|
|
import {
|
|
ArrowLeft, Cpu, Brain, MessageSquare, Database,
|
|
Activity, ChevronDown, ChevronRight, GitBranch,
|
|
Layers, FileText, Zap, RefreshCw,
|
|
} from 'lucide-react'
|
|
import {
|
|
OverviewSection,
|
|
AgentTypesSection,
|
|
SoulFilesSection,
|
|
MessageBusSection,
|
|
SharedBrainSection,
|
|
TaskRoutingSection,
|
|
SessionLifecycleSection,
|
|
DatabaseSchemaSection,
|
|
} from './_components'
|
|
import type { Section } from './_components'
|
|
|
|
const SECTIONS: Section[] = [
|
|
{
|
|
id: 'overview',
|
|
title: 'System-Uebersicht',
|
|
icon: <Layers className="w-5 h-5" />,
|
|
content: <OverviewSection />,
|
|
},
|
|
{
|
|
id: 'agents',
|
|
title: 'Agent-Typen',
|
|
icon: <Cpu className="w-5 h-5" />,
|
|
content: <AgentTypesSection />,
|
|
},
|
|
{
|
|
id: 'soul-files',
|
|
title: 'SOUL-Files (Persoenlichkeiten)',
|
|
icon: <FileText className="w-5 h-5" />,
|
|
content: <SoulFilesSection />,
|
|
},
|
|
{
|
|
id: 'message-bus',
|
|
title: 'Message Bus & Kommunikation',
|
|
icon: <MessageSquare className="w-5 h-5" />,
|
|
content: <MessageBusSection />,
|
|
},
|
|
{
|
|
id: 'shared-brain',
|
|
title: 'Shared Brain (Gedaechtnis)',
|
|
icon: <Brain className="w-5 h-5" />,
|
|
content: <SharedBrainSection />,
|
|
},
|
|
{
|
|
id: 'task-routing',
|
|
title: 'Task Routing',
|
|
icon: <Zap className="w-5 h-5" />,
|
|
content: <TaskRoutingSection />,
|
|
},
|
|
{
|
|
id: 'session-lifecycle',
|
|
title: 'Session Lifecycle',
|
|
icon: <RefreshCw className="w-5 h-5" />,
|
|
content: <SessionLifecycleSection />,
|
|
},
|
|
{
|
|
id: 'database',
|
|
title: 'Datenbank-Schema',
|
|
icon: <Database className="w-5 h-5" />,
|
|
content: <DatabaseSchemaSection />,
|
|
},
|
|
]
|
|
|
|
export default function ArchitecturePage() {
|
|
const [expandedSections, setExpandedSections] = useState<string[]>([
|
|
'overview', 'agents', 'soul-files',
|
|
])
|
|
|
|
const toggleSection = (id: string) => {
|
|
setExpandedSections(prev =>
|
|
prev.includes(id)
|
|
? prev.filter(s => s !== id)
|
|
: [...prev, id]
|
|
)
|
|
}
|
|
|
|
return (
|
|
<div className="p-6 max-w-5xl mx-auto">
|
|
{/* Header */}
|
|
<div className="mb-8">
|
|
<Link
|
|
href="/ai/agents"
|
|
className="flex items-center gap-2 text-gray-500 hover:text-gray-700 mb-4"
|
|
>
|
|
<ArrowLeft className="w-4 h-4" />
|
|
Zurueck zur Agent-Verwaltung
|
|
</Link>
|
|
<h1 className="text-2xl font-bold text-gray-900 flex items-center gap-3">
|
|
<div className="p-2 bg-purple-100 rounded-lg">
|
|
<FileText className="w-6 h-6 text-purple-600" />
|
|
</div>
|
|
Multi-Agent Architektur
|
|
</h1>
|
|
<p className="text-gray-500 mt-1">
|
|
Technische Dokumentation des Breakpilot Multi-Agent-Systems
|
|
</p>
|
|
</div>
|
|
|
|
{/* Table of Contents */}
|
|
<div className="bg-gray-50 rounded-xl p-5 mb-8">
|
|
<h2 className="font-semibold text-gray-900 mb-3">Inhaltsverzeichnis</h2>
|
|
<div className="grid grid-cols-2 md:grid-cols-4 gap-2">
|
|
{SECTIONS.map(section => (
|
|
<button
|
|
key={section.id}
|
|
onClick={() => {
|
|
if (!expandedSections.includes(section.id)) {
|
|
setExpandedSections(prev => [...prev, section.id])
|
|
}
|
|
document.getElementById(section.id)?.scrollIntoView({ behavior: 'smooth' })
|
|
}}
|
|
className="flex items-center gap-2 text-sm text-gray-600 hover:text-teal-600 text-left p-2 rounded-lg hover:bg-gray-100 transition-colors"
|
|
>
|
|
{section.icon}
|
|
<span className="truncate">{section.title}</span>
|
|
</button>
|
|
))}
|
|
</div>
|
|
</div>
|
|
|
|
{/* Sections */}
|
|
<div className="space-y-4">
|
|
{SECTIONS.map(section => (
|
|
<div
|
|
key={section.id}
|
|
id={section.id}
|
|
className="bg-white border border-gray-200 rounded-xl overflow-hidden"
|
|
>
|
|
<button
|
|
onClick={() => toggleSection(section.id)}
|
|
className="w-full flex items-center justify-between p-5 hover:bg-gray-50 transition-colors"
|
|
>
|
|
<div className="flex items-center gap-3">
|
|
<div className="p-2 bg-gray-100 rounded-lg">
|
|
{section.icon}
|
|
</div>
|
|
<span className="font-semibold text-gray-900">{section.title}</span>
|
|
</div>
|
|
{expandedSections.includes(section.id) ? (
|
|
<ChevronDown className="w-5 h-5 text-gray-400" />
|
|
) : (
|
|
<ChevronRight className="w-5 h-5 text-gray-400" />
|
|
)}
|
|
</button>
|
|
{expandedSections.includes(section.id) && (
|
|
<div className="px-5 pb-5 border-t border-gray-100 pt-4">
|
|
{section.content}
|
|
</div>
|
|
)}
|
|
</div>
|
|
))}
|
|
</div>
|
|
|
|
{/* Footer Links */}
|
|
<div className="mt-8 bg-teal-50 border border-teal-200 rounded-xl p-5">
|
|
<h3 className="font-semibold text-teal-900 mb-3">Weiterfuehrende Ressourcen</h3>
|
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-3">
|
|
<Link
|
|
href="/ai/agents"
|
|
className="flex items-center gap-2 text-sm text-teal-700 hover:text-teal-900"
|
|
>
|
|
<Cpu className="w-4 h-4" />
|
|
Agent-Uebersicht
|
|
</Link>
|
|
<Link
|
|
href="/ai/agents/sessions"
|
|
className="flex items-center gap-2 text-sm text-teal-700 hover:text-teal-900"
|
|
>
|
|
<Activity className="w-4 h-4" />
|
|
Aktive Sessions
|
|
</Link>
|
|
<Link
|
|
href="/ai/agents/statistics"
|
|
className="flex items-center gap-2 text-sm text-teal-700 hover:text-teal-900"
|
|
>
|
|
<Database className="w-4 h-4" />
|
|
Statistiken
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|