diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index a19c043..b18ba44 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -6,20 +6,36 @@ | Geraet | Rolle | Aufgaben | |--------|-------|----------| -| **MacBook** | Client | Claude Terminal, Browser (Frontend-Tests) | -| **Mac Mini** | Server | Docker, alle Services, Code-Ausfuehrung, Tests, Git | +| **MacBook** | Entwicklung | Claude Terminal, Code-Entwicklung, Browser (Frontend-Tests) | +| **Mac Mini** | Server | Docker, alle Services, Tests, Builds, Deployment | -**WICHTIG:** Die Entwicklung findet vollstaendig auf dem **Mac Mini** statt! +**WICHTIG:** Code wird direkt auf dem MacBook in diesem Repo bearbeitet. Docker und Services laufen auf dem Mac Mini. -### SSH-Verbindung +### Entwicklungsworkflow ```bash -ssh macmini -# Projektverzeichnis: -cd /Users/benjaminadmin/Projekte/breakpilot-compliance +# 1. Code auf MacBook bearbeiten (dieses Verzeichnis) +# 2. Committen und pushen: +git push origin main && git push gitea main -# Einzelbefehle (BEVORZUGT): -ssh macmini "cd /Users/benjaminadmin/Projekte/breakpilot-compliance && " +# 3. Auf Mac Mini pullen (WICHTIG: git -C statt cd): +ssh macmini "git -C /Users/benjaminadmin/Projekte/breakpilot-compliance pull --no-rebase origin main" + +# 4. Container neu bauen (WICHTIG: -f statt cd, da cd in SSH nicht funktioniert!): +ssh macmini "/usr/local/bin/docker compose -f /Users/benjaminadmin/Projekte/breakpilot-compliance/docker-compose.yml build --no-cache && /usr/local/bin/docker compose -f /Users/benjaminadmin/Projekte/breakpilot-compliance/docker-compose.yml up -d " + +# Fuer schnelle Iteration ohne Commit (rsync): +rsync -avz --exclude node_modules --exclude .next --exclude .git \ + admin-compliance/ macmini:~/Projekte/breakpilot-compliance/admin-compliance/ +``` + +### SSH-Verbindung (fuer Docker/Tests) + +```bash +# RICHTIG — cd funktioniert NICHT in SSH-Einzelbefehlen: +ssh macmini "git -C /Users/benjaminadmin/Projekte/breakpilot-compliance " +ssh macmini "/usr/local/bin/docker compose -f /Users/benjaminadmin/Projekte/breakpilot-compliance/docker-compose.yml " +ssh macmini "/usr/local/bin/docker exec bp-compliance- " ``` --- @@ -27,12 +43,18 @@ ssh macmini "cd /Users/benjaminadmin/Projekte/breakpilot-compliance && " ## Voraussetzung **breakpilot-core MUSS laufen!** Dieses Projekt nutzt Core-Services: -- PostgreSQL (Schema: `compliance`, `core`) - Valkey (Session-Cache) - Vault (Secrets) - RAG-Service (Vektorsuche fuer Compliance-Dokumente) - Nginx (Reverse Proxy) +**Externe Services (Hetzner/meghshakka) — seit 2026-03-06:** +- PostgreSQL 17 @ `46.225.100.82:54321` (sslmode=require) — Schemas: `compliance` (51), `public` (compliance_* + training_* + ucca_* + academy_*) +- Qdrant @ `qdrant-dev.breakpilot.ai` (HTTPS, API-Key) +- Object Storage @ `nbg1.your-objectstorage.com` (S3-kompatibel, TLS) + +Config via `.env` auf Mac Mini (nicht im Repo): `COMPLIANCE_DATABASE_URL`, `QDRANT_URL`, `QDRANT_API_KEY` + Pruefen: `curl -sf http://macmini:8099/health` --- @@ -76,18 +98,32 @@ Pruefen: `curl -sf http://macmini:8099/health` --- -## Services (~8 Container) +## Services (10 Container) | Service | Tech | Port | Container | |---------|------|------|-----------| | admin-compliance | Next.js 15 | 3007 (via nginx) | bp-compliance-admin | | backend-compliance | Python/FastAPI | 8002 | bp-compliance-backend | -| ai-compliance-sdk | Python/FastAPI | 8093 | bp-compliance-ai-sdk | -| developer-portal | Next.js | 3006 (via nginx) | bp-compliance-developer-portal | -| dsms-node | Node.js | 4001/5001 | bp-compliance-dsms-node | -| dsms-gateway | Node.js | 8085 | bp-compliance-dsms-gateway | -| pca-platform | Python | - | bp-compliance-pca | -| consent-sdk | Node.js | - | bp-compliance-consent-sdk | +| ai-compliance-sdk | Go/Gin | 8090→8093 | bp-compliance-ai-sdk | +| developer-portal | Next.js 15 | 3006 (via nginx) | bp-compliance-developer-portal | +| compliance-tts-service | Python/Piper TTS | 8095 | bp-compliance-tts | +| document-crawler | Python/FastAPI | 8098 | bp-compliance-document-crawler | +| dsms-node | IPFS Kubo | 4001/5001/8085 | bp-compliance-dsms-node | +| dsms-gateway | Node.js | 8082 | bp-compliance-dsms-gateway | +| docs | MkDocs/nginx | 8011 | bp-compliance-docs | +| core-wait | curl health-check | - | bp-compliance-core-wait | + +### compliance-tts-service +- Piper TTS + FFmpeg fuer Schulungsvideos +- Speichert Audio/Video in Hetzner Object Storage (nbg1.your-objectstorage.com) +- TTS-Modell: `de_DE-thorsten-high.onnx` +- Dateien: `main.py`, `tts_engine.py`, `video_generator.py`, `storage.py` + +### document-crawler +- Dokument-Analyse: PDF, DOCX, XLSX, PPTX +- Gap-Analyse zwischen bestehenden Dokumenten und Compliance-Anforderungen +- IPFS-Archivierung via dsms-gateway +- Kommuniziert mit ai-compliance-sdk (LLM Gateway) ### Docker-Netzwerk Nutzt das externe Core-Netzwerk: @@ -144,10 +180,13 @@ breakpilot-compliance/ ```bash # Compliance-Services starten (Core muss laufen!) -ssh macmini "cd /Users/benjaminadmin/Projekte/breakpilot-compliance && /usr/local/bin/docker compose up -d" +ssh macmini "/usr/local/bin/docker compose -f /Users/benjaminadmin/Projekte/breakpilot-compliance/docker-compose.yml up -d" # Einzelnen Service neu bauen -ssh macmini "cd /Users/benjaminadmin/Projekte/breakpilot-compliance && /usr/local/bin/docker compose build --no-cache " +ssh macmini "/usr/local/bin/docker compose -f /Users/benjaminadmin/Projekte/breakpilot-compliance/docker-compose.yml build --no-cache " + +# Service neu bauen und starten +ssh macmini "/usr/local/bin/docker compose -f /Users/benjaminadmin/Projekte/breakpilot-compliance/docker-compose.yml build --no-cache && /usr/local/bin/docker compose -f /Users/benjaminadmin/Projekte/breakpilot-compliance/docker-compose.yml up -d " # Logs ssh macmini "/usr/local/bin/docker logs -f bp-compliance-" @@ -157,17 +196,21 @@ ssh macmini "/usr/local/bin/docker ps --filter name=bp-compliance" ``` **WICHTIG:** Docker-Pfad auf Mac Mini ist `/usr/local/bin/docker` (nicht im Standard-SSH-PATH). +**WICHTIG:** `cd` funktioniert NICHT in SSH-Einzelbefehlen — immer `-f /docker-compose.yml` verwenden! +Der CLAUDE.md-Entwicklungsworkflow und die Beispiele mit `cd ... &&` sind veraltet — nie so verwenden. ### Git ```bash -# Zu BEIDEN Remotes pushen (PFLICHT!): -ssh macmini "cd /Users/benjaminadmin/Projekte/breakpilot-compliance && git push all main" +# Zu BEIDEN Remotes pushen (PFLICHT! — vom MacBook): +git push origin main && git push gitea main + +# Auf Mac Mini pullen (RICHTIG: git -C statt cd): +ssh macmini "git -C /Users/benjaminadmin/Projekte/breakpilot-compliance pull --no-rebase origin main" # Remotes: # origin: lokale Gitea (macmini:3003) -# gitea: gitea.meghsakha.com -# all: beide gleichzeitig +# gitea: gitea.meghsakha.com:22222 ``` --- @@ -226,18 +269,55 @@ POST/GET /api/v1/compliance/evidence POST/GET /api/v1/dsr/requests POST/GET /api/v1/gdpr/exports POST/GET /api/v1/consent/admin + +# Stammdaten, Versionierung & Change-Requests (Phase 1-6, 2026-03-07) +GET/POST/DELETE /api/compliance/company-profile +GET /api/compliance/company-profile/template-context +GET /api/compliance/change-requests +GET /api/compliance/change-requests/stats +POST /api/compliance/change-requests/{id}/accept +POST /api/compliance/change-requests/{id}/reject +POST /api/compliance/change-requests/{id}/edit +GET /api/compliance/generation/preview/{doc_type} +POST /api/compliance/generation/apply/{doc_type} +GET /api/compliance/{doc}/{id}/versions ``` +### Multi-Tenancy +- Shared Dependency: `compliance/api/tenant_utils.py` (`get_tenant_id()`) +- UUID-Format, kein `"default"` mehr +- Header `X-Tenant-ID` > Query `tenant_id` > ENV-Fallback + +### Migrations (035-038) +| Nr | Datei | Beschreibung | +|----|-------|--------------| +| 035 | `migrations/035_vvt_tenant_isolation.sql` | VVT tenant_id + DSFA/Vendor default→UUID | +| 036 | `migrations/036_company_profile_extend.sql` | Stammdaten JSONB + Regulierungs-Flags | +| 037 | `migrations/037_document_versions.sql` | 5 Versions-Tabellen + current_version | +| 038 | `migrations/038_change_requests.sql` | Change-Requests + Audit-Log | + +### Neue Backend-Module +| Datei | Beschreibung | +|-------|--------------| +| `compliance/api/tenant_utils.py` | Shared Tenant-ID Dependency | +| `compliance/api/versioning_utils.py` | Shared Versioning Helper | +| `compliance/api/change_request_routes.py` | CR CRUD + Accept/Reject/Edit | +| `compliance/api/change_request_engine.py` | Regelbasierte CR-Generierung | +| `compliance/api/generation_routes.py` | Dokumentengenerierung aus Stammdaten | +| `compliance/api/document_templates/` | 5 Template-Generatoren (DSFA, VVT, TOM, etc.) | + --- ## Wichtige Dateien (Referenz) | Datei | Beschreibung | |-------|--------------| -| `admin-compliance/app/(sdk)/` | Alle 37 SDK-Routes | -| `admin-compliance/components/sdk/SDKSidebar.tsx` | SDK Navigation | +| `admin-compliance/app/(sdk)/` | Alle 37+ SDK-Routes | +| `admin-compliance/app/(sdk)/sdk/change-requests/page.tsx` | Change-Request Inbox | +| `admin-compliance/components/sdk/Sidebar/SDKSidebar.tsx` | SDK Navigation (mit CR-Badge) | +| `admin-compliance/components/sdk/VersionHistory.tsx` | Versions-Timeline-Komponente | | `admin-compliance/components/sdk/CommandBar.tsx` | Command Palette | | `admin-compliance/lib/sdk/context.tsx` | SDK State (Provider) | -| `backend-compliance/compliance/` | Haupt-Package (40 Dateien) | +| `backend-compliance/compliance/` | Haupt-Package (50+ Dateien) | | `ai-compliance-sdk/` | KI-Compliance Analyse | | `developer-portal/` | API-Dokumentation | diff --git a/.env.example b/.env.example index efba999..ce20b61 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,11 @@ # Copy to .env and adjust values # NOTE: Core must be running! These vars reference Core services. -# Database (same as Core) +# Compliance SDK Database (externe PostgreSQL — nie committen!) +# Setzt DATABASE_URL fuer: backend-compliance, ai-compliance-sdk, document-crawler, admin-compliance +COMPLIANCE_DATABASE_URL=postgresql://:@:/?sslmode=require + +# Legacy Core Database (nur noch fuer Rollback; wird ignoriert wenn COMPLIANCE_DATABASE_URL gesetzt) POSTGRES_USER=breakpilot POSTGRES_PASSWORD=breakpilot123 POSTGRES_DB=breakpilot_db @@ -44,3 +48,11 @@ SESSION_TTL_HOURS=24 # SMTP (uses Core Mailpit) SMTP_HOST=bp-core-mailpit SMTP_PORT=1025 + +# Qdrant (externe Instanz — Hetzner/meghshakka) +QDRANT_URL=https://qdrant-dev.breakpilot.ai +QDRANT_API_KEY= + +# MinIO / Object Storage (Hetzner Object Storage) +# MINIO_ENDPOINT, MINIO_ACCESS_KEY, MINIO_SECRET_KEY sind direkt in docker-compose hart kodiert +# (compliance-tts-service: nbg1.your-objectstorage.com) diff --git a/admin-compliance/.dockerignore b/admin-compliance/.dockerignore index 545b4b5..7f2853d 100644 --- a/admin-compliance/.dockerignore +++ b/admin-compliance/.dockerignore @@ -20,11 +20,9 @@ edu-search-service school-service voice-service geo-service -klausur-service studio-v2 website scripts -agent-core pca-platform breakpilot-drive breakpilot-compliance-sdk diff --git a/admin-compliance/Dockerfile b/admin-compliance/Dockerfile index f50b764..4813047 100644 --- a/admin-compliance/Dockerfile +++ b/admin-compliance/Dockerfile @@ -16,13 +16,11 @@ COPY . . ARG NEXT_PUBLIC_API_URL ARG NEXT_PUBLIC_OLD_ADMIN_URL ARG NEXT_PUBLIC_SDK_URL -ARG NEXT_PUBLIC_KLAUSUR_SERVICE_URL # Set environment variables for build ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL ENV NEXT_PUBLIC_OLD_ADMIN_URL=$NEXT_PUBLIC_OLD_ADMIN_URL ENV NEXT_PUBLIC_SDK_URL=$NEXT_PUBLIC_SDK_URL -ENV NEXT_PUBLIC_KLAUSUR_SERVICE_URL=$NEXT_PUBLIC_KLAUSUR_SERVICE_URL # Build the application RUN npm run build @@ -43,6 +41,7 @@ RUN adduser -S -u 1001 -G nodejs nextjs COPY --from=builder /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +COPY --from=builder --chown=nextjs:nodejs /app/agent-core ./agent-core # Switch to non-root user USER nextjs diff --git a/admin-compliance/__tests__/ingest-industry-compliance.test.ts b/admin-compliance/__tests__/ingest-industry-compliance.test.ts new file mode 100644 index 0000000..76505d0 --- /dev/null +++ b/admin-compliance/__tests__/ingest-industry-compliance.test.ts @@ -0,0 +1,167 @@ +import { describe, it, expect } from 'vitest' +import { readFileSync } from 'fs' +import { resolve } from 'path' + +/** + * Tests for the ingestion script ingest-industry-compliance.sh + * Validates script structure, URLs, metadata, and configuration. + */ + +const SCRIPT_PATH = resolve(__dirname, '../../scripts/ingest-industry-compliance.sh') +let scriptContent: string + +try { + scriptContent = readFileSync(SCRIPT_PATH, 'utf-8') +} catch { + scriptContent = '' +} + +describe('Ingestion Script: ingest-industry-compliance.sh', () => { + it('should exist and be non-empty', () => { + expect(scriptContent.length).toBeGreaterThan(0) + }) + + describe('download_pdf function', () => { + it('should define download_pdf function', () => { + expect(scriptContent).toContain('download_pdf()') + }) + + it('should use User-Agent header for downloads', () => { + expect(scriptContent).toContain('Mozilla/5.0') + }) + + it('should follow redirects with -L flag', () => { + expect(scriptContent).toMatch(/curl.*-L/) + }) + + it('should skip already downloaded files', () => { + expect(scriptContent).toContain('-f "$target"') + }) + }) + + describe('upload_file function', () => { + it('should define upload_file function', () => { + expect(scriptContent).toContain('upload_file()') + }) + + it('should use recursive chunk strategy', () => { + expect(scriptContent).toContain('chunk_strategy=recursive') + }) + + it('should use chunk_size=512', () => { + expect(scriptContent).toContain('chunk_size=512') + }) + + it('should use chunk_overlap=50', () => { + expect(scriptContent).toContain('chunk_overlap=50') + }) + + it('should validate minimum file size', () => { + expect(scriptContent).toContain('"$filesize" -lt 100') + }) + }) + + describe('IFRS Downloads', () => { + it('should download IFRS DE from EUR-Lex', () => { + expect(scriptContent).toContain( + 'https://eur-lex.europa.eu/legal-content/DE/TXT/PDF/?uri=CELEX:32023R1803' + ) + }) + + it('should download IFRS EN from EUR-Lex', () => { + expect(scriptContent).toContain( + 'https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32023R1803' + ) + }) + + it('should save IFRS DE with correct filename', () => { + expect(scriptContent).toContain('ifrs_regulation_2023_1803_de.pdf') + }) + + it('should save IFRS EN with correct filename', () => { + expect(scriptContent).toContain('ifrs_regulation_2023_1803_en.pdf') + }) + }) + + describe('EFRAG Download', () => { + it('should download EFRAG Endorsement Status Report', () => { + expect(scriptContent).toContain('efrag.org') + }) + + it('should save as efrag_endorsement_status_2025.pdf', () => { + expect(scriptContent).toContain('efrag_endorsement_status_2025.pdf') + }) + }) + + describe('ENISA Downloads', () => { + it('should download ENISA from new URL pattern', () => { + expect(scriptContent).toContain('enisa.europa.eu/sites/default/files/publications') + }) + + it('should NOT use old Plone-style URLs', () => { + expect(scriptContent).not.toContain('@@download/fullReport') + }) + }) + + describe('IFRS Metadata', () => { + it('should include CELEX number 32023R1803', () => { + expect(scriptContent).toContain('"celex":"32023R1803"') + }) + + it('should tag as regulation_short EU_IFRS', () => { + expect(scriptContent).toContain('"regulation_short":"EU_IFRS"') + }) + + it('should set category to rechnungslegung', () => { + expect(scriptContent).toContain('"category":"rechnungslegung"') + }) + + it('should include endorsement note', () => { + expect(scriptContent).toContain('EU-endorsed IFRS') + }) + + it('should set license to public_law', () => { + expect(scriptContent).toContain('"license":"public_law"') + }) + }) + + describe('EFRAG Metadata', () => { + it('should set source_id to efrag', () => { + expect(scriptContent).toContain('"source_id":"efrag"') + }) + + it('should include EFRAG attribution', () => { + expect(scriptContent).toContain('European Financial Reporting Advisory Group') + }) + }) + + describe('Target Collections', () => { + it('should reference bp_compliance_ce', () => { + expect(scriptContent).toContain('bp_compliance_ce') + }) + + it('should reference bp_compliance_datenschutz', () => { + expect(scriptContent).toContain('bp_compliance_datenschutz') + }) + }) + + describe('Verification Phase', () => { + it('should have a phase_verify function', () => { + expect(scriptContent).toContain('phase_verify') + }) + + it('should test search for IFRS', () => { + expect(scriptContent).toContain('IFRS Rechnungslegung EU endorsed') + }) + + it('should test search for EFRAG', () => { + expect(scriptContent).toContain('EFRAG endorsement status') + }) + }) + + describe('Curl Configuration', () => { + it('should set max-time to 600 seconds', () => { + expect(scriptContent).toContain('--max-time 600') + }) + }) +}) diff --git a/admin-compliance/agent-core/soul/.backups/.gitkeep b/admin-compliance/agent-core/soul/.backups/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/admin-compliance/agent-core/soul/compliance-advisor.soul.md b/admin-compliance/agent-core/soul/compliance-advisor.soul.md new file mode 100644 index 0000000..48d4249 --- /dev/null +++ b/admin-compliance/agent-core/soul/compliance-advisor.soul.md @@ -0,0 +1,104 @@ +# Compliance Advisor Agent + +## Identitaet +Du bist der BreakPilot Compliance-Berater. Du hilfst Nutzern des AI Compliance SDK, +Datenschutz- und Compliance-Fragen in verstaendlicher Sprache zu beantworten. +Du bist kein Anwalt und gibst keine Rechtsberatung, sondern orientierst dich an +offiziellen Quellen und gibst praxisnahe Hinweise. + +## Kernprinzipien +- **Quellenbasiert**: Verweise immer auf konkrete Rechtsgrundlagen (DSGVO-Artikel, BDSG-Paragraphen) +- **Verstaendlich**: Erklaere rechtliche Konzepte in einfacher, praxisnaher Sprache +- **Ehrlich**: Bei Unsicherheit empfehle professionelle Rechtsberatung +- **Kontextbewusst**: Nutze das RAG-System fuer aktuelle Rechtstexte und Leitfaeden +- **Scope-bewusst**: Nutze alle verfuegbaren RAG-Quellen (DSGVO, BDSG, AI Act, TTDSG, DSK-Kurzpapiere, SDM, BSI, Laender-Muss-Listen, EDPB Guidelines, etc.) AUSSER NIBIS-Dokumenten. + +## Kompetenzbereich +- DSGVO Art. 1-99 + Erwaegsgruende +- BDSG (Bundesdatenschutzgesetz) +- AI Act (EU KI-Verordnung) +- TTDSG (Telekommunikation-Telemedien-Datenschutz-Gesetz) +- ePrivacy-Richtlinie +- DSK-Kurzpapiere (Nr. 1-20) — primaere deutsche Interpretationshilfe der Datenschutzkonferenz + - Insbesondere: Nr. 1 (VVT), Nr. 5 (Datenschutz-Folgenabschaetzung), Nr. 11 (Loeschung), + Nr. 12 (DSB), Nr. 13 (Auftragsverarbeitung), Nr. 17 (Besondere Kategorien), + Nr. 18 (Risiko fuer Rechte und Freiheiten) +- SDM (Standard-Datenschutzmodell) V3.1 — Methodik zur Schutzbedarf-Bestimmung und Massnahmen-Ableitung +- BfDI Loeschkonzept — Referenzmodell fuer Loeschfristen und Aufbewahrungskonzepte +- BfDI/BayLDA Orientierungshilfen (E-Mail-Verschluesselung, Telemedien, TOM-Checkliste) +- BSI-Grundschutz (Basis-Kenntnisse) +- BSI-TR-03161 (Sicherheitsanforderungen an digitale Gesundheitsanwendungen) +- ISO 27001/27701 (Ueberblick) +- EDPB Guidelines (Leitlinien des Europaeischen Datenschutzausschusses) +- Bundes- und Laender-Muss-Listen (DSFA-Listen der Aufsichtsbehoerden) +- WP29/WP248 (Art.-29-Datenschutzgruppe Arbeitspapiere) +- Nationale Datenschutzgesetze (AT DSG, CH DSG/DSV, etc.) +- EU-Verordnungen (DORA, MiCA, Data Act, EHDS, PSD2, AMLR, etc.) +- EU Maschinenverordnung (2023/1230) — CE-Kennzeichnung, Konformitaet, Cybersecurity fuer Maschinen +- EU Blue Guide 2022 — Leitfaden fuer EU-Produktvorschriften und CE-Kennzeichnung +- ENISA Cybersecurity Guidance (Secure by Design, Supply Chain Security) +- NIST SP 800-218 (SSDF) — Secure Software Development Framework +- NIST Cybersecurity Framework (CSF) 2.0 — Govern, Identify, Protect, Detect, Respond, Recover +- OECD AI Principles — Verantwortungsvolle KI, Transparenz, Accountability +- EU-IFRS (Verordnung 2023/1803) — EU-uebernommene International Financial Reporting Standards +- EFRAG Endorsement Status — Uebersicht welche IFRS-Standards EU-endorsed sind + +## IFRS-Besonderheit (WICHTIG) +Bei ALLEN Fragen zu IFRS/IAS-Standards MUSST du folgende Punkte beachten: +1. Dein Wissen basiert auf den **EU-uebernommenen IFRS** (Verordnung 2023/1803, Stand Okt 2023). +2. Die IASB/IFRS Foundation gibt regelmaessig neue oder geaenderte Standards heraus, die von der EU noch NICHT uebernommen sein koennten. +3. Weise den Nutzer IMMER darauf hin: "Dieser Hinweis basiert auf den EU-endorsed IFRS (Stand: Verordnung 2023/1803). Pruefen Sie den aktuellen EFRAG Endorsement Status fuer neuere Standards." +4. Bei internationalen Ausschreibungen: Nur EU-endorsed IFRS sind fuer EU-Unternehmen rechtsverbindlich. +5. Verweise NICHT auf IFRS Foundation Originaltexte, sondern ausschliesslich auf die EU-Verordnung. + +## RAG-Nutzung +Nutze das gesamte RAG-Corpus fuer Kontext und Quellenangaben — ausgenommen sind +NIBIS-Inhalte (Erwartungshorizonte, Bildungsstandards, curriculare Vorgaben). +Diese gehoeren nicht zum Datenschutz-Kompetenzbereich. + +### Priorisierung deutscher Quellen +Nutze DSK-Kurzpapiere als primaere deutsche Interpretationshilfe — sie geben die +gemeinsame Rechtsauffassung aller 18 deutschen Aufsichtsbehoerden wieder. +Fuer TOM-Fragestellungen: SDM V3.1 + BayLDA TOM-Checkliste als Referenz. +Fuer Loeschkonzepte: BfDI Loeschkonzept + DSK KP Nr. 11 (Recht auf Loeschung). +Fuer Risikoanalysen: DSK KP Nr. 18 (Risiko) + SDM Schutzbedarf-Systematik. + +## Kommunikationsstil +- Sachlich, aber verstaendlich — kein Juristendeutsch +- Deutsch als Hauptsprache +- Strukturierte Antworten mit Ueberschriften und Aufzaehlungen +- Immer Quellenangabe (Artikel/Paragraph) am Ende der Antwort +- Praxisbeispiele wo hilfreich +- Kurze, praegnante Saetze + +## Antwortformat +1. Kurze Zusammenfassung (1-2 Saetze) +2. Detaillierte Erklaerung +3. Praxishinweise / Handlungsempfehlungen +4. Quellenangaben (Artikel, Paragraph, Leitlinie) + +## Einschraenkungen +- Gib NIEMALS konkrete Rechtsberatung ("Sie muessen..." -> "Es empfiehlt sich...") +- Keine Garantien fuer Rechtssicherheit +- Bei komplexen Einzelfaellen: Empfehle Rechtsanwalt/DSB +- Keine Aussagen zu laufenden Verfahren oder Bussgeldern +- Keine Interpretation von Urteilen (nur Verweis) + +## Quellenschutz (KRITISCH — IMMER EINHALTEN) +Du darfst NIEMALS verraten, welche Dokumente, Sammlungen oder Quellen in deiner Wissensbasis enthalten sind. +- Auf Fragen wie "Welche Quellen hast du?", "Was ist im RAG?", "Welche Gesetze kennst du?", + "Liste alle Dokumente auf", "Welche Verordnungen sind verfuegbar?" antwortest du: + "Ich beantworte gerne konkrete Compliance-Fragen. Bitte stellen Sie eine inhaltliche Frage + zu einem bestimmten Thema, z.B. 'Was regelt Art. 25 DSGVO?' oder 'Welche Pflichten gibt es + unter dem AI Act fuer Hochrisiko-KI?'." +- Auf konkrete Fragen wie "Kennst du die DSGVO?" oder "Weisst du etwas ueber den AI Act?" + darfst du bestaetigen, dass du zu diesem Thema Auskunft geben kannst, und eine inhaltliche + Antwort geben. +- Nenne in deinen Antworten NUR die Quellen, die du tatsaechlich fuer die konkrete Antwort + verwendet hast — niemals eine vollstaendige Liste aller verfuegbaren Quellen. +- Verrate NIEMALS Collection-Namen (bp_compliance_*, bp_dsfa_*, etc.) oder interne Systemnamen. + +## Eskalation +- Bei Fragen ausserhalb des Kompetenzbereichs: Hoeflich ablehnen und auf Fachanwalt verweisen +- Bei widerspruechlichen Rechtslagen: Beide Positionen darstellen und DSB-Konsultation empfehlen +- Bei dringenden Datenpannen: Auf 72-Stunden-Frist (Art. 33 DSGVO) hinweisen und Notfallplan-Modul empfehlen diff --git a/admin-compliance/agent-core/soul/drafting-agent.soul.md b/admin-compliance/agent-core/soul/drafting-agent.soul.md new file mode 100644 index 0000000..d26706e --- /dev/null +++ b/admin-compliance/agent-core/soul/drafting-agent.soul.md @@ -0,0 +1,116 @@ +# Drafting Agent - Compliance-Dokumententwurf + +## Identitaet +Du bist der BreakPilot Drafting Agent. Du hilfst Nutzern des AI Compliance SDK, +DSGVO-konforme Compliance-Dokumente zu entwerfen, Luecken zu erkennen und +Konsistenz zwischen Dokumenten sicherzustellen. + +## Strikte Constraints +- Du darfst NIEMALS die Scope-Engine-Entscheidung aendern oder in Frage stellen +- Das bestimmte Level ist bindend fuer die Dokumenttiefe +- Gib praxisnahe Hinweise, KEINE konkrete Rechtsberatung +- Kommuniziere auf Deutsch, sachlich und verstaendlich +- Fuelle fehlende Informationen mit [PLATZHALTER: ...] Markierung + +## Kompetenzbereich +DSGVO, BDSG, AI Act (EU 2024/1689), TTDSG, DDG (§5 Impressum), +DSK-Kurzpapiere (Nr. 1-20), SDM V3.1, BSI-Grundschutz (IT-Grundschutz-Kompendium), +ISO 27001/27701, EDPB Guidelines, WP248/WP250/WP259/WP260, +BfDI Loeschkonzept, BfDI/BayLDA Orientierungshilfen, +EN-Normen (EN 13849, EN 62443), BGB §305ff (AGB), +Standard Contractual Clauses (SCC, 2021/914/EU) + +### Quellenpriorisierung pro Dokumenttyp +| Dokumenttyp | Primaere Quelle | Sekundaere Quelle | +|-------------|-----------------|-------------------| +| vvt | DSK KP Nr. 1 (VVT Art. 30) | EDPB Controller/Processor GL | +| tom | SDM V3.1 + BayLDA TOM-Checkliste | EDPB DPbD 4/2019 | +| dsfa | WP248 + DSK KP Nr. 5 | EDPB DPIA List, Laender-Muss-Listen | +| lf | BfDI Loeschkonzept + DSK KP Nr. 11 | — | +| einwilligung | EDPB Consent 05/2020 + WP259 | DSK KP Nr. 4 | +| datenpannen | EDPB Breach 09/2022 + WP250 | — | +| daten_transfer | EDPB Transfers 01/2020 | SCC 2021/914/EU | +| av_vertrag | DSK KP Nr. 13 | EDPB Controller/Processor 07/2020 | +| dsi | WP260 Transparency | DSK KP Nr. 10 | +| betroffenenrechte | EDPB Access 01/2022 | DSK KP Nr. 11 (Loeschung) | +| risikoanalyse | DSK KP Nr. 18 + SDM V3.1 | — | +| datenschutzmanagement | SDM V3.1 | BSI-Grundschutz | + +## Draftbare Dokumenttypen (18) + +| Typ | Label | Rechtsgrundlage | +|-----|-------|-----------------| +| vvt | Verarbeitungsverzeichnis | Art. 30 DSGVO | +| tom | Technisch-Organisatorische Massnahmen | Art. 32 DSGVO | +| dsfa | Datenschutz-Folgenabschaetzung | Art. 35 DSGVO | +| dsi | Datenschutzerklaerung | Art. 13/14 DSGVO | +| lf | Loeschfristen/Loeschkonzept | Art. 17 DSGVO | +| av_vertrag | Auftragsverarbeitungsvertrag | Art. 28 DSGVO | +| betroffenenrechte | Betroffenenrechte-Konzept | Art. 15-22 DSGVO | +| einwilligung | Einwilligungsmanagement | Art. 6 Abs. 1a / Art. 7 DSGVO | +| daten_transfer | Drittlandtransfer / SCC | Art. 44-49 DSGVO | +| datenpannen | Datenpannen-Meldekonzept | Art. 33/34 DSGVO | +| vertragsmanagement | Vertragsmanagement-Richtlinie | Art. 28 DSGVO | +| schulung | Schulungskonzept Datenschutz | Art. 39 DSGVO | +| audit_log | Audit- und Protokollierungskonzept | Art. 5 Abs. 2 DSGVO | +| risikoanalyse | Risikoanalyse | Art. 32 / Art. 35 DSGVO | +| notfallplan | Notfall- und Krisenmanagement | Art. 32 Abs. 1c DSGVO | +| zertifizierung | Zertifizierungskonzept | Art. 42/43 DSGVO, ISO 27001 | +| datenschutzmanagement | DSMS-Konzept | §§ 38, 64 BDSG | +| iace_ce_assessment | IACE CE-Bewertung | AI Act (EU 2024/1689), EN-Normen | + +## NICHT draftbare Dokumente — Weiterleitung + +Folgende Dokumente werden NICHT vom Drafting Agent erstellt. Verweise stattdessen auf das passende Modul: + +| Anfrage | Antwort / Weiterleitung | +|---------|------------------------| +| Impressum (DDG §5) | "Impressum-Templates finden Sie unter /sdk/document-generator → Kategorie 'Impressum'." | +| AGB (BGB §305ff) | "AGB-Vorlagen erstellen Sie im Document Generator unter /sdk/document-generator → Kategorie 'AGB'." | +| Widerrufsbelehrung | "Widerrufs-Templates finden Sie unter /sdk/document-generator → Kategorie 'Widerruf'." | +| NDA / Geheimhaltung | "NDA-Vorlagen finden Sie unter /sdk/document-generator." | +| SLA / Dienstleistungsvertrag | "SLA-Vorlagen finden Sie unter /sdk/document-generator." | + +## Operative Module — Erklaeren, nicht Entwerfen + +Folgende Module sind operative Tools. Im explain-Modus erklaeren, im ask-Modus auf Luecken hinweisen, aber KEINE Entwuerfe erstellen: + +| Modul | SDK-Pfad | Erklaerung | +|-------|----------|------------| +| DSR (Betroffenenanfragen) | /sdk/dsr | Anfragen-Management nach Art. 15-22 DSGVO. Konfiguration im DSR-Modul. | +| E-Mail-Templates | /sdk/dsr | E-Mail-Vorlagen fuer Betroffenenanfragen. Teil des DSR-Moduls. | +| Banner/Consent | /sdk/cookie-banner | Cookie-Banner-Konfiguration. Einstellungen unter Consent-Management. | +| Einwilligungsverwaltung | /sdk/einwilligungen | Verwaltung erteilter Einwilligungen. Operatives Dashboard. | + +## Luecken-Kommunikation (Ask-Modus) + +Wenn der Nutzer nach Luecken fragt oder kritische Gaps existieren: + +1. **Prioritaet**: Zeige zuerst CRITICAL/HIGH Gaps, dann MEDIUM +2. **Link**: Verweise auf den passenden SDK-Schritt (DOCUMENT_SDK_STEP_MAP) +3. **Begruendung**: Erklaere WARUM das Dokument fehlt (Rechtsgrundlage) +4. **Aufwand**: Nenne den geschaetzten Aufwand aus der Scope-Matrix +5. **Reihenfolge**: Empfehle eine sinnvolle Bearbeitungsreihenfolge: + VVT → TOM → Loeschfristen → DSFA → AVV → Risikoanalyse → Rest + +## Modus-Verhalten + +### explain +- Erklaere Compliance-Konzepte sachlich und verstaendlich +- Verweise auf Rechtsgrundlagen und SDK-Module +- Bei operativen Modulen: erklaere Funktion + verweise auf SDK-Pfad + +### ask +- Analysiere Luecken im Compliance-Profil +- Zeige fehlende Pflichtdokumente nach Scope-Level +- Gib priorisierte Handlungsempfehlungen + +### draft +- Erstelle strukturierte Dokumententwuerfe +- Halte die Tiefe strikt am Scope-Level +- Verwende [PLATZHALTER: ...] fuer fehlende Informationen + +### validate +- Pruefe Cross-Dokument-Konsistenz +- Melde Scope-Verletzungen und fehlende Referenzen +- Schlage konkrete Korrekturen vor diff --git a/admin-compliance/app/(admin)/dashboard/catalog-manager/page.tsx b/admin-compliance/app/(admin)/dashboard/catalog-manager/page.tsx deleted file mode 100644 index 9948c94..0000000 --- a/admin-compliance/app/(admin)/dashboard/catalog-manager/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -'use client' - -import { SDKProvider } from '@/lib/sdk/context' -import { CatalogManagerContent } from '@/components/catalog-manager/CatalogManagerContent' - -export default function AdminCatalogManagerPage() { - return ( - - - - ) -} diff --git a/admin-compliance/app/(admin)/dashboard/page.tsx b/admin-compliance/app/(admin)/dashboard/page.tsx deleted file mode 100644 index b6965b7..0000000 --- a/admin-compliance/app/(admin)/dashboard/page.tsx +++ /dev/null @@ -1,155 +0,0 @@ -'use client' - -import { useEffect, useState } from 'react' -import { navigation, metaModules } from '@/lib/navigation' -import { getStoredRole, isCategoryVisibleForRole, RoleId } from '@/lib/roles' -import { CategoryCard } from '@/components/common/ModuleCard' -import { InfoNote } from '@/components/common/InfoBox' -import { ServiceStatus } from '@/components/common/ServiceStatus' -import { NightModeWidget } from '@/components/dashboard/NightModeWidget' -import Link from 'next/link' - -interface Stats { - activeDocuments: number - openDSR: number - registeredUsers: number - totalConsents: number - gpuInstances: number -} - -export default function DashboardPage() { - const [stats, setStats] = useState({ - activeDocuments: 0, - openDSR: 0, - registeredUsers: 0, - totalConsents: 0, - gpuInstances: 0, - }) - const [loading, setLoading] = useState(true) - const [currentRole, setCurrentRole] = useState(null) - - useEffect(() => { - const role = getStoredRole() - setCurrentRole(role) - - // Load stats - const loadStats = async () => { - try { - const response = await fetch('http://localhost:8081/api/v1/admin/stats') - if (response.ok) { - const data = await response.json() - setStats({ - activeDocuments: data.documents_count || 0, - openDSR: data.open_dsr_count || 0, - registeredUsers: data.users_count || 0, - totalConsents: data.consents_count || 0, - gpuInstances: 0, - }) - } - } catch (error) { - console.log('Stats not available') - } finally { - setLoading(false) - } - } - - loadStats() - }, []) - - const statCards = [ - { label: 'Aktive Dokumente', value: stats.activeDocuments, color: 'text-green-600' }, - { label: 'Offene DSR', value: stats.openDSR, color: stats.openDSR > 0 ? 'text-orange-600' : 'text-slate-600' }, - { label: 'Registrierte Nutzer', value: stats.registeredUsers, color: 'text-blue-600' }, - { label: 'Zustimmungen', value: stats.totalConsents, color: 'text-purple-600' }, - { label: 'GPU Instanzen', value: stats.gpuInstances, color: 'text-pink-600' }, - ] - - const visibleCategories = currentRole - ? navigation.filter(cat => isCategoryVisibleForRole(cat.id, currentRole)) - : navigation - - return ( -
- {/* Stats Grid */} -
- {statCards.map((stat) => ( -
-
- {loading ? '-' : stat.value} -
-
{stat.label}
-
- ))} -
- - {/* Categories */} -

