Studio Onboarding Documentation

Complete technical specification and flow diagram

Onboarding Flow Diagram
┌─────────────────────────────────────────────────────────────────────┐
│                     STUDIO ONBOARDING FLOW                          │
└─────────────────────────────────────────────────────────────────────┘

    START
      │
      ▼
┌──────────────────────┐
│  STEP 1: ACCOUNT     │  Required: Studio name, owner name, email
│  Account Creation    │  Optional: Phone, website, address
└──────────────────────┘  Validation: Email format, name length
      │
      ├─► Validates all required fields
      ├─► Checks email uniqueness
      │
      ▼
┌──────────────────────┐
│  STEP 2: BRAND       │  Upload: Logo (PNG/JPG/SVG, max 5MB)
│  Brand Setup         │  Select: Primary & secondary colors
└──────────────────────┘  Choose: Brand voice (fun/serious/luxury/energetic/calm)
      │
      ├─► Uploads logo to cloud storage
      ├─► Generates live preview
      │
      ▼
┌──────────────────────┐
│  STEP 3: REWARDS     │  Configure: Member reward (what members earn)
│  Referral Program    │  Configure: New client offer (what leads get)
└──────────────────────┘  Define: Trigger (when rewards are given)
      │                   Optional: Set monthly/per-member limits
      ├─► Validates reward values
      ├─► Calculates estimated costs
      │
      ▼
┌──────────────────────┐
│  STEP 4: MEMBERS     │  Method 1: CSV upload (bulk import)
│  Member Import       │  Method 2: Manual entry (one-by-one)
└──────────────────────┘  Method 3: Invite link (share later)
      │
      ├─► CSV: Parses file, validates emails
      ├─► Manual: Real-time validation
      ├─► Generates unique referral codes
      │
      ▼
┌──────────────────────┐
│  STEP 5: ASSETS      │  Templates filtered by business type
│  Asset Library       │  Auto-branded with logo & colors
└──────────────────────┘  Selectable: Instagram, Facebook, Email, etc.
      │
      ├─► Applies brand to templates
      ├─► Prepares shareable assets
      │
      ▼
┌──────────────────────┐
│  STEP 6: REVIEW      │  Shows summary of all settings
│  Review & Activate   │  Readiness checklist
└──────────────────────┘  One-click activation
      │
      ├─► Creates Organization record
      ├─► Creates Studio record
      ├─► Updates User role to studio_owner
      ├─► Creates default Campaign
      ├─► Bulk creates Member records
      ├─► Generates referral codes
      ├─► Creates AuditLog entry
      │
      ▼
┌──────────────────────┐
│   SUCCESS! 🎉       │  Redirects to Studio Dashboard
│   Program Active     │  Shows next steps guide
└──────────────────────┘  Sends welcome email

    END
              
Validation Rules

Step 1: Account Creation

Studio Name

Minimum 2 characters, maximum 100 characters

Email

Valid email format (regex: ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$)

Phone (optional)

US format: (XXX) XXX-XXXX or XXX-XXX-XXXX

Website (optional)

Must start with http:// or https://

ZIP Code (optional)

5 digits or 5+4 format (XXXXX or XXXXX-XXXX)

Step 2: Brand Setup

Logo File

Accepted: PNG, JPG, SVG | Max size: 5MB | Recommended: Square, transparent background

Colors

