This document describes the platform’s module guided setup system: the module setup registry, per-module settings tours, optional setup wizards, and the central Getting Started surface.Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
1. Module setup registry
Location and shape
- File:
src/platform/setup/module-setup-registry.ts - Type:
ModuleSetupConfigwith:moduleId: string– e.g.'hr','fa'setupTourId: string | null– tour id for the module settings page (e.g.'hr-settings-tour')setupWizardRoute: string | null– route to a setup wizard if any (e.g.'/fa/close/setup')setupCompleteCheck: 'wizard' | 'settings_saved' | 'organization' | 'none'– how to infer “setup complete” for the Getting Started card
Helpers
getModuleSetupConfig(moduleId)– config for one modulegetAllModuleSetupConfigs()– all configs (used by Getting Started card)registerModuleSetupConfig(moduleId, patch)– add or update a module’s setup config
2. Adding a new module setup tour
-
Create the tour definition
Add a file undersrc/platform/help/tours/, e.g.{core}-settings-tour.ts. Usespecs/_templates/GUIDED_TOUR_TEMPLATE.md. Define 2–7 steps with uniquetargetvalues (e.g.[data-tour="hr-settings-general"]). Settings tours (e.g. gr-settings, ce-settings, fa-settings, fm-settings, fw-settings, it-settings, lo-settings, rh-settings) typically use 2–3 steps; feature tours may use 4–7 steps (hr-settings is an example with more steps). -
Export the tour
Export fromsrc/platform/help/tours/index.ts. -
Add
data-touron the settings page
On the module settings page (e.g.src/cores/hr/pages/HRSettings.tsx), adddata-tourattributes on the page wrapper and section cards so they match the tour step targets. -
Wire the tour on the settings page
const [searchParams] = useSearchParams();const tour = useTour({ tour: yourSettingsTour, autoStart: searchParams.get('tour') === 'your-core-settings-tour' });- Add
HelpButtonthat callstour.start. - Render
GuidedTourwithtour,isActive,onComplete,onSkip,onStepChange,startStep.
-
Register in the registry
Inmodule-setup-registry.ts, setsetupTourId: 'your-core-settings-tour'for that module (or useregisterModuleSetupConfigif adding at runtime).
/{core}/settings?tour=your-core-settings-tour will open the settings page and auto-start the tour (used by the Getting Started card).
3. Adding a new setup wizard and registering it
-
Implement the wizard
Use PF-41 withwizard_type: 'setup'where possible, or a dedicated flow that persists completion (e.g. in{core}_module_settingsor a dedicated table). -
Add the route
Ensure the setup wizard has a stable route (e.g./fa/close/setup,/ce/settings/telephony/ringcentral-setup). -
Register in the module setup registry
SetsetupWizardRouteto that route andsetupCompleteCheck:'wizard'if completion is stored when the user finishes the wizard'settings_saved'if completion is inferred from e.g. a row in{core}_module_settings'none'if there is no completion check
setupWizardRoute is set.
4. How the Getting Started card uses the registry
- Component:
src/platform/setup/components/GettingStartedCard.tsx - Placement: Dashboard (for org_admin) and
/settings/getting-started.
-
Organization setup
UsesisOrganizationSetupComplete(organizationId)(fromuseOrganizationSetup). If not complete, shows “Start setup” linking to/settings/setup; if complete, links to org settings. -
Enabled modules
UsesuseModuleAccess()(or equivalent) to list enabled modules. For each module, readsgetModuleSetupConfig(moduleId)from the registry. -
Per-module row
- Setup tour: Link to
/{core}/settings?tour={setupTourId}(or “Tour again” if tour completion is known viagetCompletedTours()). - Setup wizard: If
setupWizardRouteis set, show a link to that route. - Setup complete: When
setupCompleteCheckis'wizard', completion may be derived from wizard completion state; for tours, completion is read from tour completion state (e.g. localStorage via the same key pattern asuseTour).
- Setup tour: Link to
-
Visibility
The card is shown only to users with permissionsystem.organizations.admin.
References
- Tour template:
specs/_templates/GUIDED_TOUR_TEMPLATE.md - Help module:
src/platform/help/README.md(GuidedTour, useTour, HelpButton) - PF-UX-01: Organization setup wizard spec and plan in
specs/pf/plans/ - Wizard selection:
docs/guides/use-cases/wizard-selection.md