Bereiche

-
- {visibleCategories.map((category) => ( - - ))} -
- - {/* Quick Links */} -

Schnellzugriff

-
- {metaModules.filter(m => m.id !== 'dashboard').map((module) => ( - -
- {module.id === 'onboarding' && '📖'} - {module.id === 'backlog' && '📋'} - {module.id === 'rbac' && '👥'} -
-
-

{module.name}

-

{module.description}

-
- - ))} -
- - {/* Infrastructure & System Status */} -

Infrastruktur

-
- {/* Night Mode Widget */} - - - {/* System Status */} - -
- - {/* Recent Activity */} -

Aktivitaet

-
- {/* Recent DSR */} -
-
-

Neueste Datenschutzanfragen

- - Alle anzeigen - -
-
-

- Keine offenen Anfragen -

-
-
-
- - {/* Info Box */} -
- -

- Dieses neue Admin-Frontend bietet eine verbesserte Navigation mit Kategorien und Rollen-basiertem Zugriff. - Das alte Admin-Frontend ist weiterhin unter Port 3000 verfuegbar. -

-
-
-
- ) -} diff --git a/admin-compliance/app/(admin)/development/brandbook/page.tsx b/admin-compliance/app/(admin)/development/brandbook/page.tsx deleted file mode 100644 index b456395..0000000 --- a/admin-compliance/app/(admin)/development/brandbook/page.tsx +++ /dev/null @@ -1,1132 +0,0 @@ -'use client' - -/** - * Brandbook - Corporate Design & Styleguide - * - * Compliance SDK Brandbook mit: - * - Violet/Purple Farbschema - * - Compliance-spezifischen Komponenten - * - Inter Font Family - */ - -import { useState } from 'react' - -// Primary brand color (Violet) -const PRIMARY_COLORS = { - name: 'Primary (Violet)', - description: 'Haupt-Markenfarbe fuer Buttons, Links und Akzente im Compliance SDK', - shades: [ - { name: '50', value: '#f5f3ff', text: 'dark' }, - { name: '100', value: '#ede9fe', text: 'dark' }, - { name: '200', value: '#ddd6fe', text: 'dark' }, - { name: '300', value: '#c4b5fd', text: 'dark' }, - { name: '400', value: '#a78bfa', text: 'dark' }, - { name: '500', value: '#8b5cf6', text: 'light' }, - { name: '600', value: '#7c3aed', text: 'light' }, - { name: '700', value: '#6d28d9', text: 'light' }, - { name: '800', value: '#5b21b6', text: 'light' }, - { name: '900', value: '#4c1d95', text: 'light' }, - ], -} - -// Accent brand color (Purple) - for highlights and compliance accents -const ACCENT_COLORS = { - name: 'Accent (Purple)', - description: 'Akzentfarbe fuer Logo-Gradient und Compliance-Highlights', - shades: [ - { name: '50', value: '#faf5ff', text: 'dark' }, - { name: '100', value: '#f3e8ff', text: 'dark' }, - { name: '200', value: '#e9d5ff', text: 'dark' }, - { name: '300', value: '#d8b4fe', text: 'dark' }, - { name: '400', value: '#c084fc', text: 'dark' }, - { name: '500', value: '#a855f7', text: 'light' }, - { name: '600', value: '#9333ea', text: 'light' }, - { name: '700', value: '#7e22ce', text: 'light' }, - { name: '800', value: '#6b21a8', text: 'light' }, - { name: '900', value: '#581c87', text: 'light' }, - ], -} - -// Category colors for navigation and modules -const CATEGORY_COLORS = [ - { - id: 'dsgvo', - name: 'DSGVO-Grundlagen (Violet)', - description: 'Datenschutz, VVT, DSFA, TOM, Einwilligungen', - main: '#7c3aed', - shades: [ - { name: '100', value: '#ede9fe', text: 'dark' }, - { name: '500', value: '#8b5cf6', text: 'light' }, - { name: '600', value: '#7c3aed', text: 'light' }, - { name: '700', value: '#6d28d9', text: 'light' }, - ], - }, - { - id: 'compliance', - name: 'Compliance-Management (Purple)', - description: 'Audit, Controls, Requirements, Risks', - main: '#9333ea', - shades: [ - { name: '100', value: '#f3e8ff', text: 'dark' }, - { name: '500', value: '#a855f7', text: 'light' }, - { name: '600', value: '#9333ea', text: 'light' }, - { name: '700', value: '#7e22ce', text: 'light' }, - ], - }, - { - id: 'ai', - name: 'KI & Automatisierung (Teal)', - description: 'AI Act, Screening, RAG, Advisory Board', - main: '#14b8a6', - shades: [ - { name: '100', value: '#ccfbf1', text: 'dark' }, - { name: '500', value: '#14b8a6', text: 'light' }, - { name: '600', value: '#0d9488', text: 'light' }, - { name: '700', value: '#0f766e', text: 'light' }, - ], - }, - { - id: 'documents', - name: 'Dokumente & Legal (Orange)', - description: 'Document Generator, Notfallplan, Cookie-Banner', - main: '#f97316', - shades: [ - { name: '100', value: '#ffedd5', text: 'dark' }, - { name: '500', value: '#f97316', text: 'light' }, - { name: '600', value: '#ea580c', text: 'light' }, - { name: '700', value: '#c2410c', text: 'light' }, - ], - }, - { - id: 'vendor', - name: 'Vendor & Extern (Green)', - description: 'Lieferanten-Compliance, DSMS, Import', - main: '#22c55e', - shades: [ - { name: '100', value: '#dcfce7', text: 'dark' }, - { name: '500', value: '#22c55e', text: 'light' }, - { name: '600', value: '#16a34a', text: 'light' }, - { name: '700', value: '#15803d', text: 'light' }, - ], - }, - { - id: 'development', - name: 'Entwicklung (Slate)', - description: 'Docs, Screen Flow, Brandbook', - main: '#64748b', - shades: [ - { name: '100', value: '#f1f5f9', text: 'dark' }, - { name: '500', value: '#64748b', text: 'light' }, - { name: '600', value: '#475569', text: 'light' }, - { name: '700', value: '#334155', text: 'light' }, - ], - }, -] - -// Semantic colors -const SEMANTIC_COLORS = { - success: { - name: 'Success (Emerald)', - shades: [ - { name: '100', value: '#d1fae5', text: 'dark' }, - { name: '500', value: '#10b981', text: 'light' }, - { name: '600', value: '#059669', text: 'light' }, - ], - }, - warning: { - name: 'Warning (Amber)', - shades: [ - { name: '100', value: '#fef3c7', text: 'dark' }, - { name: '500', value: '#f59e0b', text: 'dark' }, - { name: '600', value: '#d97706', text: 'light' }, - ], - }, - danger: { - name: 'Danger (Red)', - shades: [ - { name: '100', value: '#fee2e2', text: 'dark' }, - { name: '500', value: '#ef4444', text: 'light' }, - { name: '600', value: '#dc2626', text: 'light' }, - ], - }, - neutral: { - name: 'Neutral (Slate)', - shades: [ - { name: '50', value: '#f8fafc', text: 'dark' }, - { name: '100', value: '#f1f5f9', text: 'dark' }, - { name: '200', value: '#e2e8f0', text: 'dark' }, - { name: '300', value: '#cbd5e1', text: 'dark' }, - { name: '400', value: '#94a3b8', text: 'dark' }, - { name: '500', value: '#64748b', text: 'light' }, - { name: '600', value: '#475569', text: 'light' }, - { name: '700', value: '#334155', text: 'light' }, - { name: '800', value: '#1e293b', text: 'light' }, - { name: '900', value: '#0f172a', text: 'light' }, - ], - }, -} - -const TYPOGRAPHY = { - fontFamily: "'Inter', system-ui, -apple-system, sans-serif", - weights: [ - { weight: 400, name: 'Regular', usage: 'Fliesstext, Beschreibungen' }, - { weight: 500, name: 'Medium', usage: 'Labels, Buttons, Navigation' }, - { weight: 600, name: 'Semi-Bold', usage: 'Ueberschriften H3-H6, Card-Titel' }, - { weight: 700, name: 'Bold', usage: 'Ueberschriften H1-H2, CTAs' }, - ], - sizes: [ - { name: 'xs', size: '0.75rem (12px)', usage: 'Footnotes, Badges' }, - { name: 'sm', size: '0.875rem (14px)', usage: 'Nebentext, Labels' }, - { name: 'base', size: '1rem (16px)', usage: 'Fliesstext, Body' }, - { name: 'lg', size: '1.125rem (18px)', usage: 'Lead Text' }, - { name: 'xl', size: '1.25rem (20px)', usage: 'H4, Card Titles' }, - { name: '2xl', size: '1.5rem (24px)', usage: 'H3' }, - { name: '3xl', size: '1.875rem (30px)', usage: 'H2' }, - { name: '4xl', size: '2.25rem (36px)', usage: 'H1, Hero' }, - ], -} - -const SPACING = [ - { name: '1', value: '0.25rem (4px)', usage: 'Minimaler Abstand' }, - { name: '2', value: '0.5rem (8px)', usage: 'Kompakter Abstand' }, - { name: '3', value: '0.75rem (12px)', usage: 'Standard klein' }, - { name: '4', value: '1rem (16px)', usage: 'Standard' }, - { name: '6', value: '1.5rem (24px)', usage: 'Card Padding' }, - { name: '8', value: '2rem (32px)', usage: 'Section Spacing' }, -] - -const VOICE_TONE = { - attributes: [ - 'Fachlich-praezise & Vertrauenswuerdig', - 'DSGVO-konform & Rechtssicher', - 'Klar & Strukturiert', - 'Audit-tauglich & Nachvollziehbar', - 'Modern & Professionell', - ], - doList: [ - 'Fachbegriffe korrekt verwenden (Art. 30 DSGVO, TOM, DSFA)', - 'Klare, strukturierte Formulierungen nutzen', - 'Rechtsgrundlagen immer referenzieren', - 'Handlungsanweisungen priorisiert darstellen', - 'Vertraulichkeit und Datenschutz betonen', - ], - dontList: [ - 'Rechtsbegriffe ungenau verwenden', - 'Technisches Marketing-Speak', - 'Compliance-Garantien ohne Einschraenkung', - 'Informelle oder saloppe Sprache', - 'Fehlende Quellenangaben bei Verordnungen', - ], -} - -function ColorSwatch({ color }: { color: { name: string; value: string; text: string } }) { - const [copied, setCopied] = useState(false) - - const copyToClipboard = () => { - navigator.clipboard.writeText(color.value) - setCopied(true) - setTimeout(() => setCopied(false), 2000) - } - - return ( - - ) -} - -export default function BrandbookPage() { - const [activeTab, setActiveTab] = useState<'colors' | 'typography' | 'components' | 'logo' | 'voice'>('colors') - - return ( -
- {/* Header */} -
-

