Bullet Train provides an easy to understand and modifiable structure for defining required onboarding steps and forms. This system makes it easy for users to complete required steps before seeing your applications full account interface. The code for this feature is well documented in the code with comments, so rather than duplicating that document here, we'll simply direct you to the relevant files.
Included Onboarding Steps
Collect User Details
The included "user details" onboarding step is intended to collect any fields that are required for a user account to be "complete" while not requiring those fields to be collected on the initial sign up form. This is a deliberate UX decision to try and increase conversions on the initial form.
Collect User Email
The "user email" onboarding step is specifically used in situations where a user signs up with an OAuth provider that either doesn't supply their email address to the application or doesn't have a verified email address for the user. In this situation, we want to have an email address on their account, so we prompt them for it.
Adding Additional Steps
Although you can implement onboarding steps from scratch, we always just copy and paste one of the existing steps as a starting point, like so:
- Copy, rename, and modify of the existing onboarding controllers.
- Copy, rename, and modify the corresponding
- Copy and rename the route entry in
- Add the appropriate gating logic in
Onboarding steps aren't limited to targeting
User models. It's possible to add onboarding steps to help flesh out team
Membership records or
Team records as well. You can use this pattern for setting up any sort of required data for either the user or the team.