flowchart TD
    subgraph AppInitialization
        A[Start App] --> B{Check Auth Status};
        B -- Authenticated --> C[Go to Home];
        B -- Unauthenticated --> D[Go to Auth];
        B -- Admin Validation --> E[Go to Waiting Validation];
        B -- Prepare Profile --> F[Go to Checklist];
    end

    subgraph UserAuthentication
        D --> G[Welcome Screen];
        G --> H{Select Sign In/Up};
        H -- Sign In --> I[Sign In With Phone];
        I --> J[Verify Phone Code];
        J -- Success --> C;
        H -- Sign Up --> K[Go to User Onboarding];
    end

    subgraph UserOnboarding
        K --> L[Collect Personal Info];
        L --> M[Verify Email];
        M --> N[Add Emergency Contacts];
        N --> O[Specify Mobility];
        O --> P[Provide Inclusivity Info];
        P --> Q[Enter Address];
        Q --> R[Define Working Area];
        R --> S[Select Role];
        S -- Success --> F;
    end

    subgraph ProfileCompletion
        F --> T[View Checklist];
        T --> U[Complete Personal Info];
        T --> V[Complete Email Verification];
        T --> W[Complete Emergency Contacts];
        T --> X[Manage Certificates];
        T --> Y[Set Schedule];
        T --> Z[Manage Bank Account];
        T --> AA[Fill Out Wage Forms];
        T --> AB[Manage Role Kit];
        AB -- All Complete --> C;
    end

    subgraph MainApp
        C --> AC[Home Screen];
        AC --> AD{Navigate};
        AD -- Shifts --> AE[Shift Management];
        AD -- Earnings --> AF[Earnings Management];
        AD -- Profile --> AG[Profile Management];
    end

    subgraph ShiftManagement
        AE --> AH[View Shifts];
        AH --> AI[View Shift Details];
        AH --> AJ[Clock In/Out via QR];
    end

    subgraph EarningsManagement
        AF --> AK[View Current Earnings];
        AK --> AL[View Earnings History];
    end

    subgraph ProfileManagement
        AG --> AM[View Profile];
        AM --> AN[Manage Role Kit];
        AM --> AO[Manage Certificates];
        AM --> AP[Manage Schedule];
        AM --> AQ[Manage Working Area];
        AM --> AR[Update Live Photo];
        AM --> AS[Manage Profile Settings];
        AS --> AT[Update Personal Info];
        AS --> AU[Update Email];
        AU --> AV[Re-login with Phone];
        AS --> AW[Update Address];
        AM --> AX[Manage Wage Forms];
        AM --> AY[Manage Bank Account];
        AM --> AZ[View Benefits];
        AM --> BA[Access Support];
        BA --> BB[View FAQs];
        BA --> BC[Contact Support];
    end

    subgraph QRScanning
        AJ --> BD[Scan QR Code];
    end
