diff --git a/admin-compliance/app/globals.css b/admin-compliance/app/globals.css index d644361..0cde6ce 100644 --- a/admin-compliance/app/globals.css +++ b/admin-compliance/app/globals.css @@ -66,16 +66,6 @@ @apply text-infrastructure-700; } - .bg-category-education { - @apply bg-education-100; - } - .border-category-education { - @apply border-education-300; - } - .text-category-education { - @apply text-education-700; - } - .bg-category-communication { @apply bg-communication-100; } diff --git a/admin-compliance/app/page.tsx b/admin-compliance/app/page.tsx index cb9f11e..42d9737 100644 --- a/admin-compliance/app/page.tsx +++ b/admin-compliance/app/page.tsx @@ -77,7 +77,6 @@ export default function RoleSelectPage() { {cat === 'compliance' && 'DSGVO & Compliance'} {cat === 'ai' && 'KI & Automatisierung'} {cat === 'infrastructure' && 'Infrastruktur'} - {cat === 'education' && 'Bildung'} {cat === 'communication' && 'Kommunikation'} {cat === 'development' && 'Entwicklung'} diff --git a/admin-compliance/components/common/ArchitectureView.tsx b/admin-compliance/components/common/ArchitectureView.tsx index 92efe17..09570db 100644 --- a/admin-compliance/components/common/ArchitectureView.tsx +++ b/admin-compliance/components/common/ArchitectureView.tsx @@ -56,7 +56,6 @@ const CATEGORY_CONFIG: Record - /compliance | /ai | /infrastructure | /education | /communication | /development + /compliance | /ai | /infrastructure | /communication | /development diff --git a/admin-compliance/hooks/companion/useCompanionData.ts b/admin-compliance/hooks/companion/useCompanionData.ts index 129f119..d483683 100644 --- a/admin-compliance/hooks/companion/useCompanionData.ts +++ b/admin-compliance/hooks/companion/useCompanionData.ts @@ -39,24 +39,6 @@ function getMockData(): CompanionData { suggestions: [ { id: '1', - title: 'Klausuren korrigieren', - description: 'Deutsch LK - 12 unkorrigierte Arbeiten warten', - priority: 'urgent', - icon: 'ClipboardCheck', - actionTarget: '/ai/klausur-korrektur', - estimatedTime: 120, - }, - { - id: '2', - title: 'Elternsprechtag vorbereiten', - description: 'Notenuebersicht fuer 8b erstellen', - priority: 'high', - icon: 'Users', - actionTarget: '/education/grades', - estimatedTime: 30, - }, - { - id: '3', title: 'Material hochladen', description: 'Arbeitsblatt fuer naechste Woche bereitstellen', priority: 'medium', @@ -64,15 +46,6 @@ function getMockData(): CompanionData { actionTarget: '/development/content', estimatedTime: 15, }, - { - id: '4', - title: 'Lernstandserhebung planen', - description: 'Mathe 7a - Naechster Test in 2 Wochen', - priority: 'low', - icon: 'Calendar', - actionTarget: '/education/planning', - estimatedTime: 45, - }, ], upcomingEvents: [ { diff --git a/admin-compliance/lib/education/abitur-archiv-types.ts b/admin-compliance/lib/education/abitur-archiv-types.ts deleted file mode 100644 index 7150a6d..0000000 --- a/admin-compliance/lib/education/abitur-archiv-types.ts +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Extended TypeScript types for Abitur-Archiv - * Builds upon abitur-docs-types.ts with additional search and integration features - */ - -import { AbiturDokument, AbiturDocsFilter } from './abitur-docs-types' - -// Theme suggestion for autocomplete search -export interface ThemaSuggestion { - label: string // "Gedichtanalyse Romantik" - count: number // 12 Dokumente - aufgabentyp: string // "gedichtanalyse" - zeitraum?: string // "Romantik" - kategorie?: string // Category for grouping -} - -// Extended filter with theme search -export interface AbiturArchivFilter extends AbiturDocsFilter { - thema?: string // Semantic theme search query - aufgabentyp?: string // Specific task type filter -} - -// Similar document result from RAG -export interface SimilarDocument { - id: string - dateiname: string - similarity_score: number - fach: string - jahr: number - niveau: 'eA' | 'gA' - typ: 'aufgabe' | 'erwartungshorizont' - aufgaben_nummer: string -} - -// Extended document with similar documents -export interface AbiturDokumentExtended extends AbiturDokument { - similar_documents?: SimilarDocument[] - themes?: string[] // Extracted themes from content -} - -// Response for archive listing -export interface AbiturArchivResponse { - documents: AbiturDokumentExtended[] - total: number - page: number - limit: number - total_pages: number - themes?: ThemaSuggestion[] // Available themes for current filter -} - -// Response for theme suggestions -export interface ThemaSuggestResponse { - suggestions: ThemaSuggestion[] - query: string -} - -// Response for similar documents -export interface SimilarDocsResponse { - document_id: string - similar: SimilarDocument[] -} - -// Klausur creation from archive -export interface KlausurFromArchivRequest { - archiv_dokument_id: string - aufgabentyp: string - title?: string -} - -export interface KlausurFromArchivResponse { - klausur_id: string - eh_id?: string - success: boolean - message?: string -} - -// View mode for document display -export type ViewMode = 'grid' | 'list' - -// Sort options -export type SortField = 'jahr' | 'fach' | 'datum' | 'dateiname' -export type SortDirection = 'asc' | 'desc' - -export interface SortConfig { - field: SortField - direction: SortDirection -} - -// Predefined theme categories -export const THEME_CATEGORIES = { - textanalyse: { - label: 'Textanalyse', - subcategories: ['pragmatisch', 'literarisch', 'sachtext', 'rede', 'kommentar'] - }, - gedichtanalyse: { - label: 'Gedichtanalyse', - subcategories: ['romantik', 'expressionismus', 'barock', 'klassik', 'moderne'] - }, - dramenanalyse: { - label: 'Dramenanalyse', - subcategories: ['klassisch', 'modern', 'episches_theater'] - }, - prosaanalyse: { - label: 'Prosaanalyse', - subcategories: ['roman', 'kurzgeschichte', 'novelle', 'erzaehlung'] - }, - eroerterung: { - label: 'Eroerterung', - subcategories: ['textgebunden', 'materialgestuetzt', 'frei'] - }, - sprachreflexion: { - label: 'Sprachreflexion', - subcategories: ['sprachwandel', 'sprachkritik', 'kommunikation'] - } -} as const - -// Popular theme suggestions (static fallback) -export const POPULAR_THEMES: ThemaSuggestion[] = [ - { label: 'Textanalyse', count: 45, aufgabentyp: 'textanalyse_pragmatisch', kategorie: 'Analyse' }, - { label: 'Gedichtanalyse', count: 38, aufgabentyp: 'gedichtanalyse', kategorie: 'Analyse' }, - { label: 'Eroerterung', count: 32, aufgabentyp: 'eroerterung_textgebunden', kategorie: 'Argumentation' }, - { label: 'Dramenanalyse', count: 28, aufgabentyp: 'dramenanalyse', kategorie: 'Analyse' }, - { label: 'Prosaanalyse', count: 25, aufgabentyp: 'prosaanalyse', kategorie: 'Analyse' }, -] - -// Quick action types for document cards -export type QuickAction = 'preview' | 'download' | 'add_to_klausur' | 'view_similar' - -// Fullscreen viewer state -export interface ViewerState { - isFullscreen: boolean - zoom: number - currentPage: number - totalPages: number -} - -// Default viewer state -export const DEFAULT_VIEWER_STATE: ViewerState = { - isFullscreen: false, - zoom: 100, - currentPage: 1, - totalPages: 1 -} - -// Zoom levels -export const ZOOM_LEVELS = [25, 50, 75, 100, 125, 150, 175, 200] as const -export const MIN_ZOOM = 25 -export const MAX_ZOOM = 200 -export const ZOOM_STEP = 25 - -// Helper functions -export function getThemeLabel(aufgabentyp: string): string { - const entries = Object.entries(THEME_CATEGORIES) - for (const [key, value] of entries) { - if (aufgabentyp.startsWith(key)) { - return value.label - } - } - return aufgabentyp -} - -export function formatSimilarityScore(score: number): string { - return `${Math.round(score * 100)}%` -} diff --git a/admin-compliance/lib/education/abitur-docs-types.ts b/admin-compliance/lib/education/abitur-docs-types.ts deleted file mode 100644 index 20f94a5..0000000 --- a/admin-compliance/lib/education/abitur-docs-types.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * TypeScript types for Abitur Documents (NiBiS, etc.) - */ - -export interface AbiturDokument { - id: string - dateiname: string - original_dateiname: string - bundesland: string - fach: string - jahr: number - niveau: 'eA' | 'gA' // erhöhtes/grundlegendes Anforderungsniveau - typ: 'aufgabe' | 'erwartungshorizont' - aufgaben_nummer: string // I, II, III - status: 'pending' | 'indexed' | 'error' - confidence: number - file_path: string - file_size: number - indexed: boolean - vector_ids: string[] - created_at: string - updated_at: string -} - -export interface AbiturDocsResponse { - documents: AbiturDokument[] - total: number - page: number - limit: number - total_pages: number -} - -export interface AbiturDocsFilter { - fach?: string - jahr?: number - bundesland?: string - niveau?: 'eA' | 'gA' - typ?: 'aufgabe' | 'erwartungshorizont' - page?: number - limit?: number -} - -// Available filter options -export const FAECHER = [ - { id: 'deutsch', label: 'Deutsch' }, - { id: 'mathematik', label: 'Mathematik' }, - { id: 'englisch', label: 'Englisch' }, - { id: 'biologie', label: 'Biologie' }, - { id: 'physik', label: 'Physik' }, - { id: 'chemie', label: 'Chemie' }, - { id: 'geschichte', label: 'Geschichte' }, -] as const - -export const JAHRE = [2025, 2024, 2023, 2022, 2021, 2020] as const - -export const BUNDESLAENDER = [ - { id: 'niedersachsen', label: 'Niedersachsen' }, - { id: 'bayern', label: 'Bayern' }, - { id: 'nrw', label: 'Nordrhein-Westfalen' }, - { id: 'bw', label: 'Baden-Württemberg' }, -] as const - -export const NIVEAUS = [ - { id: 'eA', label: 'Erhöhtes Anforderungsniveau (eA)' }, - { id: 'gA', label: 'Grundlegendes Anforderungsniveau (gA)' }, -] as const - -export const TYPEN = [ - { id: 'aufgabe', label: 'Aufgabe' }, - { id: 'erwartungshorizont', label: 'Erwartungshorizont' }, -] as const - -// Helper functions -export function formatFileSize(bytes: number): string { - if (bytes < 1024) return bytes + ' B' - if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + ' KB' - return (bytes / (1024 * 1024)).toFixed(1) + ' MB' -} - -export function formatDocumentTitle(doc: AbiturDokument): string { - const fachLabel = FAECHER.find(f => f.id === doc.fach)?.label || doc.fach - const typLabel = doc.typ === 'erwartungshorizont' ? 'EWH' : 'Aufgabe' - return `${fachLabel} ${doc.jahr} - ${doc.niveau} ${doc.aufgaben_nummer} (${typLabel})` -} diff --git a/admin-compliance/lib/module-registry.ts b/admin-compliance/lib/module-registry.ts index 648ed57..a048f61 100644 --- a/admin-compliance/lib/module-registry.ts +++ b/admin-compliance/lib/module-registry.ts @@ -12,7 +12,7 @@ export interface BackendModule { id: string name: string description: string - category: 'compliance' | 'ai' | 'infrastructure' | 'education' | 'communication' | 'development' + category: 'compliance' | 'ai' | 'infrastructure' | 'communication' | 'development' backend: { service: string // e.g. 'consent-service', 'python-backend', 'klausur-service' port: number @@ -256,56 +256,6 @@ export const MODULE_REGISTRY: BackendModule[] = [ }, priority: 'medium' }, - { - 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', @@ -464,31 +414,6 @@ export const MODULE_REGISTRY: BackendModule[] = [ 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 // =========================================== diff --git a/admin-compliance/lib/navigation.ts b/admin-compliance/lib/navigation.ts index cfcc87f..9576239 100644 --- a/admin-compliance/lib/navigation.ts +++ b/admin-compliance/lib/navigation.ts @@ -5,7 +5,7 @@ * All DSGVO and Compliance modules are now consolidated under the SDK. */ -export type CategoryId = 'ai' | 'education' | 'website' | 'sdk-docs' +export type CategoryId = 'ai' | 'website' | 'sdk-docs' export interface NavModule { id: string @@ -42,18 +42,8 @@ export const navigation: NavCategory[] = [ description: 'LLM, OCR, RAG & Machine Learning', modules: [ // ----------------------------------------------------------------------- - // KI-Daten-Pipeline: Magic Help -> OCR -> Indexierung -> Suche + // KI-Daten-Pipeline: OCR -> Indexierung -> Suche // ----------------------------------------------------------------------- - { - id: 'magic-help', - name: 'Magic Help (TrOCR)', - href: '/ai/magic-help', - description: 'TrOCR Testing & Fine-Tuning', - purpose: 'Testen und verbessern Sie die TrOCR-Handschrifterkennung. Laden Sie Bilder hoch, um die OCR-Qualitaet zu pruefen, und trainieren Sie das Modell mit LoRA Fine-Tuning. Bidirektionaler Austausch mit OCR-Labeling.', - audience: ['Entwickler', 'Administratoren', 'QA'], - oldAdminPath: '/admin/magic-help', - subgroup: 'KI-Daten-Pipeline', - }, { id: 'ocr-labeling', name: 'OCR-Labeling', @@ -141,54 +131,6 @@ export const navigation: NavCategory[] = [ ], }, // ========================================================================= - // Bildung & Schule - // ========================================================================= - { - id: 'education', - name: 'Bildung & Schule', - icon: 'graduation', - color: '#3b82f6', // Blue - colorClass: 'education', - description: 'Bildungsquellen & Lehrplaene', - modules: [ - { - id: 'edu-search', - name: 'Education Search', - href: '/education/edu-search', - description: 'Bildungsquellen & Crawler', - purpose: 'Verwalten Sie Bildungsquellen und konfigurieren Sie Crawler fuer neue Inhalte.', - audience: ['Content Manager'], - oldAdminPath: '/admin/edu-search', - }, - { - id: 'zeugnisse-crawler', - name: 'Zeugnisse-Crawler', - href: '/education/zeugnisse-crawler', - description: 'Zeugnis-Daten', - purpose: 'Verwalten Sie gecrawlte Zeugnis-Strukturen und -Formate.', - audience: ['Entwickler'], - oldAdminPath: '/admin/zeugnisse-crawler', - }, - { - id: 'abitur-archiv', - name: 'Abitur-Archiv', - href: '/education/abitur-archiv', - description: 'Zentralabitur-Materialien 2021-2025', - purpose: 'Durchsuchen und filtern Sie Abitur-Aufgaben und Erwartungshorizonte. Themensuche mit semantischer Suche via RAG. Integration mit Klausur-Korrektur fuer schnelle Vorlagen-Nutzung.', - audience: ['Lehrer', 'Entwickler'], - }, - { - id: 'klausur-korrektur', - name: 'Klausur-Korrektur', - href: '/education/klausur-korrektur', - description: 'Abitur-Korrektur mit KI', - purpose: 'KI-gestuetzte Korrektur von Abitur- und Vorabitur-Klausuren. Nutzt die RAG-Pipeline fuer Erwartungshorizont-Vorschlaege.', - audience: ['Lehrer', 'Entwickler'], - oldAdminPath: '/admin/klausur-korrektur', - }, - ], - }, - // ========================================================================= // Website // ========================================================================= { diff --git a/admin-compliance/lib/roles.ts b/admin-compliance/lib/roles.ts index cc8d35a..80d7e99 100644 --- a/admin-compliance/lib/roles.ts +++ b/admin-compliance/lib/roles.ts @@ -23,7 +23,7 @@ export const roles: Role[] = [ name: 'Entwickler', description: 'Voller Zugriff auf alle Bereiche', icon: 'code', - visibleCategories: ['ai', 'education', 'website'], + visibleCategories: ['ai', 'website'], color: 'bg-primary-100 border-primary-300 text-primary-700', }, { diff --git a/admin-compliance/tailwind.config.ts b/admin-compliance/tailwind.config.ts index 36fe37e..e978dc5 100644 --- a/admin-compliance/tailwind.config.ts +++ b/admin-compliance/tailwind.config.ts @@ -46,18 +46,6 @@ const config: Config = { 800: '#9a3412', 900: '#7c2d12', }, - education: { - 50: '#eff6ff', - 100: '#dbeafe', - 200: '#bfdbfe', - 300: '#93c5fd', - 400: '#60a5fa', - 500: '#3b82f6', - 600: '#2563eb', - 700: '#1d4ed8', - 800: '#1e40af', - 900: '#1e3a8a', - }, communication: { 50: '#f0fdf4', 100: '#dcfce7', diff --git a/admin-compliance/types/ai-modules.ts b/admin-compliance/types/ai-modules.ts index ea6e7b5..c8220cd 100644 --- a/admin-compliance/types/ai-modules.ts +++ b/admin-compliance/types/ai-modules.ts @@ -80,16 +80,9 @@ export interface AIModuleLink { /** * KI-Daten-Pipeline Module * Diese Module bilden eine zusammenhaengende Pipeline mit Datenfluss. - * Datenfluss: Magic Help ⟷ OCR-Labeling → RAG Pipeline → Daten & RAG + * Datenfluss: OCR-Labeling → RAG Pipeline → Daten & RAG */ export const AI_PIPELINE_MODULES: AIModuleLink[] = [ - { - id: 'magic-help', - name: 'Magic Help', - href: '/ai/magic-help', - description: 'TrOCR Testing & LoRA Fine-Tuning', - icon: '✨', - }, { id: 'ocr-labeling', name: 'OCR-Labeling', @@ -149,39 +142,13 @@ export const AI_MODULES: AIModuleLink[] = [ */ export const AI_MODULE_RELATIONS: Record = { // KI-Daten-Pipeline Relations - 'magic-help': [ - { - id: 'ocr-labeling', - name: 'OCR-Labeling', - href: '/ai/ocr-labeling', - description: 'Ground Truth erstellen', - }, - { - id: 'rag-pipeline', - name: 'RAG Pipeline', - href: '/ai/rag-pipeline', - description: 'Erkannte Texte indexieren', - }, - ], 'ocr-labeling': [ - { - id: 'magic-help', - name: 'Magic Help', - href: '/ai/magic-help', - description: 'TrOCR testen & fine-tunen', - }, { id: 'rag-pipeline', name: 'RAG Pipeline', href: '/ai/rag-pipeline', description: 'Trainierte Daten indexieren', }, - { - id: 'klausur-korrektur', - name: 'Klausur-Korrektur', - href: '/ai/klausur-korrektur', - description: 'OCR in Aktion', - }, ], 'rag-pipeline': [ { @@ -204,12 +171,6 @@ export const AI_MODULE_RELATIONS: Record = { href: '/ai/rag-pipeline', description: 'Neue Dokumente indexieren', }, - { - id: 'klausur-korrektur', - name: 'Klausur-Korrektur', - href: '/ai/klausur-korrektur', - description: 'RAG-Suche nutzen', - }, ], // KI-Werkzeuge Relations (Standalone-Tools) 'llm-compare': [ @@ -233,12 +194,6 @@ export const AI_MODULE_RELATIONS: Record = { href: '/ai/llm-compare', description: 'KI-Provider vergleichen', }, - { - id: 'klausur-korrektur', - name: 'Klausur-Korrektur', - href: '/ai/klausur-korrektur', - description: 'BQAS in Aktion', - }, ], } @@ -259,24 +214,11 @@ export interface DataFlowConnection { /** * Definiert den Datenfluss zwischen den AI-Modulen * - * Magic Help ⟷ OCR-Labeling: Bidirektionaler Austausch (LoRA + Ground Truth) * OCR-Labeling → RAG Pipeline: Ground Truth für Training * RAG Pipeline → Daten & RAG: Embeddings für Vektor-Suche * Daten & RAG → Klausur-Korrektur: RAG-Suche für Bewertung */ export const DATA_FLOW_CONNECTIONS: DataFlowConnection[] = [ - { - from: 'magic-help', - to: 'ocr-labeling', - label: 'LoRA Model', - description: 'Verbessertes TrOCR-Modell für OCR-Labeling', - }, - { - from: 'ocr-labeling', - to: 'magic-help', - label: 'TrOCR Export', - description: 'Ground Truth Daten im TrOCR-Format für Fine-Tuning', - }, { from: 'ocr-labeling', to: 'rag-pipeline', @@ -289,12 +231,6 @@ export const DATA_FLOW_CONNECTIONS: DataFlowConnection[] = [ label: 'Embeddings', description: 'Vektor-Embeddings indexierter Dokumente', }, - { - from: 'rag', - to: 'klausur-korrektur', - label: 'RAG-Suche', - description: 'Semantische Suche für Erwartungshorizonte', - }, ] // =============================================================================