Files
git.stella-ops.org/docs/features/unchecked/platform/platform-setup-wizard-backend-api.md

1.9 KiB

Platform Setup Wizard Backend API

Module

Platform

Status

IMPLEMENTED

Description

Real /api/v1/setup/* endpoints replacing UI mocks with deterministic session state (create, resume, execute, skip, finalize), tenant scoping, and offline-first "data as of" metadata.

Implementation Details

  • SetupEndpoints: src/Platform/StellaOps.Platform.WebService/Endpoints/SetupEndpoints.cs -- REST API at /api/v1/setup with 3 endpoint groups: sessions (GET current, POST create, POST resume, POST finalize), steps (POST execute, POST skip), definitions (GET step definitions); AllowAnonymous during initial setup, requires auth after completion
  • SetupStateDetector: detects setup completion state from storage/DB settings; routes between bootstrap context and authenticated context
  • PlatformSetupService: service layer for setup wizard operations (CreateSessionAsync, ResumeOrCreateSessionAsync, ExecuteStepAsync, SkipStepAsync, FinalizeSessionAsync, GetStepDefinitionsAsync)
  • SetupWizardModels: src/Platform/StellaOps.Platform.WebService/Contracts/SetupWizardModels.cs -- request/response models (CreateSetupSessionRequest, SetupSessionResponse, ExecuteSetupStepRequest, SkipSetupStepRequest, FinalizeSetupSessionRequest, FinalizeSetupSessionResponse, SetupStepDefinitionsResponse)
  • Problem+JSON errors: all endpoints return RFC 7807 ProblemDetails on errors
  • Source: SPRINT_20260112_004_PLATFORM_setup_wizard_backend.md

E2E Test Plan

  • Verify setup session creates with bootstrap context when auth is unavailable
  • Test session resume returns existing session or creates new one
  • Verify step execution updates session state correctly
  • Test step skip marks step as skipped and advances session
  • Verify finalize completes setup and subsequent requests require authentication
  • Test step definitions endpoint returns all available setup steps