Valid hex format (#RRGGBB)

Step 3: Referral Program

Reward Values

Must be positive integers (minimum: 1)

Reward Trigger

Default: "paid_member" (recommended to prevent fraud)

Step 4: Member Import

CSV Format

Required columns: name, email | Optional: phone

Email Validation

Checks for duplicates and valid format before import

Onboarding Data Schema
{
  "onboardingData": {
    "account": {
      "studioName": "string (required, 2-100 chars)",
      "ownerName": "string (required, 2-100 chars)",
      "email": "string (required, valid email)",
      "phone": "string (optional, US format)",
      "website": "string (optional, valid URL)",
      "address": {
        "street": "string (optional)",
        "city": "string (optional)",
        "state": "string (optional)",
        "zip": "string (optional, 5 or 9 digits)"
      },
      "businessType": "enum (required): gym | yoga_studio | martial_arts | pilates | crossfit | dance | boutique_fitness | other"
    },
    "brand": {
      "logoUrl": "string (optional, uploaded file URL)",
      "primaryColor": "string (required, hex format)",
      "secondaryColor": "string (required, hex format)",
      "brandVoice": "enum (required): fun | serious | luxury | energetic | calm"
    },
    "program": {
      "memberRewardType": "enum (required): free_class | free_month | gift_card | merchandise | cash | discount",
      "memberRewardValue": "number (required, min: 1)",
      "newClientRewardType": "enum (required): free_trial | discount | free_week | free_class | waived_fee",
      "newClientRewardValue": "number (required, min: 1)",
      "rewardTrigger": "enum (required): lead | trial | paid_member",
      "maxRewardsPerMonth": "number | null (optional)",
      "maxRewardsPerMember": "number | null (optional)"
    },
    "members": [
      {
        "name": "string (required)",
        "email": "string (required, valid email)",
        "phone": "string (optional)"
      }
    ],
    "selectedAssets": [
      "string (asset IDs)"
    ]
  }
}
Error States & Messages
Account Creation
  • • "Studio name must be at least 2 characters"
  • • "Please enter a valid email address"
  • • "Email already registered. Try logging in instead."
  • • "Please enter a valid phone number"
  • • "Website must start with http:// or https://"
  • • "Please enter a valid ZIP code"
Brand Setup
  • • "Please upload a PNG, JPG, or SVG file"
  • • "File size must be less than 5MB"
  • • "Failed to upload logo. Please try again."
  • • "Please select at least primary color"
Member Import
  • • "Name and email are required"
  • • "Please enter a valid email address"
  • • "Duplicate email found in import list"
  • • "Please upload a CSV file"
  • • "Failed to parse CSV. Please check the format."
Activation
  • • "Please complete all required sections before activating"
  • • "Failed to activate studio. Please try again."
  • • "Network error. Check your connection and retry."
Success States & Messages

✓ "Logo uploaded successfully!"

✓ "Member added!"

✓ "Imported 15 members!"

✓ "🎉 Studio activated successfully!"

UI Copy & Microcopy

Step Headers

Step 1: "Create Your Studio Account" → "Tell us about your fitness business"

Step 2: "Brand Your Experience" → "Make the referral program feel like yours"

Step 3: "Design Your Referral Program" → "Set rewards that motivate members to share"

Step 4: "Import Your Members" → "Add existing members to start your referral program"

Step 5: "Choose Your Marketing Assets" → "Select pre-made templates your members can share"

Step 6: "Review & Activate" → "Confirm your settings and launch your referral program"

Helpful Tooltips

💡 Logo tip: "Use a square logo with transparent background for best results"

💡 Reward trigger: "Studios that reward on 'Paid Membership' see 73% fewer fraudulent referrals"

💡 CSV import: "Required columns: name, email | Optional: phone"

💡 Assets: "All assets will automatically include your logo and brand colors"

Button Labels by Context

Navigation: "Continue" → "Back" → "Activate Program"

Brand Voice: Fun: "Share the Love" | Serious: "Refer a Colleague" | Luxury: "Extend an Invitation"

Member Import: "Add Member" | "Clear All" | "Choose CSV File" | "Download Template"

Assets: "Select All" | "Deselect All"

Future Enhancements
Phase 1: Quick Wins
  • Email verification: Send verification email before activation
  • Save progress: Auto-save onboarding state, allow resume later
  • Video tutorials: Embedded help videos in each step
  • Cost calculator: Show estimated monthly reward costs
Phase 2: Advanced
  • Integration setup: Connect calendar, CRM, email tools
  • AI brand assistant: Generate custom messaging copy
  • Custom asset builder: Design your own templates
  • Multi-location setup: Configure franchise locations
Phase 3: Scale
  • A/B testing: Test different reward structures
  • Smart recommendations: AI-suggested rewards based on industry data
  • Competitor analysis: Show market benchmark data
  • White-label options: Custom domain, branding removal
Phase 4: Enterprise
  • SSO integration: Corporate authentication
  • API access: Custom integrations setup wizard
  • Compliance module: GDPR/CCPA consent flows
  • Dedicated onboarding specialist: Live call scheduling
Technical Implementation Notes

State Management

• All onboarding data stored in local component state
• No persistence until final activation (prevents incomplete records)
• Future: Save to localStorage for "resume later" functionality

Database Operations

• Activation is atomic: all creates happen in sequence
• If any step fails, previous steps remain (no automatic rollback yet)
• AuditLog created for compliance tracking
• User role updated last to ensure permissions align

Security Considerations

• File uploads validated for type and size
• Email addresses validated client-side and server-side
• Referral codes generated cryptographically random
• Future: Add rate limiting on activation attempts