import type { SystemInfoConfig } from './types' export const onboardingConfig: SystemInfoConfig = { title: 'Onboarding System-Info', description: 'Benutzer- und Schul-Onboarding Workflow.', version: '2.0', architecture: { layers: [ { title: 'Onboarding UI', components: ['Wizard', 'Progress Bar', 'Tutorials'], color: '#3b82f6' }, { title: 'Workflow Engine', components: ['Step Manager', 'Validation', 'Skip Logic'], color: '#8b5cf6' }, { title: 'Data Collection', components: ['Forms', 'File Upload', 'Verification'], color: '#10b981' }, { title: 'Integration', components: ['CRM', 'School Service', 'Notification'], color: '#f59e0b' }, ], }, features: [ { name: 'Multi-Step Wizard', status: 'active', description: 'Gefuehrter Prozess' }, { name: 'Progress Tracking', status: 'active', description: 'Fortschrittsanzeige' }, { name: 'Document Upload', status: 'active', description: 'Vertragsuploads' }, { name: 'Self-Service', status: 'planned', description: 'Autonomes Onboarding' }, ], roadmap: [ { phase: 'Phase 1: UX (Q1)', priority: 'high', items: ['Wizard Redesign', 'Mobile Optimization', 'Error Handling', 'Help System'] }, { phase: 'Phase 2: Automation (Q2)', priority: 'medium', items: ['Auto-Verification', 'Document OCR', 'Pre-fill Data', 'Status Updates'] }, { phase: 'Phase 3: Analytics (Q3)', priority: 'low', items: ['Funnel Analysis', 'Drop-off Points', 'A/B Testing', 'Conversion Optimization'] }, ], technicalDetails: [ { component: 'Wizard', technology: 'React Hook Form', description: 'Form Management' }, { component: 'Validation', technology: 'Zod', description: 'Schema Validation' }, { component: 'Storage', technology: 'PostgreSQL', description: 'Progress Data' }, { component: 'Files', technology: 'MinIO', description: 'Document Storage' }, ], auditInfo: [ { category: 'Onboarding Status', items: [ { label: 'Conversion Rate', value: 'Tracking', status: 'ok' }, { label: 'Avg. Completion Time', value: 'Tracking', status: 'ok' }, { label: 'Drop-off Points', value: 'Analysiert', status: 'ok' }, { label: 'Support Tickets', value: 'Tracking', status: 'ok' }, ], }, { category: 'Prozess', items: [ { label: 'Wizard Steps', value: 'Konfiguriert', status: 'ok' }, { label: 'Validation', value: 'Aktiv', status: 'ok' }, { label: 'Document Upload', value: 'Aktiv', status: 'ok' }, { label: 'Auto-Verification', value: 'Geplant', status: 'warning' }, ], }, { category: 'Integration', items: [ { label: 'CRM Sync', value: 'Aktiv', status: 'ok' }, { label: 'E-Mail Notifications', value: 'Aktiv', status: 'ok' }, { label: 'School Service', value: 'Aktiv', status: 'ok' }, { label: 'Billing', value: 'Aktiv', status: 'ok' }, ], }, ], fullDocumentation: `

Onboarding Wizard

1. Uebersicht

Der Onboarding Wizard fuehrt neue Nutzer und Schulen durch den Registrierungsprozess. Er sammelt notwendige Daten, Dokumente und Consents.

2. Wizard-Architektur

┌─────────────────────────────────────────────────────────────────┐
│                      Onboarding Wizard UI                        │
│  ┌────────────────────────────────────────────────────────────┐ │
│  │ Progress Bar: [=====>                              ] 40%    │ │
│  └────────────────────────────────────────────────────────────┘ │
│  ┌────────────────────────────────────────────────────────────┐ │
│  │                    Current Step                             │ │
│  │                                                             │ │
│  │    ┌─────────────────────────────────────────────────┐     │ │
│  │    │              Form / Upload / Info                │     │ │
│  │    └─────────────────────────────────────────────────┘     │ │
│  │                                                             │ │
│  │    [  Zurueck  ]                          [  Weiter  ]     │ │
│  └────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘

3. Wizard Steps (Schulen)

StepTitelFelderPflicht
1SchuldatenName, Typ, BundeslandJa
2AnsprechpartnerName, E-Mail, TelefonJa
3AdresseStrasse, PLZ, OrtJa
4VertragPaket-Auswahl, UploadJa
5DatenschutzAVV, ConsentsJa
6BestaetigungZusammenfassung-

4. API Endpoints

EndpointMethodeBeschreibung
/api/onboarding/startPOSTWizard starten
/api/onboarding/{id}/step/{n}GETStep-Daten laden
/api/onboarding/{id}/step/{n}POSTStep speichern
/api/onboarding/{id}/completePOSTAbschliessen
/api/onboarding/{id}/statusGETFortschritt

5. Validation-Schema

const schoolDataSchema = z.object({
  name: z.string().min(2).max(100),
  type: z.enum([
    "grundschule",
    "hauptschule",
    "realschule",
    "gymnasium",
    "gesamtschule",
    "berufsschule"
  ]),
  bundesland: z.enum([...bundeslaender]),
  studentCount: z.number().positive().optional(),
  website: z.string().url().optional()
});

6. Document Upload

Dokument-Upload Flow:

1. Datei auswaehlen
   └── Typ-Pruefung (PDF, max 10 MB)

2. Upload starten
   └── Progress-Anzeige

3. Virus-Scan
   └── ClamAV

4. Speicherung
   └── MinIO mit Verschluesselung

5. Verifikation (optional)
   └── Manuell oder OCR

7. Status-Workflow

┌──────────┐   ┌──────────┐   ┌───────────┐   ┌───────────┐
│ Started  │ → │ Progress │ → │ Submitted │ → │ Verified  │
└──────────┘   └──────────┘   └───────────┘   └───────────┘
                                    │              │
                                    │              v
                                    │         ┌───────────┐
                                    │         │ Activated │
                                    │         └───────────┘
                                    v
                              ┌───────────┐
                              │ Incomplete│
                              └───────────┘

8. E-Mail-Benachrichtigungen

TriggerTemplateEmpfaenger
StartWillkommenAnsprechpartner
Pausiert (7 Tage)ErinnerungAnsprechpartner
SubmittedBestaetigungAnsprechpartner
VerifiedAktivierungAnsprechpartner
IncompleteFehlende DatenAnsprechpartner

9. Analytics

10. A/B Testing (geplant)

Test-Varianten:
├── Step-Reihenfolge
├── Formular-Layout
├── CTA-Texte
├── Hilfe-Inhalte
└── Erfolgsmeldungen

Metriken:
├── Conversion Rate
├── Time to Complete
└── Drop-off Rate
`, }