2 Commits

Author SHA1 Message Date
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)
1d61b2ad8a Initial project structure: Next.js 15 + TypeScript + Drizzle ORM
- Next.js 15 with App Router, TypeScript, Tailwind CSS
- Directory structure per LegalAI architecture plan
- Docker Compose setup (PostgreSQL 16, Meilisearch, App)
- Drizzle ORM with base schema (tenants, users, norms, decisions)
- AI abstraction layer structure (Vercel AI SDK)
- Normen-Engine with Quellenrang hierarchy
- Search abstraction layer
- Auth placeholder (NextAuth.js)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-08 21:07:22 +00:00