From 03708d9e5bd07a69c26c069542bf28b672794ca3 Mon Sep 17 00:00:00 2001 From: Benjamin Boenisch Date: Wed, 25 Feb 2026 23:03:03 +0100 Subject: [PATCH] feat(iace): sync IACE frontend, API routes, and scope engine updates from breakpilot-pwa - Add IACE project pages (classification, evidence, hazards, mitigations, monitoring, tech-file, verification) - Add IACE API catch-all route - Update compliance-scope-engine with IACE AI Act product triggers - Update compliance-scope-types, navigation, roles, and sidebar for IACE - Update company-profile page --- .../app/(sdk)/sdk/company-profile/page.tsx | 516 +++++++++++++- .../iace/[projectId]/classification/page.tsx | 277 ++++++++ .../sdk/iace/[projectId]/components/page.tsx | 468 +++++++++++++ .../sdk/iace/[projectId]/evidence/page.tsx | 393 +++++++++++ .../sdk/iace/[projectId]/hazards/page.tsx | 628 ++++++++++++++++++ .../sdk/iace/[projectId]/mitigations/page.tsx | 413 ++++++++++++ .../sdk/iace/[projectId]/monitoring/page.tsx | 512 ++++++++++++++ .../app/(sdk)/sdk/iace/[projectId]/page.tsx | 297 +++++++++ .../sdk/iace/[projectId]/tech-file/page.tsx | 416 ++++++++++++ .../iace/[projectId]/verification/page.tsx | 483 ++++++++++++++ .../app/(sdk)/sdk/iace/layout.tsx | 141 ++++ admin-compliance/app/(sdk)/sdk/iace/page.tsx | 337 ++++++++++ .../app/api/sdk/v1/iace/[[...path]]/route.ts | 147 ++++ .../components/layout/Sidebar.tsx | 8 +- admin-compliance/lib/navigation.ts | 337 ++++++++-- admin-compliance/lib/roles.ts | 17 +- .../lib/sdk/compliance-scope-engine.ts | 232 ++++++- .../lib/sdk/compliance-scope-types.ts | 53 +- 18 files changed, 5565 insertions(+), 110 deletions(-) create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/classification/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/components/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/evidence/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/hazards/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/mitigations/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/monitoring/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/tech-file/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/[projectId]/verification/page.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/layout.tsx create mode 100644 admin-compliance/app/(sdk)/sdk/iace/page.tsx create mode 100644 admin-compliance/app/api/sdk/v1/iace/[[...path]]/route.ts diff --git a/admin-compliance/app/(sdk)/sdk/company-profile/page.tsx b/admin-compliance/app/(sdk)/sdk/company-profile/page.tsx index 23f71fd..07b1534 100644 --- a/admin-compliance/app/(sdk)/sdk/company-profile/page.tsx +++ b/admin-compliance/app/(sdk)/sdk/company-profile/page.tsx @@ -9,10 +9,19 @@ import { TargetMarket, CompanySize, LegalForm, + MachineBuilderProfile, + MachineProductType, + AIIntegrationType, + HumanOversightLevel, + CriticalSector, BUSINESS_MODEL_LABELS, OFFERING_TYPE_LABELS, TARGET_MARKET_LABELS, COMPANY_SIZE_LABELS, + MACHINE_PRODUCT_TYPE_LABELS, + AI_INTEGRATION_TYPE_LABELS, + HUMAN_OVERSIGHT_LABELS, + CRITICAL_SECTOR_LABELS, SDKCoverageAssessment, } from '@/lib/sdk/types' @@ -20,14 +29,26 @@ import { // WIZARD STEPS // ============================================================================= -const WIZARD_STEPS = [ +const BASE_WIZARD_STEPS = [ { id: 1, name: 'Basisinfos', description: 'Firmenname und Rechtsform' }, - { id: 2, name: 'Geschäftsmodell', description: 'B2B, B2C und Angebote' }, - { id: 3, name: 'Firmengröße', description: 'Mitarbeiter und Umsatz' }, - { id: 4, name: 'Standorte', description: 'Hauptsitz und Zielmärkte' }, + { id: 2, name: 'Geschaeftsmodell', description: 'B2B, B2C und Angebote' }, + { id: 3, name: 'Firmengroesse', description: 'Mitarbeiter und Umsatz' }, + { id: 4, name: 'Standorte', description: 'Hauptsitz und Zielmaerkte' }, { id: 5, name: 'Datenschutz', description: 'Rollen und KI-Nutzung' }, ] +const MACHINE_BUILDER_STEP = { id: 6, name: 'Produkt & Maschine', description: 'Software, KI und CE in Ihrem Produkt' } + +function getWizardSteps(industry: string) { + if (isMachineBuilderIndustry(industry)) { + return [...BASE_WIZARD_STEPS, MACHINE_BUILDER_STEP] + } + return BASE_WIZARD_STEPS +} + +// Keep WIZARD_STEPS for backwards compat in static references +const WIZARD_STEPS = BASE_WIZARD_STEPS + // ============================================================================= // LEGAL FORMS // ============================================================================= @@ -61,9 +82,25 @@ const INDUSTRIES = [ 'Produktion / Industrie', 'Logistik / Transport', 'Immobilien', + 'Maschinenbau', + 'Anlagenbau', + 'Automatisierung', + 'Robotik', + 'Messtechnik', 'Sonstige', ] +const MACHINE_BUILDER_INDUSTRIES = [ + 'Maschinenbau', + 'Anlagenbau', + 'Automatisierung', + 'Robotik', + 'Messtechnik', +] + +const isMachineBuilderIndustry = (industry: string) => + MACHINE_BUILDER_INDUSTRIES.includes(industry) + // ============================================================================= // HELPER: ASSESS SDK COVERAGE // ============================================================================= @@ -504,6 +541,423 @@ function StepDataProtection({ ) } +// ============================================================================= +// STEP 6: PRODUKT & MASCHINE (nur fuer Maschinenbauer) +// ============================================================================= + +const EMPTY_MACHINE_BUILDER: MachineBuilderProfile = { + productTypes: [], + productDescription: '', + productPride: '', + containsSoftware: false, + containsFirmware: false, + containsAI: false, + aiIntegrationType: [], + hasSafetyFunction: false, + safetyFunctionDescription: '', + autonomousBehavior: false, + humanOversightLevel: 'full', + isNetworked: false, + hasRemoteAccess: false, + hasOTAUpdates: false, + updateMechanism: '', + exportMarkets: [], + criticalSectorClients: false, + criticalSectors: [], + oemClients: false, + ceMarkingRequired: false, + existingCEProcess: false, + hasRiskAssessment: false, +} + +function StepMachineBuilder({ + data, + onChange, +}: { + data: Partial + onChange: (updates: Partial) => void +}) { + const mb = data.machineBuilder || EMPTY_MACHINE_BUILDER + + const updateMB = (updates: Partial) => { + onChange({ machineBuilder: { ...mb, ...updates } }) + } + + const toggleProductType = (type: MachineProductType) => { + const current = mb.productTypes || [] + if (current.includes(type)) { + updateMB({ productTypes: current.filter(t => t !== type) }) + } else { + updateMB({ productTypes: [...current, type] }) + } + } + + const toggleAIType = (type: AIIntegrationType) => { + const current = mb.aiIntegrationType || [] + if (current.includes(type)) { + updateMB({ aiIntegrationType: current.filter(t => t !== type) }) + } else { + updateMB({ aiIntegrationType: [...current, type] }) + } + } + + const toggleCriticalSector = (sector: CriticalSector) => { + const current = mb.criticalSectors || [] + if (current.includes(sector)) { + updateMB({ criticalSectors: current.filter(s => s !== sector) }) + } else { + updateMB({ criticalSectors: [...current, sector] }) + } + } + + return ( +
+ {/* Block 1: Erzaehlen Sie uns von Ihrer Anlage */} +
+

Erzaehlen Sie uns von Ihrer Anlage

+

+ Je besser wir Ihr Produkt verstehen, desto praeziser koennen wir die relevanten Vorschriften identifizieren. +

+ +
+
+ +