Skip to content

Tenant Wizard Architecture

The tenant wizard is the creation boundary between "no tenant exists yet" and "a persisted monitoring tenant is available for runtime work". It is not just a guided form. It produces the initial runtime structure that worker loops and later maintenance screens rely on.

Functional role

The wizard guides users through these functional areas:

  • tenant identity and ownership
  • setup mode and target landscape choice
  • SAP CPI connection details
  • optional Edge details for hybrid setups
  • monitoring defaults and scope
  • initial alert and archive options
  • background job intervals and source selection
  • AI scenario defaults
  • final review before persistence

Step model

The visible steps are defined in frontend/src/pages/components/config/AddConfigWizard.jsx through stepKeyArr:

  • NAME
  • SETUP
  • SAP_CPI
  • EDGE
  • SETTINGS
  • ALERTS
  • ARCHIVE
  • JOBS
  • AI_SCENARIOS
  • REVIEW

The content is not static. The wizard exposes or hides sections depending on current setup data:

  • edge_hybrid reveals additional Edge-specific fields
  • auth_type = oauth reveals OAuth fields
  • verify_ssl = true reveals CA certificate fields
  • selected visibility modes reveal access-group fields

Architecture boundary

The wizard sits between the frontend and the core config API:

flowchart LR
    U[User] --> W[AddConfigWizard.jsx]
    W --> H[Normalization helpers]
    H --> API[POST /api/core/config/]
    API --> CFG[cConfig]
    API --> EXT[cConfigExt fan-out]

Persistence model

The wizard builds the same nested structure that later runtime code consumes. Key persisted sections are:

  • connection.config
  • global.config
  • jobs.*.config
  • periodic.config
  • optional AI scenario settings

This is important because the wizard does not maintain a separate one-off schema. It already speaks the runtime configuration model.

Backend behavior

On create, the backend endpoint in backend/src/core/views.py:

  • validates company access
  • enforces unique tenant names per company
  • validates edge_hybrid references to an existing CPI tenant
  • applies default alert structures
  • creates the root cConfig
  • fans nested sections out into cConfigExt
  • persists periodic settings separately where needed

Important design consequence

The wizard is intentionally narrower than the full tenant settings area. It is responsible for the first correct shape, sensible defaults, and safe connectivity checks. Detailed tuning belongs later in settings and specialized popups.

Main frontend files

  • frontend/src/pages/components/config/AddConfigWizard.jsx
  • frontend/src/pages/components/config/wizard/wizardHelpContent.js
  • frontend/src/pages/components/config/wizard/WizardHelpPopover.jsx
  • frontend/src/pages/components/config/wizard/WizardDocumentationModal.jsx