Overview
Launch ships with a lightweight onboarding flow that helps you capture the minimum profile data needed to personalize the app, then request permissions only when they are relevant. The default flow collects a name, optionally verifies a phone number via SMS OTP, and asks for push notification permissions. Onboarding is the moment to build trust, set expectations, and gather the data that improves first-run UX. The current flow is intentionally short so you can expand it based on your product needs.Prerequisites
- Auth flow enabled
- Onboarding routes available in
apps/mobile/app/onboarding
Current flow
The onboarding screens live inapps/mobile/app/onboarding/:
welcome.tsxcollects the user’s namephone.tsxcollects a phone number for SMS OTPverify-otp.tsxverifies the OTPpush-notifications.tsxrequests push permissions
Flow control
Routing and step selection are handled in:apps/mobile/app/_layout.tsxapps/mobile/lib/hooks/useAppNavigation.ts
Feature registry (SMS / OTP)
The SMS OTP step is gated by theoneSignal feature flag in
apps/mobile/features/feature-registry.tsx. When the flag is disabled, the
flow skips phone.tsx and verify-otp.tsx so onboarding becomes:
- Name
- Push notifications
OneSignal and SMS OTP
OneSignal and SMS OTP configuration are covered in OneSignal and SMS OTP. If you are not using SMS in your onboarding flow, disable the feature registry flag and skip the phone and OTP steps.How the backend supports onboarding
The API exposes user endpoints that save onboarding data and track completion. They live inapps/api/src/routers/user.ts and include:
user.saveNameuser.savePhoneNumberuser.sendPhoneOtpuser.verifyPhoneOtpuser.registerDeviceTokenuser.markOnboardingCompleteuser.onboardingStatus
Data model references
Onboarding fields are stored on theUser model in
apps/api/prisma/schema.prisma, including name, phone number, and onboarding
completion flags. Push notification device tokens are stored in the
DeviceToken model.
Extending onboarding
To add steps:- Create a new file in
apps/mobile/app/onboarding/. - Add routing logic in
useAppNavigation.tsif the step should be required. - Link from the prior step using the router.
- A short goal or preferences questionnaire
- A paywall before the main app (if your product is subscription-first)
- An account personalization step (avatar, username, interests)
apps/api/src/routers/user.ts and persist it on the User model in
apps/api/prisma/schema.prisma.
Code references
- Root Layout:
apps/mobile/app/_layout.tsx - Onboarding Screens:
apps/mobile/app/onboarding/*.tsx - Navigation Logic:
apps/mobile/lib/hooks/useAppNavigation.ts - User Endpoints:
apps/api/src/routers/user.ts - Database Schema:
apps/api/prisma/schema.prisma
Best practices
- Keep early steps short and low-friction.
- Ask for permissions only after explaining the benefit.
- Add a paywall only if it matches your product’s activation strategy.
- Track each step so you can measure drop-off and improve completion.