Onboarding global component¶
Context¶
- Ownership: Canada (temporary)
- Tech framing: Global onboarding component #26938 ⧉
- Linear: [Global] 🚢 Onboarding component ⧉
Usage¶
- Use the bootstrap pattern under ./bootstrap to import in country code
- The component uses the Dependencies guidelines in our Modular Mono-Repository #26501 ⧉ pattern for dependency injection
- The backend is located under
backend/components/onboarding: it contains global APIs, models, entities - The frontend is located under
frontend/features/onboarding: it contains global hooks, screens
Dependency¶
Each country needs to declare its own local dependency, this is needed to abstract the local code while we globalise it
from components.onboarding.public.dependencies import (
OnboardingDependency,
)
class CaOnboardingDependency(OnboardingDependency):
...
onboarding_dependency = CaOnboardingDependency()
Then we use the dependency injection in the onboarding component to set it up during flask app init:
from components.ca.bootstrap.onboarding import onboarding_dependency
from components.onboarding.public.dependencies import (
set_app_dependency as set_app_dependency_onboarding,
)
set_app_dependency_onboarding(onboarding_dependency)
Models ⧉¶
- The main model is the
PersonOnboarding: it represents an invitation and associated email/token pair - A person onboarding has a type: for example the employee onboarding, the retiree onboarding, etc.
- Based on each type, there might be a "progress" model: e.g. the
EmployeeOnboardingProgress - The progress model stores the values as the user progress in a onboarding flow
- When the onboarding flow is finished we "copy" the values to other components: profile, affiliation, employment, etc.
Endpoints ⧉¶
- Query a person onboarding, check the signup email, signup, etc.
- Handle legal documents for the onboarding flow
- Handle specific types of onboarding e.g. retiree
Commands ⧉¶
- Invite employee / retiree command
Mails ⧉¶
- Invite employee / retiree email template
Screens¶
| Onboarding Type | Screen Name | UI Component Configuration | Logic/Hooks Configuration |
|---|---|---|---|
| Employee Onboarding | OnboardingAddress.tsx | 🇨🇦 | 🇨🇦 |
| Employee Onboarding | OnboardingBirthdateDate.tsx | 🇨🇦 | 🇨🇦 |
| Employee Onboarding | OnboardingEmail.tsx | 🇫🇷 🇨🇦 | 🇨🇦 |
| Employee Onboarding | OnboardingIntroduction.tsx | 🇫🇷 🇨🇦 | 🇨🇦 |
| Employee Onboarding | OnboardingName.tsx | 🇨🇦 | 🇨🇦 |
| Employee Onboarding | OnboardingPassword.tsx | 🇫🇷 🇨🇦 | 🇨🇦 |
| Employee Onboarding | OnboardingTerms.tsx | 🇨🇦 | 🇨🇦 |