apps/frontend/src/components/onboarding/README.md
A complete, refactored onboarding system with proper component organization and clean separation of concerns.
onboarding/
āāā index.ts # Main exports
āāā onboarding-config.tsx # Step definitions & navigation logic
āāā new-onboarding-page.tsx # Main onboarding page component
āāā
āāā steps/ # Individual step components
ā āāā ceo-intro-step.tsx
ā āāā smart-context-step.tsx
ā āāā workforce-selection-step.tsx
ā āāā team-invitation-step.tsx
ā āāā completion-step.tsx
āāā
āāā agent-config/ # Agent configuration components
ā āāā multi-agent-configuration.tsx
ā āāā agent-configuration.tsx
ā āāā field-renderer.tsx
ā āāā configuration-utils.ts
āāā
āāā shared/ # Shared utilities & components
āāā types.ts # TypeScript interfaces
āāā data.ts # Agent definitions & integrations
āāā context.ts # Global state management
āāā step-wrapper.tsx # Step layout wrapper
āāā (uses UnifiedAgentCard) # Agent selection via unified component
āāā progress-indicator.tsx # Progress visualization
import { NewOnboardingPage } from '@/components/onboarding';
function App() {
return (
<NewOnboardingPage
onComplete={() => console.log('Onboarding completed!')}
onClose={() => console.log('Onboarding closed')}
/>
);
}
import { CEOIntroStep, SmartContextStep } from '@/components/onboarding';
function CustomOnboarding() {
return (
<div>
<CEOIntroStep />
<SmartContextStep />
</div>
);
}
import { AgentConfiguration } from '@/components/onboarding';
function ConfigureAgent() {
return (
<AgentConfiguration
agentId="maya"
showHeader={true}
onConfigurationChange={(agentId, config) => {
console.log(`Agent ${agentId} configured:`, config);
}}
/>
);
}
The onboarding system uses a lightweight context system:
import { userContext, updateUserContext } from '@/components/onboarding';
// Read current context
console.log(userContext.selectedAgents);
// Update context
updateUserContext({
selectedAgents: ['maya', 'sage', 'nova'],
userType: 'company'
});
ā / ā Arrow keys for step navigationsteps/onboardingSteps in onboarding-config.tsxcanProceedFromStepdata.tsconfiguration-utils.tsintegrationsByAgentAll components use Tailwind CSS with consistent design tokens:
onboarding-config.tsxshared/data.tsshared/types.tsonboarding-config.tsxThe old monolithic onboarding-steps.tsx has been completely refactored: