CTO (LegalAI)
b22bdd8425
fix: API key save network error — add ENCRYPTION_KEY env and auto-migrate
...
The "Netzwerkfehler beim Speichern des Schlüssels" was caused by two issues:
1. ENCRYPTION_KEY env var was not passed to the Docker container, so
AES-256-GCM encrypt() threw at runtime on every POST/PATCH.
2. The 0003_tenant_api_keys migration was not in the drizzle journal
and no migration runner existed in the Docker image.
Changes:
- docker-compose.yml: pass ENCRYPTION_KEY to app container
- .env.example: document ENCRYPTION_KEY with generation command
- .gitignore: allow .env.example to be tracked
- Dockerfile: include drizzle/ migrations and entrypoint script
- entrypoint.sh: run migrations before starting the app
- migrate.mjs: runtime migration script using drizzle-orm migrator
- drizzle journal: register 0003_tenant_api_keys migration
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-09 14:28:19 +00:00
CTO (LegalAI)
7b1407268b
feat: Generisches Dokument-Upload-System fuer Entscheidungen, Normen und Falldokumente
...
- Neues documents-Schema mit Mandantentrennung (tenantId), Kategorien (entscheidung/norm/falldokument/sonstiges) und optionaler Verknuepfung zu cases/decisions/normInstruments
- Upload-Library (src/lib/documents/) mit Datei-Upload, PDF/DOCX-Textextraktion und gefilterten Listen
- API-Route POST/GET /api/documents mit RBAC, Audit-Logging und asynchroner Textextraktion
- Wiederverwendbare DokumentUpload-Komponente mit Drag-and-Drop, Fortschrittsanzeige und Dateiliste
- Integration in Fall-Detailseite, Entscheidungs-Detailseite und Normen-Detailseite
- Drizzle-Migration fuer documents-Tabelle mit RLS-konformer Mandantentrennung
- DSGVO: 90-Tage Aufbewahrungsfrist fuer hochgeladene Dokumente
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-09 10:18:56 +00:00
CTO (LegalAI)
78ccf64948
feat: Phase 4 — WebApp-Frontend für Bühnenrecht (AIIA-27)
...
Complete frontend implementation with Next.js App Router:
- Dashboard with case/analysis/proceeding stats and quick actions
- Normen-Browser with Quellenrang hierarchy and instrument detail
- Entscheidungssuche with full-text search and detail view
- Analysemodus with streaming AI analysis (4 modes: Gutachten, Entscheidung, Vergleich, Risiko)
- Vertragsanalyse with file upload (PDF/DOCX)
- Verfahren overview (BSchGO/ArbGG)
- Auth pages (Login/Register)
- Mandantenfähigkeit: tenant switcher, RBAC-based settings
- Responsive sidebar navigation with Tailwind CSS
- Dashboard layout with session-based auth guard
- Installed missing runtime deps (pdf-parse, mammoth, devDependencies)
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-09 00:23:09 +00:00
CTO (LegalAI)
a7245001ad
feat: vollständiges Datenmodell für Normen und Entscheidungen (AIIA-15)
...
Replaces placeholder schema with full legal data model:
- Normen with temporal versioning (valid_from/valid_to), source rank hierarchy,
immutable version chains, and norm-to-norm cross-references
- Entscheidungen with structured metadata (Aktenzeichen, Gremium, Leitsatz,
Tenor, Tatbestand, Entscheidungsgründe), decision-norm links with Stichtag
- NV Bühne Fachgruppen and BSchGO Arbitration Tribunals
- Cases, Analyses, and DSGVO Audit Log
- Mandantentrennung via tenant_id + PostgreSQL Row-Level Security policies
- Initial Drizzle migration and RLS migration
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 21:16:40 +00:00