arch-atlas

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

diagram · Authentication & OnboardingFlutter · GetX · flutter_better_auth · Google Sign-In · email-OTP
1 node 5 flows
01
LayerPresentation

UI · Controllers · Widgets

1 node
cards are peers grouped by layer — pick a flow to trace real calls

Screens

First launch — choose languagewireframe
default

Shown once on first launch (FirstLaunchService.getInitialRoute → languageSelection).

Onboarding carouselwireframe
default

3-page swipeable intro with skip + dot navigation.

Loginwireframe
default

Email/password + Google. Link to register and forgot-password.

Login — submittingwireframe
loading

Button shows spinner while /sign-in/email resolves.

Login — invalid credentialswireframe
error

401 from /sign-in/email surfaces an error toast + red fields.

Register — choose rolewireframe
default

Two tappable cards: Client → 7-step questionnaire, Coach → 12-step questionnaire (register_body.dart).

Client onboarding — goal (step 1/7)wireframe
default

Questionnaire collects goal, body info, activity, training, nutrition prefs before the account step.

Client onboarding — create account (step 7/7)wireframe
default

Final step: creates the better-auth account and persists onboarding answers to Medusa.

Coach onboarding — coach info (step 8/12)wireframe
default

Coach path adds coach info, modality/pricing, availability, certificates on top of the client steps.

Coach — pending verificationwireframe
success

Terminal coach screen: account created, awaiting manual coach approval (coach_pending_verification_view.dart). Static — no API.

Verify email — OTPwireframe
default

6-digit code entry with resend. Fired after signup/unverified login.

Verify email — wrong codewireframe
error

INVALID_OTP → error toast + filled/red OTP boxes.

Reset password — enter emailwireframe
default

Sends a forget-password OTP to the entered email.

Reset password — verify OTPwireframe
default

Validates the reset OTP before allowing a new password.

Reset password — new passwordwireframe
default

Submits OTP + new password; success routes back to login.