Files
breakpilot-compliance/admin-compliance
Benjamin Admin b663e2508f
CI / secret-scan (push) Has been skipped
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / validate-canonical-controls (push) Successful in 17s
CI / loc-budget (push) Failing after 18s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 3m5s
CI / test-go (push) Failing after 54s
CI / iace-gt-coverage (push) Successful in 27s
CI / test-python-backend (push) Successful in 47s
CI / detect-changes (push) Successful in 13s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / test-python-document-crawler (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
feat(audit): P107 Branchen-Benchmark-Cockpit fuer Big-4-Demos
benchmark_extractor.py — extract_kpis() liefert 18 KPIs pro Snapshot:
* vendors_total, vendors_us, vendors_non_eu (mit % je Vendor-Land)
* source_breakdown (llm/library/flat_pattern/table_paste/html_table_dom)
* max/avg cookies_per_vendor (Konzentrations-Mass)
* cookies_in_browser, cookies_detailed_count, cookie_doc_chars
* banner_detected, banner_provider, banner_violations
* compliance_score, data_quality_pct (wie viele unserer Datenquellen
  haben Inhalt)
* saving_low/high_eur (Heuristik: (vendors - 10) × 1k-5k)

anonymize_kpis() ersetzt site_label durch 'OEM 1/2/3' (Industry-Prefix
Map: automotive→OEM, banking→Bank, chemistry→Chem, luftfahrt→Airline).

GET /api/compliance/agent/admin/benchmark?industry=automotive&sites=
VW,BMW,Mercedes&anonymized=true — liefert kpis + summary
(n_sites, avg_vendors, total_saving_high).

Admin-Page /sdk/benchmark:
* Filter-Leiste: Industry-Dropdown, Sites-Input + 5 Preset-Gruppen
  (Automotive OEMs / Zulieferer, Chemie DAX, Luftfahrt, Banking DAX)
* Anonymize-Toggle prominent
* 5 Summary-KPI-Karten oben
* Vergleichstabelle 13 Spalten (Score, Vendors, US%, Drittland%,
  Cookies-Browser, Cookie-Doc-kB, Banner ✓/✗, Provider, Verstoesse,
  Saving €/Jahr, Daten-Qualitaet, Captured-Time)
* Red-/Amber-/Green-Indikatoren bei US%/Score/Drittland
* Big-4-Hinweis-Footer

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 09:23:37 +02:00
..

admin-compliance

Next.js 15 dashboard for BreakPilot Compliance — SDK module UI, company profile, DSR, DSFA, VVT, TOM, consent, AI Act, training, audit, change requests, etc. Also hosts 96+ API routes that proxy/orchestrate backend services.

Port: 3007 (container: bp-compliance-admin) Stack: Next.js 15 App Router, React 18, TailwindCSS, TypeScript strict.

Architecture (Phase 3 — in progress)

app/
├── <route>/
│   ├── page.tsx              # Server Component (≤200 LOC)
│   ├── _components/          # Colocated UI, each ≤300 LOC
│   ├── _hooks/               # Client hooks
│   └── _server/              # Server actions
├── api/<domain>/route.ts     # Thin handlers → lib/server/<domain>/
lib/
├── <domain>/                 # Pure helpers, zod schemas
└── server/<domain>/          # "server-only" logic
components/                   # App-wide shared UI

See ../AGENTS.typescript.md.

Run locally

cd admin-compliance
npm install
npm run dev          # http://localhost:3007

Tests

npm test                      # Vitest unit + component tests
npx playwright test           # E2E
npx tsc --noEmit              # Type-check
npx next lint

Known debt

  • lib/sdk/types.ts has been split: it is now a barrel re-export to lib/sdk/types/ (12 domain files: enums, company-profile, sdk-steps, and others).
  • lib/sdk/tom-generator/controls/loader.ts has been split: it is now a barrel re-export to categories/ (8 category files).
  • Phase 3 refactoring is ongoing — several large page files remain and are being addressed incrementally.
  • 0 test files for the page layer. Adding Playwright smoke + Vitest unit coverage is ongoing Phase 3 work.

Don't touch

  • Backend API paths without updating backend-compliance/ in the same change.
  • lib/sdk/types/ barrel re-exports — add new types to the appropriate domain file, not back into the root.