Authentication & Onboardingin progress
First-launch language choice and onboarding, email/Google sign-in, a role split into a 7-step client questionnaire or 12-step coach questionnaire, email-OTP verification, and OTP-based password reset.
Flutter · GetX · flutter_better_auth · Google Sign-In · email-OTP
UI · Controllers · Widgets
Screens
Shown once on first launch (FirstLaunchService.getInitialRoute → languageSelection).
3-page swipeable intro with skip + dot navigation.
Email/password + Google. Link to register and forgot-password.
Button shows spinner while /sign-in/email resolves.
401 from /sign-in/email surfaces an error toast + red fields.
Two tappable cards: Client → 7-step questionnaire, Coach → 12-step questionnaire (register_body.dart).
Questionnaire collects goal, body info, activity, training, nutrition prefs before the account step.
Final step: creates the better-auth account and persists onboarding answers to Medusa.
Coach path adds coach info, modality/pricing, availability, certificates on top of the client steps.
Terminal coach screen: account created, awaiting manual coach approval (coach_pending_verification_view.dart). Static — no API.
6-digit code entry with resend. Fired after signup/unverified login.
INVALID_OTP → error toast + filled/red OTP boxes.
Sends a forget-password OTP to the entered email.
Validates the reset OTP before allowing a new password.
Submits OTP + new password; success routes back to login.