[split-required] Split 58 monoliths across Python, Go, TypeScript (Phases 1-3)
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>
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
* - Backend service and endpoints
|
||||
* - Frontend pages that use it
|
||||
* - Connection status (connected, partial, not connected)
|
||||
*
|
||||
* Module definitions live in ./module-registry-data.ts
|
||||
* This file exports the type, re-exports the data, and provides helper functions.
|
||||
*/
|
||||
|
||||
export interface BackendModule {
|
||||
@@ -33,512 +36,11 @@ export interface BackendModule {
|
||||
notes?: string
|
||||
}
|
||||
|
||||
export const MODULE_REGISTRY: BackendModule[] = [
|
||||
// ===========================================
|
||||
// COMPLIANCE MODULES
|
||||
// ===========================================
|
||||
{
|
||||
id: 'consent-documents',
|
||||
name: 'Consent Dokumente',
|
||||
description: 'Verwaltung rechtlicher Dokumente (AGB, Datenschutz, etc.)',
|
||||
category: 'compliance',
|
||||
backend: {
|
||||
service: 'consent-service',
|
||||
port: 8081,
|
||||
basePath: '/api/consent/admin',
|
||||
endpoints: [
|
||||
{ path: '/documents', method: 'GET', description: 'Liste aller Dokumente' },
|
||||
{ path: '/documents', method: 'POST', description: 'Dokument erstellen' },
|
||||
{ path: '/documents/{id}', method: 'GET', description: 'Dokument Details' },
|
||||
{ path: '/documents/{id}', method: 'PUT', description: 'Dokument aktualisieren' },
|
||||
{ path: '/documents/{id}', method: 'DELETE', description: 'Dokument loeschen' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/sdk/consent-management',
|
||||
oldAdminPage: '/admin/consent',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'critical'
|
||||
},
|
||||
{
|
||||
id: 'consent-versions',
|
||||
name: 'Dokument-Versionierung',
|
||||
description: 'Versionsverwaltung und Freigabe-Workflow fuer rechtliche Dokumente',
|
||||
category: 'compliance',
|
||||
backend: {
|
||||
service: 'consent-service',
|
||||
port: 8081,
|
||||
basePath: '/api/consent/admin',
|
||||
endpoints: [
|
||||
{ path: '/documents/{id}/versions', method: 'GET', description: 'Versionen eines Dokuments' },
|
||||
{ path: '/versions', method: 'POST', description: 'Neue Version erstellen' },
|
||||
{ path: '/versions/{id}', method: 'PUT', description: 'Version aktualisieren' },
|
||||
{ path: '/versions/{id}', method: 'DELETE', description: 'Version loeschen' },
|
||||
{ path: '/versions/{id}/submit-review', method: 'POST', description: 'Zur Pruefung einreichen' },
|
||||
{ path: '/versions/{id}/approve', method: 'POST', description: 'Version genehmigen' },
|
||||
{ path: '/versions/{id}/reject', method: 'POST', description: 'Version ablehnen' },
|
||||
{ path: '/versions/{id}/publish', method: 'POST', description: 'Version veroeffentlichen' },
|
||||
{ path: '/versions/{id}/approval-history', method: 'GET', description: 'Genehmigungsverlauf' },
|
||||
{ path: '/versions/upload-word', method: 'POST', description: 'Word-Dokument importieren' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/sdk/workflow',
|
||||
oldAdminPage: '/admin/consent (Versions Tab)',
|
||||
status: 'connected'
|
||||
},
|
||||
dependencies: ['consent-documents'],
|
||||
priority: 'critical'
|
||||
},
|
||||
{
|
||||
id: 'consent-user',
|
||||
name: 'Nutzer-Einwilligungen',
|
||||
description: 'Tracking von Nutzer-Einwilligungen fuer DSGVO-Compliance',
|
||||
category: 'compliance',
|
||||
backend: {
|
||||
service: 'consent-service',
|
||||
port: 8081,
|
||||
basePath: '/api/consent',
|
||||
endpoints: [
|
||||
{ path: '/status', method: 'GET', description: 'Einwilligungsstatus pruefen' },
|
||||
{ path: '/give', method: 'POST', description: 'Einwilligung erteilen' },
|
||||
{ path: '/withdraw', method: 'POST', description: 'Einwilligung widerrufen' },
|
||||
{ path: '/history', method: 'GET', description: 'Einwilligungshistorie' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/sdk/einwilligungen',
|
||||
oldAdminPage: '/admin/consent (Users Tab)',
|
||||
status: 'connected',
|
||||
},
|
||||
priority: 'critical',
|
||||
},
|
||||
{
|
||||
id: 'dsr-requests',
|
||||
name: 'Datenschutzanfragen (DSR)',
|
||||
description: 'DSGVO Art. 15-21 Anfragen verwalten',
|
||||
category: 'compliance',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/dsr',
|
||||
endpoints: [
|
||||
{ path: '/requests', method: 'GET', description: 'Alle DSR-Anfragen' },
|
||||
{ path: '/requests', method: 'POST', description: 'Neue Anfrage erstellen' },
|
||||
{ path: '/requests/{id}', method: 'GET', description: 'Anfrage-Details' },
|
||||
{ path: '/requests/{id}/process', method: 'POST', description: 'Anfrage bearbeiten' },
|
||||
{ path: '/requests/{id}/export', method: 'GET', description: 'Daten exportieren' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/sdk/dsr',
|
||||
oldAdminPage: '/admin/dsr',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'high',
|
||||
},
|
||||
{
|
||||
id: 'dsms',
|
||||
name: 'Datenschutz-Management-System',
|
||||
description: 'Zentrales DSMS fuer Dokumentation und Compliance',
|
||||
category: 'compliance',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/dsms',
|
||||
endpoints: [
|
||||
{ path: '/documents', method: 'GET', description: 'DSMS-Dokumente' },
|
||||
{ path: '/processes', method: 'GET', description: 'Verarbeitungsverzeichnis' },
|
||||
{ path: '/toms', method: 'GET', description: 'TOM-Katalog' },
|
||||
{ path: '/audits', method: 'GET', description: 'Audit-Historie' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/sdk/dsms',
|
||||
oldAdminPage: '/admin/dsms',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
{
|
||||
id: 'cookie-categories',
|
||||
name: 'Cookie-Kategorien',
|
||||
description: 'Verwaltung von Cookie-Kategorien fuer Consent Banner',
|
||||
category: 'compliance',
|
||||
backend: {
|
||||
service: 'consent-service',
|
||||
port: 8081,
|
||||
basePath: '/api/consent/admin',
|
||||
endpoints: [
|
||||
{ path: '/cookies/categories', method: 'GET', description: 'Alle Cookie-Kategorien' },
|
||||
{ path: '/cookies/categories', method: 'POST', description: 'Kategorie erstellen' },
|
||||
{ path: '/cookies/categories/{id}', method: 'PUT', description: 'Kategorie aktualisieren' },
|
||||
{ path: '/cookies/categories/{id}', method: 'DELETE', description: 'Kategorie loeschen' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: undefined,
|
||||
oldAdminPage: '/admin/consent (Cookies Tab)',
|
||||
status: 'not-connected'
|
||||
},
|
||||
priority: 'medium',
|
||||
notes: 'Cookie-Kategorien Tab im alten Admin vorhanden'
|
||||
},
|
||||
// Re-export data from the data file
|
||||
export { MODULE_REGISTRY } from './module-registry-data'
|
||||
|
||||
// ===========================================
|
||||
// AI MODULES
|
||||
// ===========================================
|
||||
{
|
||||
id: 'ai-agents',
|
||||
name: 'AI Agents',
|
||||
description: 'Multi-Agent System Verwaltung und Monitoring',
|
||||
category: 'ai',
|
||||
backend: {
|
||||
service: 'voice-service',
|
||||
port: 8088,
|
||||
basePath: '/api/v1/agents',
|
||||
endpoints: [
|
||||
{ path: '/sessions', method: 'GET', description: 'Agent-Sessions' },
|
||||
{ path: '/statistics', method: 'GET', description: 'Agent-Statistiken' },
|
||||
{ path: '/{agentId}', method: 'GET', description: 'Agent-Details' },
|
||||
{ path: '/{agentId}/soul', method: 'GET', description: 'SOUL-Konfiguration' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/ai/agents',
|
||||
oldAdminPage: undefined,
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'high',
|
||||
notes: 'Neues Multi-Agent System'
|
||||
},
|
||||
{
|
||||
id: 'ai-quality',
|
||||
name: 'AI Quality (BQAS)',
|
||||
description: 'KI-Qualitaetssicherung und Evaluierung',
|
||||
category: 'ai',
|
||||
backend: {
|
||||
service: 'voice-service',
|
||||
port: 8088,
|
||||
basePath: '/api/bqas',
|
||||
endpoints: [
|
||||
{ path: '/evaluate', method: 'POST', description: 'Antwort evaluieren' },
|
||||
{ path: '/metrics', method: 'GET', description: 'Qualitaetsmetriken' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/ai/quality',
|
||||
oldAdminPage: '/admin/quality',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'high'
|
||||
},
|
||||
{
|
||||
id: 'magic-help',
|
||||
name: 'Magic Help (TrOCR)',
|
||||
description: 'Handschrifterkennung mit TrOCR und LoRA Fine-Tuning',
|
||||
category: 'ai',
|
||||
backend: {
|
||||
service: 'klausur-service',
|
||||
port: 8086,
|
||||
basePath: '/api/klausur/trocr',
|
||||
endpoints: [
|
||||
{ path: '/status', method: 'GET', description: 'TrOCR Status' },
|
||||
{ path: '/extract', method: 'POST', description: 'Text aus Bild extrahieren' },
|
||||
{ path: '/training/examples', method: 'GET', description: 'Trainingsbeispiele' },
|
||||
{ path: '/training/add', method: 'POST', description: 'Trainingsbeispiel hinzufuegen' },
|
||||
{ path: '/training/fine-tune', method: 'POST', description: 'Fine-Tuning starten' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/ai/magic-help',
|
||||
oldAdminPage: '/admin/magic-help',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium',
|
||||
notes: 'Lokale Handschrifterkennung mit Privacy-by-Design'
|
||||
},
|
||||
{
|
||||
id: 'klausur-korrektur',
|
||||
name: 'Klausur-Korrektur',
|
||||
description: 'KI-gestuetzte Abitur-Korrektur mit EH-Vorschlaegen',
|
||||
category: 'ai',
|
||||
backend: {
|
||||
service: 'klausur-service',
|
||||
port: 8086,
|
||||
basePath: '/api/v1',
|
||||
endpoints: [
|
||||
{ path: '/klausuren', method: 'GET', description: 'Alle Klausuren' },
|
||||
{ path: '/klausuren', method: 'POST', description: 'Klausur erstellen' },
|
||||
{ path: '/klausuren/{id}/students', method: 'GET', description: 'Studentenarbeiten' },
|
||||
{ path: '/students/{id}/annotations', method: 'GET', description: 'Anmerkungen' },
|
||||
{ path: '/students/{id}/gutachten/generate', method: 'POST', description: 'Gutachten generieren' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/ai/klausur-korrektur',
|
||||
oldAdminPage: '/admin/klausur-korrektur',
|
||||
status: 'not-connected'
|
||||
},
|
||||
priority: 'high',
|
||||
notes: 'Komplexes Modul mit eigenem Backend-Service'
|
||||
},
|
||||
{
|
||||
id: 'ocr-labeling',
|
||||
name: 'OCR-Labeling',
|
||||
description: 'Handschrift-Training und Label-Verwaltung',
|
||||
category: 'ai',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/ocr',
|
||||
endpoints: [
|
||||
{ path: '/samples', method: 'GET', description: 'Training-Samples' },
|
||||
{ path: '/labels', method: 'GET', description: 'Label-Kategorien' },
|
||||
{ path: '/train', method: 'POST', description: 'Training starten' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/ai/ocr-labeling',
|
||||
oldAdminPage: '/admin/ocr-labeling',
|
||||
status: 'not-connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
{
|
||||
id: 'rag-management',
|
||||
name: 'RAG & Daten',
|
||||
description: 'Retrieval Augmented Generation und Training Data',
|
||||
category: 'ai',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/rag',
|
||||
endpoints: [
|
||||
{ path: '/documents', method: 'GET', description: 'RAG-Dokumente' },
|
||||
{ path: '/collections', method: 'GET', description: 'Vector-Collections' },
|
||||
{ path: '/query', method: 'POST', description: 'RAG-Abfrage' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/ai/rag',
|
||||
oldAdminPage: '/admin/rag',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
|
||||
// ===========================================
|
||||
// INFRASTRUCTURE MODULES
|
||||
// ===========================================
|
||||
{
|
||||
id: 'gpu-infrastructure',
|
||||
name: 'GPU Infrastruktur',
|
||||
description: 'vast.ai GPU-Management und Monitoring',
|
||||
category: 'infrastructure',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/gpu',
|
||||
endpoints: [
|
||||
{ path: '/instances', method: 'GET', description: 'GPU-Instanzen' },
|
||||
{ path: '/instances', method: 'POST', description: 'Instanz erstellen' },
|
||||
{ path: '/usage', method: 'GET', description: 'Nutzungsstatistiken' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/infrastructure/gpu',
|
||||
oldAdminPage: '/admin/gpu',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
{
|
||||
id: 'security-dashboard',
|
||||
name: 'Security Dashboard',
|
||||
description: 'DevSecOps Dashboard und Vulnerability Scans',
|
||||
category: 'infrastructure',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/security',
|
||||
endpoints: [
|
||||
{ path: '/scans', method: 'GET', description: 'Security-Scans' },
|
||||
{ path: '/vulnerabilities', method: 'GET', description: 'Schwachstellen' },
|
||||
{ path: '/compliance', method: 'GET', description: 'Compliance-Status' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/infrastructure/security',
|
||||
oldAdminPage: '/admin/security',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'high'
|
||||
},
|
||||
{
|
||||
id: 'sbom',
|
||||
name: 'SBOM',
|
||||
description: 'Software Bill of Materials',
|
||||
category: 'infrastructure',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/sbom',
|
||||
endpoints: [
|
||||
{ path: '/components', method: 'GET', description: 'Komponenten-Liste' },
|
||||
{ path: '/licenses', method: 'GET', description: 'Lizenz-Uebersicht' },
|
||||
{ path: '/export', method: 'GET', description: 'SBOM exportieren' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/infrastructure/sbom',
|
||||
oldAdminPage: '/admin/sbom',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
|
||||
{
|
||||
id: 'middleware',
|
||||
name: 'Middleware Manager',
|
||||
description: 'Verwaltung und Monitoring der Backend-Middleware',
|
||||
category: 'infrastructure',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/middleware',
|
||||
endpoints: [
|
||||
{ path: '/status', method: 'GET', description: 'Middleware-Status' },
|
||||
{ path: '/config', method: 'GET', description: 'Konfiguration' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/infrastructure/middleware',
|
||||
oldAdminPage: '/admin/middleware',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
{
|
||||
id: 'ci-cd',
|
||||
name: 'CI/CD Pipeline',
|
||||
description: 'Build-Pipeline und Deployment-Management',
|
||||
category: 'infrastructure',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/builds',
|
||||
endpoints: [
|
||||
{ path: '/pipelines', method: 'GET', description: 'Pipeline-Status' },
|
||||
{ path: '/builds', method: 'GET', description: 'Build-Historie' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/infrastructure/ci-cd',
|
||||
oldAdminPage: '/admin/builds',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
|
||||
// ===========================================
|
||||
// EDUCATION MODULES
|
||||
// ===========================================
|
||||
{
|
||||
id: 'edu-search',
|
||||
name: 'Bildungssuche',
|
||||
description: 'Suche nach Bildungsinhalten und Ressourcen',
|
||||
category: 'education',
|
||||
backend: {
|
||||
service: 'edu-search-service',
|
||||
port: 8089,
|
||||
basePath: '/api/edu',
|
||||
endpoints: [
|
||||
{ path: '/search', method: 'GET', description: 'Bildungssuche' },
|
||||
{ path: '/resources', method: 'GET', description: 'Ressourcen' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/education/edu-search',
|
||||
oldAdminPage: '/admin/edu-search',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
|
||||
// ===========================================
|
||||
// COMMUNICATION MODULES
|
||||
// ===========================================
|
||||
{
|
||||
id: 'alerts',
|
||||
name: 'Alerts & Benachrichtigungen',
|
||||
description: 'System-Benachrichtigungen und Alerts',
|
||||
category: 'communication',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/alerts',
|
||||
endpoints: [
|
||||
{ path: '/notifications', method: 'GET', description: 'Benachrichtigungen' },
|
||||
{ path: '/alerts', method: 'GET', description: 'Aktive Alerts' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/communication/alerts',
|
||||
oldAdminPage: '/admin/alerts',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'medium'
|
||||
},
|
||||
{
|
||||
id: 'unified-inbox',
|
||||
name: 'Unified Inbox',
|
||||
description: 'E-Mail-Konten und KI-Analyse',
|
||||
category: 'communication',
|
||||
backend: {
|
||||
service: 'python-backend',
|
||||
port: 8000,
|
||||
basePath: '/api/mail',
|
||||
endpoints: [
|
||||
{ path: '/accounts', method: 'GET', description: 'E-Mail-Konten' },
|
||||
{ path: '/messages', method: 'GET', description: 'Nachrichten' },
|
||||
{ path: '/analyze', method: 'POST', description: 'KI-Analyse' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/communication/mail',
|
||||
oldAdminPage: '/admin/mail',
|
||||
status: 'connected'
|
||||
},
|
||||
priority: 'low'
|
||||
},
|
||||
|
||||
// ===========================================
|
||||
// DEVELOPMENT MODULES
|
||||
// ===========================================
|
||||
{
|
||||
id: 'voice-service',
|
||||
name: 'Voice Service',
|
||||
description: 'Voice-First Interface',
|
||||
category: 'development',
|
||||
backend: {
|
||||
service: 'voice-service',
|
||||
port: 8088,
|
||||
basePath: '/api/voice',
|
||||
endpoints: [
|
||||
{ path: '/transcribe', method: 'POST', description: 'Sprache transkribieren' },
|
||||
{ path: '/synthesize', method: 'POST', description: 'Text zu Sprache' },
|
||||
]
|
||||
},
|
||||
frontend: {
|
||||
adminV2Page: '/development/voice',
|
||||
oldAdminPage: '/admin/voice',
|
||||
status: 'not-connected'
|
||||
},
|
||||
priority: 'low'
|
||||
},
|
||||
]
|
||||
// Import for use in helper functions
|
||||
import { MODULE_REGISTRY } from './module-registry-data'
|
||||
|
||||
// Helper functions
|
||||
export function getModulesByCategory(category: BackendModule['category']): BackendModule[] {
|
||||
|
||||
Reference in New Issue
Block a user