feat: Legal Templates Service — eigene Vorlagen für Dokumentengenerator
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-ai-compliance (push) Successful in 37s
CI / test-python-backend-compliance (push) Successful in 32s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 18s

Implementiert MIT-lizenzierte DSGVO-Templates (DSE, Impressum, AGB) in
der eigenen PostgreSQL-Datenbank statt KLAUSUR_SERVICE-Abhängigkeit.

- Migration 018: compliance_legal_templates Tabelle + 3 Seed-Templates
- Routes: GET/POST/PUT/DELETE /legal-templates + /status + /sources
- Registriert im bestehenden compliance catch-all Proxy (kein neuer Proxy)
- searchTemplates.ts: eigenes Backend als Primary, RAG bleibt Fallback
- ServiceMode-Banner: KLAUSUR_SERVICE-Referenz entfernt
- Tests: 25 Python + 3 Vitest — alle grün

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-03 23:12:07 +01:00
parent 29e6998a28
commit f909182632
8 changed files with 1079 additions and 93 deletions

View File

@@ -257,9 +257,9 @@ export default function DocumentGeneratorPage() {
])
setStatus(statusData)
setSources(sourcesData)
const hasKlausur = statusData !== null
const hasTemplateDb = statusData !== null
const hasRag = await fetch(`${RAG_PROXY}/regulations`).then(r => r.ok).catch(() => false)
setServiceMode(hasKlausur ? 'full' : hasRag ? 'rag-only' : 'offline')
setServiceMode(hasTemplateDb ? 'full' : hasRag ? 'rag-only' : 'offline')
} catch {
setServiceMode('offline')
} finally {
@@ -396,7 +396,7 @@ export default function DocumentGeneratorPage() {
{/* Service mode banners */}
{serviceMode === 'rag-only' && (
<div className="bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-sm text-yellow-800">
KLAUSUR_SERVICE nicht verfügbar Suche läuft über RAG-Fallback
Template-Datenbank nicht erreichbar Suche läuft über RAG-Fallback
</div>
)}
{serviceMode === 'offline' && (