Onboarding Wizard — Refactor Summary
What changed: the onboarding flow was refactored from many bespoke UI models into a ThorAPI-native, data-driven design. The goal: single source of truth for product-driven pathways, less brittle UI code, and full use of generated ThorAPI models and services.
Why this matters:
- Faster maintenance: change a product in the backend, no UI edits needed
- Fewer bugs: remove duplicated path logic and custom types
- Better developer DX: use generated models (Principal, Product, Customer) and RTK Query
Highlights
- Removed custom WizardFormData and UserType enum
- Replaced hard-coded step arrays with product-driven configuration (PRODUCT_WIZARD_CONFIGS)
- UI reads ThorAPI
Productmetadata to render steps, cards, and success screens - All API calls use generated ThorAPI RTK Query services (addPrincipal, addCustomer)
Dev Checklist
- Backend: create the six onboarding Products (Getting Started, Founder Suite, Reseller Partner, Contractor Pro, Managed Services, Enterprise)
- Populate Product.customization with step sequences and success CTA
- Frontend: use PRODUCT_WIZARD_CONFIGS to map a product's name to step sequence (minimal mapping only)
Quick sample flow
- User selects Product
- OnboardingWizard reads product and step sequence
- Create Principal (via addPrincipal) → Create Customer (via addCustomer)
- Redirect to product success CTA (stored on the product)
See also: Complete Onboarding Flow and Application Creation Wizard