Onboarding Flow
Guide users through setting up their account in a structured, step-by-step process.
The onboarding process guides new users through setting up their account in three main steps: profile setup, workspace creation, and team collaboration.
Process Overview
The onboarding process follows this sequence:
User Authentication
🔑 User signs in with their credentials
Profile Setup
Workspace Creation
🏢 Set up organization workspace and preferences
Team Collaboration
👥 Invite team members and configure permissions
Implementation Details
Onboarding Status Tracking
The system tracks onboarding progress using two main fields in the user settings:
These status fields allow the application to remember where users left off and guide them through the remaining steps.
Flow Control
The onboarding flow includes automatic redirects based on the user's progress:
- Users must be authenticated to access onboarding
- Completed users are redirected to the main application
- Users are directed to their last incomplete step
Onboarding Steps
1. Profile Setup
Initial user profile configuration including name, avatar, and preferences.
2. Workspace Setup
Creating and configuring workspace settings, branding, and defaults.
3. Team Collaboration
Inviting team members and setting up roles and permissions.
Route Structure
Directory Structure
The onboarding flow is implemented using a dedicated route structure in the Next.js app directory.
Usage Example
To check the user's onboarding status:
Best Practices
User Experience
- Keep steps simple and focused
- Provide clear progress indicators
- Allow users to save progress and continue later
- Validate input in real-time
Implementation
- Store onboarding state in the database
- Implement proper redirects for incomplete steps
- Handle edge cases like skipped steps
- Provide a way to reset onboarding if needed
Customization
The onboarding flow can be customized to fit your specific application needs by modifying the steps, forms, and validation logic.
You can modify the onboarding flow by:
- Adding or removing steps in the process
- Customizing the forms and validation rules
- Changing the redirect logic based on user roles or other criteria
- Adding additional status tracking fields
Complete Implementation Example
Here's a more complete example of the onboarding controller: