Developer reference for all user type flows in the ReferralFlow platform
Home page → "Start Free Trial" buttonPricing page → "Start Free Trial" buttonStudioOnboardingAuthentication Check
Page: StudioOnboarding
If not logged in → redirect to base44.auth.redirectToLogin()
After login → automatically return to StudioOnboarding
Multi-Step Onboarding
Component: StudioOnboarding (6 steps)
AccountCreationStep) - Studio name, owner info, addressBrandSetupStep) - Logo, colors, brand voiceReferralProgramStep) - Reward structureMemberImportStep) - CSV upload or manual entryAssetLibraryStep) - Marketing materialsReviewActivationStep)Account Creation
Entities Created:
Studio - Business entity (owner, branding, settings)Campaign - Default active campaignMember records (if imported)AuditLog - Tracks studio creationUser Update: platform_role: "studio_owner", studio_id
Post-Onboarding Redirect
Destination: StudioDashboard
Key Files:
pages/StudioOnboarding.jscomponents/onboarding/*.jsxpages/StudioDashboard.jsbase44.users.inviteUser(email, "user")Email Invitation
Staff receives email with signup link from studio owner
Account Creation
User creates account via Base44 signup flow
Role automatically assigned: platform_role: "user" (default)
Manual Role Assignment
Studio owner manually updates user role to studio_staff
Also assigns: studio_id
Access Dashboard
After role assignment → access StudioDashboard
Note: Staff onboarding is currently manual. No dedicated onboarding flow exists. Staff role must be assigned by studio owner after user signup.
Members pageReferral entityMember Record Created
Entity: Member
Initial state: user_id: null (not connected to User account yet)
Auto-generated: referral_code
Email Invitation (Optional)
Member receives email invitation to join referral program
Contains signup link
User Account Creation
Member signs up via Base44 authentication
Default role: platform_role: "user"
Opt-In Flow
Page: MemberOptIn
Member reviews:
Required consents:
Role & Data Update
User entity updated:
platform_role: "member"organization_idstudio_idpreferences.email_notificationsMember entity linked: user_id populated
Post-Onboarding Redirect
Destination: MemberDashboard
Member can now:
Key Files:
pages/MemberOptIn.jspages/MemberDashboard.jspages/MyReferrals.jscomponents/member/*.jsxreferral_codeReferralLanding pageClick Tracking
Entities Created:
ReferralClick - Tracks click event with IP, user agent, referrerReferralEvent - Event type: "link_click"Attribution data stored in:
referralCode)Landing Page Display
Page: ReferralLanding
Displays:
Lead Form Submission
Component: LeadCaptureForm
Collects:
Fraud checks:
Lead Record Creation
Entities Created:
Lead - Status: "new"AttributionRecord - First-touch attributionReferralEvent - Event: "lead_signup"Updates:
ReferralClick.converted_to_lead = trueMember.total_referrals++Notifications
Email sent to studio via base44.integrations.Core.SendEmail
Notification created for referrer: Notification entity (type: "lead_signup")
Post-Submission Redirect
Destination: ReferralSuccess
Shows confirmation message and next steps
Lead-to-Member Conversion (Future)
When lead becomes paying member:
Lead.status = "converted"Lead.converted_to_user_id populatedMember entity createdRewardTrigger created (based on campaign rules)Reward issued to referring memberKey Files:
pages/ReferralLanding.jspages/ReferralSuccess.jscomponents/landing/LeadCaptureForm.jsxManually assigned by database administrator or existing platform admin
Dashboard: AdminDashboard
Capabilities:
Note: No onboarding flow exists. Platform admin role is assigned manually at the database level.
User (Base44 built-in)
├── platform_role: "platform_admin" → AdminDashboard
├── platform_role: "studio_owner" → StudioDashboard
│ ├── organization_id (references Organization)
│ └── studio_id (references Studio)
├── platform_role: "studio_staff" → StudioDashboard (limited access)
│ ├── organization_id
│ └── studio_id
├── platform_role: "member" → MemberDashboard
│ ├── organization_id
│ ├── studio_id
│ └── Linked to Member entity via member_id
└── platform_role: "lead" → LeadView (future)
└── Linked to Lead entityOrganization (1)
└─ Studio (many)
├─ Member (many)
│ ├─ user_id → User
│ ├─ referral_code (unique)
│ └─ Reward (many)
├─ Campaign (many)
├─ Lead (many)
│ ├─ referred_by_member_id → Member
│ ├─ referral_code_used
│ └─ AttributionRecord (1)
├─ ReferralClick (many)
│ └─ referral_code → Member
├─ ReferralEvent (many)
└─ Asset (many)