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.
Related pages
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:
NAMESETUPSAP_CPIEDGESETTINGSALERTSARCHIVEJOBSAI_SCENARIOSREVIEW
The content is not static. The wizard exposes or hides sections depending on current setup data:
edge_hybridreveals additional Edge-specific fieldsauth_type = oauthreveals OAuth fieldsverify_ssl = truereveals 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.configglobal.configjobs.*.configperiodic.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_hybridreferences 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.jsxfrontend/src/pages/components/config/wizard/wizardHelpContent.jsfrontend/src/pages/components/config/wizard/WizardHelpPopover.jsxfrontend/src/pages/components/config/wizard/WizardDocumentationModal.jsx