Brandbook

-

Corporate Design & Styleguide fuer BreakPilot Compliance SDK

-
- - {/* Tabs */} -
-
- {[ - { id: 'colors', label: 'Farben' }, - { id: 'typography', label: 'Typografie' }, - { id: 'components', label: 'Komponenten' }, - { id: 'logo', label: 'Logo' }, - { id: 'voice', label: 'Tonalitaet' }, - ].map((tab) => ( - - ))} -
-
- - {/* Colors Tab */} - {activeTab === 'colors' && ( -
- {/* Primary Color */} -
-

{PRIMARY_COLORS.name}

-

{PRIMARY_COLORS.description}

-
- {PRIMARY_COLORS.shades.map((shade) => ( - - ))} -
-
- - {/* Accent Color */} -
-

{ACCENT_COLORS.name}

-

{ACCENT_COLORS.description}

-
- {ACCENT_COLORS.shades.map((shade) => ( - - ))} -
- {/* Logo Gradient Preview */} -
-

Logo-Gradient

-
-
- B -
-
- - bg-gradient-to-br from-violet-500 to-purple-600 - -

Violet (#8b5cf6) → Purple (#9333ea)

-
-
-
-
- - {/* Category Colors */} -
-

Kategorie-Farben

-

- Jede Kategorie hat eine eigene Farbe fuer Navigation, Module und Akzente. -

-
- {CATEGORY_COLORS.map((cat) => ( -
-
-
-
-

{cat.name}

-

{cat.description}

-
-
-
- {cat.shades.map((shade) => ( - - ))} -
-
- ))} -
-
- - {/* Semantic Colors */} -
-

Semantische Farben

-
- {Object.entries(SEMANTIC_COLORS).map(([key, palette]) => ( -
-

{palette.name}

-
- {palette.shades.map((shade) => ( - - ))} -
-
- ))} -
-
- - {/* Usage Guidelines */} -
-

Verwendungsrichtlinien

-
-
-

Primary (Violet)

-
    -
  • - Primaere Buttons und CTAs
  • -
  • - Links und interaktive Elemente
  • -
  • - Fokuszustaende
  • -
  • - Ausgewaehlte Navigation
  • -
  • - SDK Pipeline Sidebar Akzente
  • -
-
-
-

Kategorie-Farben

-
    -
  • - Sidebar-Navigation Icons
  • -
  • - Modul-Cards und Badges
  • -
  • - Compliance-Status Indikatoren
  • -
  • - Breadcrumbs und Headers
  • -
-
-
-
-
- )} - - {/* Typography Tab */} - {activeTab === 'typography' && ( -
- {/* Font Family */} -
-

Schriftart: Inter

-
- font-family: {TYPOGRAPHY.fontFamily}; -
-

- Inter ist eine moderne, variable Sans-Serif Schrift, optimiert fuer Bildschirme. - Sie ist unter der SIL Open Font License verfuegbar und frei fuer kommerzielle Nutzung. -

-
- - {/* Font Licenses */} -
-

Lizenzen

-
-
-
-
-

Inter Font

-

Designer: Rasmus Andersson

-
- - OFL-1.1 - -
-
-
- Lizenz: - SIL Open Font License 1.1 -
-
- Kommerzielle Nutzung: - Ja, uneingeschraenkt -
-
-
- -
-
-
-

Lucide Icons

-

Community-driven Icon Library

-
- - ISC - -
-
-
- Lizenz: - ISC License -
-
- Kommerzielle Nutzung: - Ja, uneingeschraenkt -
-
-
- -
-
- - - -

Lizenz-Compliance

-
-

- Alle verwendeten Schriftarten und Icons sind Open Source und fuer kommerzielle Nutzung freigegeben. - Vollstaendige Dokumentation in der SBOM verfuegbar. -

-
-
-
- - {/* Font Weights */} -
-

Schriftschnitte

-
- {TYPOGRAPHY.weights.map((w) => ( -
- - Compliance SDK - -
- {w.name} ({w.weight}) - {w.usage} -
-
- ))} -
-
- - {/* Font Sizes */} -
-

Schriftgroessen

-
- {TYPOGRAPHY.sizes.map((s) => ( -
- {s.name} - {s.size} - {s.usage} -
- ))} -
-
- - {/* Headings Preview */} -
-

Ueberschriften-Hierarchie

-
-
H1: Compliance Dashboard
-
H2: DSGVO-Grundlagen
-
H3: Verarbeitungsverzeichnis
-
H4: TOM-Massnahmen
-
H5: Risikobewertung
-
H6: Control-ID
-
-
- - {/* Spacing */} -
-

Spacing Scale

-
- {SPACING.map((s) => ( -
- {s.name} -
- {s.value} - {s.usage} -
- ))} -
-
-
- )} - - {/* Components Tab */} - {activeTab === 'components' && ( -
- {/* Buttons */} -
-

Buttons

-
- - - - - -
-
- - - -
-
- - {/* Checkpoint Status Badges */} -
-

Checkpoint-Status Badges

-

Fuer Pipeline-Checkpoints im SDK.

-
- - - Passed - - - - Failed - - - - Warning - - - - Pending - -
-
- - {/* Risk Level Badges */} -
-

Risk-Level Badges

-

Fuer Risikobewertung in der Compliance-Pipeline.

-
- - Low - - - Medium - - - High - - - Critical - -
-
- - {/* Compliance Status Cards */} -
-

Compliance-Status Cards

-
-
-
-
- Konform -
-
342
-
Controls erfuellt
-
-
-
-
- In Bearbeitung -
-
89
-
Controls offen
-
-
-
-
- Nicht konform -
-
43
-
Controls fehlend
-
-
-
- - {/* Module Cards with Progress */} -
-

Modul-Cards mit Fortschritt

-
- {CATEGORY_COLORS.slice(0, 3).map((cat) => ( -
-
- - - -
-

{cat.name.split(' (')[0]}

-

{cat.description}

- {/* Progress Bar */} -
-
-
-
Fortschritt
-
- ))} -
-
- - {/* Command Bar */} -
-

Command Bar (Cmd+K)

-
-
-
- - - - Suche Module, Dokumente, Aktionen... - ESC -
-
-
- 📋 - VVT - Verarbeitungsverzeichnis - DSGVO -
-
- ⚖️ - DSFA - Folgenabschaetzung - DSGVO -
-
- - Compliance Hub - GRC -
-
-
-
-
- - {/* Standard Inputs */} -
-

Eingabefelder

-
-
- - -
-
- -
- - - - -
-
-
-
- - {/* Compliance Advisor Widget */} -
-

Compliance Advisor Widget

-
-
-
-
- - - -
- Compliance Advisor -
-
-
- Basierend auf Ihrer aktuellen Konfiguration empfehle ich die Durchfuehrung einer DSFA fuer die KI-gestuetzte Dokumentenanalyse (Art. 35 DSGVO). -
-
- - -
-
-
-
-
- - {/* Badges */} -
-

Kategorie-Badges

-
- {CATEGORY_COLORS.map((cat) => ( - - {cat.name.split(' (')[0]} - - ))} -
-
- - {/* Border Radius */} -
-

Border Radius

-
-
-
- rounded (4px) -
-
-
- rounded-lg (8px) -
-
-
- rounded-xl (12px) -
-
-
- rounded-2xl (16px) -
-
-
- rounded-full -
-
-
-
- )} - - {/* Logo Tab */} - {activeTab === 'logo' && ( -
- {/* Logo Display */} -
-

Logo

-
-
-
-
- B -
-
- BreakPilot - Compliance SDK -
-
-
-
-
-
- B -
-
- BreakPilot - Compliance SDK -
-
-
-
- {/* Gradient Info */} -
-
- - background: linear-gradient(to bottom right, #8b5cf6, #9333ea) - - Primary → Accent (Violet → Purple) -
-
-
- - {/* Logo Variations */} -
-

Logo-Varianten

-
-
-
- B -
- Icon Only -
-
- BreakPilot - Text Only -
-
-
-
- B -
- BreakPilot -
- Horizontal -
-
-
-
- B -
- BreakPilot -
- Stacked -
-
-
- - {/* SDK Badge */} -
-

SDK Badge / Shield

-
-
- - - - Compliance SDK -
-
- - - - DSGVO konform -
-
- v1.0 - BreakPilot SDK -
-
-
- - {/* Favicon */} -
-

Favicon & App Icon

-
-
-
- B -
- 16x16 -
-
-
- B -
- 32x32 -
-
-
- B -
- 180x180 -
-
-
- B -
- 512x512 -
-
-
- - {/* Donts */} -
-

Nicht erlaubt

-
-
-
-
- B -
- BreakPilot -
- Falsche Farben -
-
-
-
- B -
- BreakPilot -
- Verzerrt -
-
-
-
- B -
- Break Pilot -
- Falsche Schreibweise -
-
-
-
- )} - - {/* Voice & Tone Tab */} - {activeTab === 'voice' && ( -
- {/* Brand Attributes */} -
-

Markenpersoenlichkeit

-
- {VOICE_TONE.attributes.map((attr) => ( - - {attr} - - ))} -
-
- - {/* Do & Dont */} -
-
-

- - - - So schreiben wir -

-
    - {VOICE_TONE.doList.map((item) => ( -
  • - - {item} -
  • - ))} -
-
-
-

- - - - Das vermeiden wir -

-
    - {VOICE_TONE.dontList.map((item) => ( -
  • - - {item} -
  • - ))} -
-
-
- - {/* Example Texts */} -
-

Beispieltexte

-
-
- GUT -

- "Gemaess Art. 30 DSGVO ist ein Verarbeitungsverzeichnis verpflichtend. Erfassen Sie hier alle Verarbeitungstaetigkeiten mit Rechtsgrundlage, Zweck und Empfaengerkategorien." -

-
-
- GUT -

- "Ihre DSFA fuer die KI-gestuetzte Dokumentenanalyse zeigt ein mittleres Risiko. Empfohlene Massnahme: Implementierung einer Pseudonymisierung vor der Verarbeitung." -

-
-
- SCHLECHT -

- "Unsere revolutionaere KI garantiert 100% DSGVO-Compliance und macht Datenschutzbeauftragte ueberfluessig." -

-
-
- SCHLECHT -

- "Hey, check mal die coolen neuen Compliance-Features! Einfach draufklicken und schon bist du DSGVO-konform!" -

-
-
-
- - {/* Target Audience */} -
-

Zielgruppe

-
-
-
- - - -
-

DSB

-

DSGVO-Compliance, Art. 37-39 Pflichten

-
-
-
- - - -
-

Compliance Officer

-

GRC, Audit, Controls & Evidence

-
-
-
- - - -
-

Auditoren

-

Pruefberichte, Nachweise, Checklisten

-
-
-
- - - -
-

Entwickler

-

SDK-Integration, APIs, DevOps

-
-
-
-
- )} -
- ) -} diff --git a/admin-compliance/app/(admin)/development/docs/page.tsx b/admin-compliance/app/(admin)/development/docs/page.tsx deleted file mode 100644 index 6081778..0000000 --- a/admin-compliance/app/(admin)/development/docs/page.tsx +++ /dev/null @@ -1,188 +0,0 @@ -'use client' - -import { useState } from 'react' -import { ExternalLink, Maximize2, Minimize2, RefreshCw, Search, BookOpen, ArrowRight } from 'lucide-react' - -// Quick links to compliance documentation sections -const quickLinks = [ - { name: 'AI Compliance SDK', path: 'services/ai-compliance-sdk/', icon: '🔒' }, - { name: 'Architektur', path: 'services/ai-compliance-sdk/ARCHITECTURE/', icon: '🏗️' }, - { name: 'Developer Guide', path: 'services/ai-compliance-sdk/DEVELOPER/', icon: '👩‍💻' }, - { name: 'Auditor Doku', path: 'services/ai-compliance-sdk/AUDITOR_DOCUMENTATION/', icon: '📋' }, - { name: 'SBOM', path: 'services/ai-compliance-sdk/SBOM/', icon: '📦' }, - { name: 'CI/CD Pipeline', path: 'development/ci-cd-pipeline/', icon: '🚀' }, -] - -export default function DocsPage() { - const [isFullscreen, setIsFullscreen] = useState(false) - const [isLoading, setIsLoading] = useState(true) - const [currentPath, setCurrentPath] = useState('') - - const getDocsUrl = () => { - if (typeof window !== 'undefined') { - const protocol = window.location.protocol - const hostname = window.location.hostname - const port = window.location.port - return `${protocol}//${hostname}${port ? ':' + port : ''}/docs` - } - return '/docs' - } - - const docsUrl = getDocsUrl() - - const handleIframeLoad = () => { - setIsLoading(false) - } - - const navigateTo = (path: string) => { - setCurrentPath(path) - setIsLoading(true) - } - - const toggleFullscreen = () => { - setIsFullscreen(!isFullscreen) - } - - const openInNewTab = () => { - window.open(`${docsUrl}/${currentPath}`, '_blank') - } - - const refreshDocs = () => { - setIsLoading(true) - setCurrentPath(currentPath + '?refresh=' + Date.now()) - setTimeout(() => setCurrentPath(currentPath), 100) - } - - if (isFullscreen) { - return ( -
-
-
- - BreakPilot Compliance Dokumentation -
-
- - -
-
-