diff --git a/internal/launchpad/assets/documents/documents-config.json b/internal/launchpad/assets/documents/documents-config.json index 08273bbc..54532b03 100644 --- a/internal/launchpad/assets/documents/documents-config.json +++ b/internal/launchpad/assets/documents/documents-config.json @@ -1,16 +1,32 @@ [ + { + "title": "Architecture Overview", + "path": "./assets/documents/legacy/architecture.md" + }, { "title": "Architecture Document & Migration Plan", "path": "./assets/documents/legacy/staff-mobile-application/architecture.md" }, + { + "title": "Use Case Documentation", + "path": "./assets/documents/legacy/staff-mobile-application/use-case.md" + }, { "title": "Architecture Document & Migration Plan", "path": "./assets/documents/legacy/client-mobile-application/architecture.md" }, + { + "title": "Use Case Documentation", + "path": "./assets/documents/legacy/client-mobile-application/use-case.md" + }, { "title": "Architecture Document & Migration Plan", "path": "./assets/documents/legacy/web-application/architecture.md" }, + { + "title": "Use Case Documentation", + "path": "./assets/documents/legacy/web-application/use-case.md" + }, { "title": "Dataconnect guide", "path": "./assets/documents/dataconnect/backend_manual.md" diff --git a/internal/launchpad/assets/documents/legacy/architecture.md b/internal/launchpad/assets/documents/legacy/architecture.md new file mode 100644 index 00000000..16a16ed2 --- /dev/null +++ b/internal/launchpad/assets/documents/legacy/architecture.md @@ -0,0 +1,107 @@ +# Krow System Architecture Overview + +## 1. System Purpose: The Digital Workforce Marketplace +The **Krow Ecosystem** is a complete digital solution for the temporary staffing industry. Its primary purpose is to seamlessly connect two groups of people: +1. **Businesses** (restaurants, event venues) who need temporary staff. +2. **Workers** (waiters, security, chefs) who are looking for flexible shifts. + +Instead of using agencies, phone calls, or spreadsheets, the Krow system automates the entire process: finding staff, verifying their skills, tracking their work hours on-site, and processing payments. It turns a chaotic manual process into a smooth, transparent digital workflow. + +## 2. The Role of Each Application +The system is composed of three distinct applications, each tailored for a specific user: + +### A. The Client App (Mobile) +* **User:** Business Owners & Managers. +* **Role:** The "Demand" side. It allows businesses to post jobs ("Shifts"), see who is working for them, monitor attendance in real-time, and handle invoices. +* **Key Analogy:** Like the "Uber" app for a passenger—requesting a service and paying for it. + +### B. The Staff App (Mobile) +* **User:** Temporary Workers. +* **Role:** The "Supply" side. It allows workers to build a professional profile, find and accept jobs, and use their phone to "Clock In" and "Clock Out" at venues. +* **Key Analogy:** Like the "Uber Driver" app—accepting jobs and proving the work was done. + +### C. The Web Platform (Web & Backend) +* **User:** Krow Operations Team (Admins) & System Logic. +* **Role:** The "Brain" and "Control Tower." It stores all the data, enforces the rules (e.g., "You can't work if your visa is expired"), and provides a dashboard for Krow staff to oversee the entire business. +* **Key Analogy:** The Uber HQ dashboard—managing the market, resolving disputes, and ensuring safety. + +## 3. How They Interact +These applications do not speak to each other directly; they all speak to the **Web Platform**. + +* **Client to Platform:** When a business posts a shift in the Client App, it sends that request to the Web Platform. The Platform saves it and makes it searchable. +* **Platform to Staff:** The Platform identifies which workers match the new shift (based on skills and location) and makes the job visible in their Staff App. +* **Staff to Platform:** When a worker taps "Accept," the Staff App tells the Platform. The Platform checks if they are still available and confirms the booking. +* **Staff to Client (via Platform):** When a worker scans a QR code to Clock In, the Staff App tells the Platform "I'm here." The Platform instantly updates the Client App, so the manager sees "Active" on their screen. + +## 4. Shared Services & Infrastructure +To keep the system fast, secure, and reliable, all three apps share a common foundation: + +* **Central Database:** A single source of truth. Whether you look at a shift on the iPhone Client App, Android Staff App, or Web Dashboard, you are looking at the exact same record in the database. +* **GraphQL API:** The "Language" of the system. It’s a specialized way for the mobile apps to ask the server for data. It ensures that even if a user has a slow connection, the app remains responsive by asking only for exactly what it needs. +* **Firebase Authentication:** A shared security service. It handles the complex work of storing passwords and verifying emails. This means a user’s identity is secure across the entire ecosystem. +* **Maps & Geolocation:** All apps use the same mapping services to understand where "Venue A" is and whether "Worker B" is standing inside it. + +## 5. Data Ownership & Boundaries +* **The Web Platform Owns Everything:** The mobile apps are just "viewers." They don't permanently own the data. If a phone is lost or the app is deleted, the data (shifts, earnings, invoices) is safe on the server. +* **Client Data Boundary:** A Business can *only* see their own hubs, their own events, and the staff assigned to *their* shifts. They cannot see a worker's history with other businesses. +* **Staff Data Boundary:** A Worker can *only* see shifts they are eligible for and their own financial history. They cannot see internal business details or other workers' pay rates. + +## 6. Security & Access Control +The system uses a strict **Role-Based Access Control (RBAC)** model: +* **Authentication (Who are you?):** Handled by Firebase. Every request to the server must include a digital "ID Card" (Token) proving the user is logged in. +* **Authorization (What can you do?):** Handled by the Web Platform. Even if a Staff member tries to "hack" the app to ask for an Invoice, the Server will check their role, see they are "Staff" (not "Client"), and block the request immediately. +* **Verification Gates:** The system includes human-in-the-loop security. A staff member cannot just sign up and work; they enter a "Pending" state until a Krow Admin manually reviews their documents on the Web Platform. + +## 7. Critical Dependencies +The ecosystem relies on the **Web Platform** being online. +* **If the Staff App fails:** Only workers are affected. +* **If the Client App fails:** Only businesses are affected. +* **If the Web Platform fails:** The entire system stops. No new shifts can be posted, no one can apply, and real-time clock-ins might fail (though the apps have some offline safeguards). +* **3rd Party Reliance:** The system depends on **Firebase** (for login) and **Payment Gateways** (to move money). If these global services go down, Krow's ability to log users in or pay them will pause. + +## 8. Overview Diagram +```mermaid +flowchart LR + %% Define Styles + classDef clientApp fill:#e3f2fd,stroke:#1565c0,stroke-width:2px,color:#0d47a1 + classDef staffApp fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#bf360c + classDef backend fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px,color:#1b5e20 + classDef db fill:#eee,stroke:#333,stroke-width:2px,color:#333 + classDef external fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:#4a148c + + subgraph Mobile_Apps["Mobile Ecosystem"] + direction TB + ClientApp["Client Mobile App
(Business Owners)"]:::clientApp + StaffApp["Staff Mobile App
(Workers)"]:::staffApp + end + + subgraph Core_Platform["Krow Web Platform"] + direction TB + AdminPanel["Admin Dashboard
(Operations Team)"]:::backend + APIServer["Central API Server
(GraphQL Logic)"]:::backend + Database[("Central Database")]:::db + Storage["File Storage
(Photos/Docs)"]:::db + end + + subgraph External_Services["Cloud Services"] + direction TB + Firebase["Firebase
(Auth & Push)"]:::external + Maps["Google Maps API
(Location)"]:::external + end + + %% Communication Flows + ClientApp <-->|Post Shifts, View Invoices| APIServer + StaffApp <-->|Apply for Jobs, Clock In| APIServer + AdminPanel <-->|Manage Users, Resolve Disputes| APIServer + + APIServer <-->|Read/Write Data| Database + APIServer <-->|Save/Retrieve Files| Storage + + ClientApp -.->|Secure Login| Firebase + StaffApp -.->|Secure Login| Firebase + AdminPanel -.->|Secure Login| Firebase + + APIServer -->|Send Notifications| Firebase + APIServer -->|Validate Addresses| Maps + StaffApp -.->|Verify Location| Maps +``` diff --git a/internal/launchpad/assets/documents/legacy/client-mobile-application/use-case.md b/internal/launchpad/assets/documents/legacy/client-mobile-application/use-case.md new file mode 100644 index 00000000..97ef4c7b --- /dev/null +++ b/internal/launchpad/assets/documents/legacy/client-mobile-application/use-case.md @@ -0,0 +1,198 @@ +# Use Case Documentation: Krow Client Mobile App + +## 1. App Initialization + +* **Primary Actor:** System (Automated) / Business Client +* **Description:** The initial sequence that determines the user's state (authenticated or not) and routes them to the appropriate starting screen. +* **Preconditions:** User has launched the application. +* **Main Flow:** + 1. User opens the app. + 2. System checks the local authentication status. + 3. **If Authenticated:** System routes the user directly to the **Home Dashboard**. + 4. **If Unauthenticated:** System routes the user to the **Authentication Flow**. + +--- + +## 2. User Authentication + +* **Primary Actor:** Business Client +* **Description:** The process of logging in to access the platform's features or recovering a lost password. +* **Preconditions:** User is on the Sign-In screen. +* **Main Flow (Sign In):** + 1. User enters their registered email and password. + 2. User taps "Sign In". + 3. System verifies the credentials against the backend. + 4. **On Success:** User is redirected to the **Home Dashboard**. +* **Alternative Flow (Forgot Password):** + 1. User taps "Forgot Password". + 2. User enters their email address. + 3. System sends a password reset link. + 4. User follows the email instructions to reset credentials. + +--- + +## 3. Main App Navigation + +* **Primary Actor:** Business Client +* **Description:** The central hub where users can access different functional areas of the business management suite. +* **Preconditions:** User is logged in and on the Home Dashboard. +* **Main Flow:** + 1. User views the dashboard summary. + 2. User selects a navigation option: + * **Events:** To manage upcoming shifts. + * **Hubs:** To manage venues and departments. + * **Invoices:** To handle billing and payments. + * **Profile:** To manage business settings and support. + +--- + +## 4. Hub & Venue Management + +* **Primary Actor:** Business Client +* **Description:** Configuring the physical locations (Hubs) and internal teams (Departments) where shifts will take place. +* **Preconditions:** User is in the "Hubs" section. +* **Main Flow:** + 1. User views the list of existing Hubs. + 2. User taps "Add New Hub". + 3. User enters venue details (Name, Address, Photo). + 4. System validates the address via map services. + 5. User adds specific "Departments" (e.g., Kitchen, Bar) to the Hub. + 6. User saves the configuration. + +--- + +## 5. Event Management + +* **Primary Actor:** Business Client +* **Description:** Creating, publishing, and managing events and their associated staffing requirements. +* **Preconditions:** User is in the "Events" section and has at least one Hub configured. +* **Main Flow:** + 1. User views the list of events (Upcoming, Active, Past). + 2. User taps "Create New Event". + 3. User selects a Hub and sets the date/time. + 4. User defines "Shifts" by adding "Positions" (Role, Quantity, Rate). + 5. User reviews the estimated cost. + 6. User publishes the event to the marketplace. + +--- + +## 6. Operations (Live Management) + +* **Primary Actor:** Business Client +* **Description:** Monitoring real-time staff attendance, managing check-ins, and handling operational alerts during an event. +* **Preconditions:** An event is active or upcoming with assigned staff. +* **Main Flow:** + 1. User views details of an active event. + 2. User monitors the "Assigned Staff" list. + 3. User taps a staff member to view their profile, skills, and status. + 4. **Manual Action:** If a staff member cannot scan a QR code, the user manually clocks them In/Out. + 5. **Alerts:** User receives real-time notifications (e.g., "Staff is Late") and takes action. + +--- + +## 7. Staff Feedback + +* **Primary Actor:** Business Client +* **Description:** Providing performance ratings for staff members after their shifts are completed. +* **Preconditions:** A shift has ended. +* **Main Flow:** + 1. User selects a completed shift or receives a "Rate Staff" prompt. + 2. User selects a staff member. + 3. User assigns a star rating (1-5) and optional tags/comments. + 4. User submits the rating to the system. + +--- + +## 8. Finance Management + +* **Primary Actor:** Business Client +* **Description:** Managing the financial aspects of the account, including viewing invoice history and downloading documents. +* **Preconditions:** User is in the "Invoices" section. +* **Main Flow:** + 1. User views a list of all invoices. + 2. User checks the status (Paid, Due, Overdue). + 3. User selects an invoice to view details. + 4. User taps "Download PDF" for accounting records. + +--- + +## 9. Profile Management + +* **Primary Actor:** Business Client +* **Description:** Managing business identity, app settings, and accessing support. +* **Preconditions:** User is in the "Profile" section. +* **Main Flow:** + 1. User views their business profile details. + 2. **Edit Details:** User updates business name, logo, or contact info. + 3. **Notifications:** User toggles push notification preferences. + 4. **Support:** User accesses the Help Center or contacts customer support. + +--- + +# Use Case Diagram + +```mermaid +flowchart TD + subgraph AppInitialization + A[Start App] --> B{Check Auth Status}; + B -- Authenticated --> C[Go to Home]; + B -- Unauthenticated --> D[Go to Auth]; + end + + subgraph UserAuthentication + D --> G[Sign In Screen]; + G --> H{Action}; + H -- Sign In --> I[Enter Email & Password]; + I --> J[Verify Credentials]; + J -- Success --> C; + H -- Forgot Password --> K[Reset via Email]; + end + + subgraph MainApp + C --> AC[Home Dashboard]; + AC --> AD{Navigate}; + AD -- Events --> AE[Event Management]; + AD -- Hubs --> AF[Hub & Venue Management]; + AD -- Invoices --> AG[Finance & Invoices]; + AD -- Profile --> AH[Profile Management]; + end + + subgraph HubManagement + AF --> AI[View Hubs List]; + AI --> AJ[Add New Hub/Venue]; + AJ --> AK[Configure Departments]; + end + + subgraph EventManagement + AE --> AL[View Events List]; + AL --> AM[Create New Event]; + AM --> AN[Define Shifts & Positions]; + AN --> AO[Review & Publish Shift]; + end + + subgraph Operations + AL --> AP[Active/Upcoming Event Details]; + AP --> AQ[Monitor Assigned Staff]; + AQ --> AR[View Staff Profile & Status]; + AQ --> AS[Manual Clock In/Out]; + AP --> AT[Receive Real-time Alerts]; + end + + subgraph StaffFeedback + AS --> AU[Post-Shift Rating]; + AU --> AV[Rate Staff Performance]; + end + + subgraph FinanceManagement + AG --> AW[View Invoices]; + AW --> AX[Check Payment Status]; + AW --> AY[Download Invoice PDF]; + end + + subgraph ProfileManagement + AH --> AZ[View Business Profile]; + AZ --> BA[Edit Business Details]; + AZ --> BB[Manage Notifications]; + AZ --> BC[Access Support]; + end +``` \ No newline at end of file diff --git a/internal/launchpad/assets/documents/legacy/staff-mobile-application/use-case.md b/internal/launchpad/assets/documents/legacy/staff-mobile-application/use-case.md new file mode 100644 index 00000000..50431cbf --- /dev/null +++ b/internal/launchpad/assets/documents/legacy/staff-mobile-application/use-case.md @@ -0,0 +1,251 @@ +# Use Case Documentation: Krow Staff Mobile App + +## 1. App Initialization + +* **Primary Actor:** System (Automated) / Staff Member +* **Description:** The initial sequence that determines the user's state (authenticated, verified, or pending) and routes them to the appropriate starting screen. +* **Preconditions:** User has launched the application. +* **Main Flow:** + 1. User opens the app. + 2. System checks the local authentication and verification status. + 3. **If Authenticated & Active:** System routes to **Home Dashboard**. + 4. **If Unauthenticated:** System routes to **Authentication Flow**. + 5. **If Pending Admin:** System routes to **Waiting Validation**. + 6. **If Incomplete Profile:** System routes to **Checklist**. + +--- + +## 2. User Authentication + +* **Primary Actor:** Staff Member +* **Description:** The process of logging in or registering a new account. +* **Preconditions:** User is on the Welcome Screen. +* **Main Flow:** + 1. User selects "Sign In" or "Sign Up". + 2. **Sign In:** User enters email and verifies via code/link. + 3. **Sign Up:** User enters details and proceeds to **User Onboarding**. + +--- + +## 3. User Onboarding + +* **Primary Actor:** New Staff Member +* **Description:** Collecting initial necessary data to create a profile account. +* **Preconditions:** User is in the Sign-Up flow. +* **Main Flow:** + 1. User enters personal information (Name, Phone). + 2. User verifies email address. + 3. User adds emergency contacts. + 4. User defines their address and working radius. + 5. User selects their primary roles (e.g., Waiter, Chef). + 6. System moves user to **Profile Completion**. + +--- + +## 4. Profile Completion (Checklist) + +* **Primary Actor:** Staff Member +* **Description:** A mandatory list of tasks to complete before the profile can be submitted for review. +* **Preconditions:** User is in the "Checklist" state. +* **Main Flow:** + 1. User views the list of outstanding items. + 2. User uploads certificates (RSA, Hygiene). + 3. User confirms possession of required Role Kit (Uniform, Tools). + 4. User sets schedule availability. + 5. User enters bank account details for payroll. + 6. User fills out tax and wage forms. + 7. Once all items are done, user submits for **Admin Verification**. + +--- + +## 5. Admin Verification + +* **Primary Actor:** Staff Member (Passive) / Admin +* **Description:** The waiting state while Krow admins review the submitted profile. +* **Preconditions:** Profile submitted. +* **Main Flow:** + 1. User sees "Waiting for Admin Review" screen. + 2. **Approved:** User status becomes "Active" and can access the **Main App**. + 3. **Rejected:** User is sent back to **Profile Completion** to fix issues. + +--- + +## 6. Main App Navigation + +* **Primary Actor:** Staff Member +* **Description:** The central hub for accessing work and profile management. +* **Preconditions:** User is logged in and verified. +* **Main Flow:** + 1. User views the Home Dashboard. + 2. User navigates to: + * **Marketplace:** To find new work. + * **My Shifts:** To view upcoming schedule. + * **Earnings:** To track pay. + * **Profile:** To manage settings. + +--- + +## 7. Shift Discovery (Marketplace) + +* **Primary Actor:** Staff Member +* **Description:** Finding and accepting new work opportunities. +* **Preconditions:** User is in the Marketplace tab. +* **Main Flow:** + 1. User browses available shifts. + 2. User filters by date, location, or role. + 3. User views shift details (pay, uniform requirements). + 4. User applies for or accepts the shift. + 5. Shift is added to **My Shifts**. + +--- + +## 8. Pre-Shift Operations + +* **Primary Actor:** Staff Member +* **Description:** Compliance steps to ensure readiness before the shift starts. +* **Preconditions:** Shift is upcoming. +* **Main Flow:** + 1. User views "My Shifts". + 2. User selects the active/upcoming shift. + 3. User completes the "Pre-Shift Checklist" (Uniform check, etc.). + 4. User confirms attendance. + +--- + +## 9. Live Operations + +* **Primary Actor:** Staff Member +* **Description:** The on-site workflow for tracking hours. +* **Preconditions:** User is at the venue. +* **Main Flow:** + 1. User arrives at the venue. + 2. User taps **Clock In** and scans Supervisor's QR/NFC. + 3. Shift enters "In Progress" state. + 4. When finished, user taps **Clock Out** and scans QR/NFC. + 5. User reports any issues or breaks. + +--- + +## 10. Post-Shift Finance + +* **Primary Actor:** Staff Member +* **Description:** Tracking the financial outcome of completed work. +* **Preconditions:** Shift is completed. +* **Main Flow:** + 1. User navigates to "Earnings". + 2. User views "Earnings Summary" (Total Earned). + 3. User views "History" to see individual shift pay. + 4. User checks payment status (Processing, Paid). + +--- + +## 11. Profile Management + +* **Primary Actor:** Staff Member +* **Description:** Maintaining account details and getting help. +* **Preconditions:** User is in Profile tab. +* **Main Flow:** + 1. User views profile details. + 2. User updates Skills or Certificates. + 3. User changes Availability. + 4. User updates Bank Details. + 5. User accesses **Support** for help. + +--- + +# Use Case Diagram +```mermaid +flowchart TD + subgraph AppInitialization [App Initialization] + 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 [User Authentication] + D --> G[Welcome Screen] + G --> H{Select Sign In/Up} + H -- "Sign In" --> I[Sign In With Email] + I --> J[Verify Email Code] + J -- Success --> C + H -- "Sign Up" --> K[Go to User Onboarding] + end + + subgraph UserOnboarding [User Onboarding] + K --> L[Collect Personal Info] + L --> M[Verify Email] + M --> N[Add Emergency Contacts] + N --> O[Enter Address] + O --> P[Define Working Area] + P --> Q[Select Role & Skills] + Q -- Success --> F + end + + subgraph ProfileCompletion [Profile Completion] + F --> R[View Checklist] + R --> S[Complete Personal Info] + R --> T[Upload Certificates] + R --> U[Manage Role Kit/Tools] + R --> V[Set Schedule Availability] + R --> W[Manage Bank Account] + R --> X[Fill Out Tax/Wage Forms] + X -- "All Complete" --> E + end + + subgraph AdminVerification [Admin Verification] + E --> Y[Waiting for Admin Review] + Y -- Approved --> C + Y -- Rejected --> F + end + + subgraph MainApp [Main Application Shell] + C --> Z[Home Dashboard] + Z --> AA{Navigate} + AA -- Marketplace --> AB[Job Marketplace] + AA -- "My Shifts" --> AC[Schedule & Shifts] + AA -- Earnings --> AD[Earnings & History] + AA -- Profile --> AE[Profile Management] + end + + subgraph ShiftDiscovery [Shift Discovery] + AB --> AF[Browse Available Shifts] + AF --> AG[Filter by Date/Location] + AF --> AH[View Shift Details] + AH --> AI[Apply/Accept Shift] + AI --> AC + end + + subgraph PreShiftOps [Pre-Shift Operations] + AC --> AJ[View Upcoming Shifts] + AJ --> AK[Select Active Shift] + AK --> AL[Complete Compliance Checklist] + AL --> AM[Verify Uniform & Tools] + AM --> AN[Confirm Attendance] + end + + subgraph LiveOperations [Live Operations] + AN --> AO[Arrive at Venue] + AO --> AP["Clock In (QR/NFC)"] + AP --> AQ[Shift In Progress] + AQ --> AR["Clock Out (QR/NFC)"] + AR --> AS[Report Issues/Breaks] + end + + subgraph PostShiftFinance [Post-Shift Finance] + AD --> AT[View Earnings Summary] + AT --> AU[View Earnings History] + AU --> AV[Check Payment Status] + AS --> AT + end + + subgraph ProfileManagement [Profile Management] + AE --> AW[View Profile] + AW --> AX[Manage Skills & Certificates] + AW --> AY[Update Availability] + AW --> AZ[Manage Bank Details] + AW --> BA[Access Support] + BA --> BB["Contact Support/FAQ"] + end +``` diff --git a/internal/launchpad/assets/documents/legacy/web-application/use-case.md b/internal/launchpad/assets/documents/legacy/web-application/use-case.md new file mode 100644 index 00000000..396fd7bb --- /dev/null +++ b/internal/launchpad/assets/documents/legacy/web-application/use-case.md @@ -0,0 +1,154 @@ +# Use Case Documentation: Krow Web Platform (Admin Panel) + +## 1. Admin Login + +* **Primary Actor:** System Administrator / Operations Manager +* **Description:** The secure entry point for accessing the backend management system. +* **Preconditions:** User has admin credentials. +* **Main Flow:** + 1. User accesses the Admin URL. + 2. User enters email and password. + 3. System verifies credentials. + 4. **Success:** Redirects to **Admin Dashboard**. + 5. **Failure:** Returns to Login Screen with error. + +--- + +## 2. Dashboard Navigation + +* **Primary Actor:** Admin +* **Description:** The central hub for accessing different management modules. +* **Preconditions:** User is logged in. +* **Main Flow:** + 1. User views the dashboard summary. + 2. User selects a module: + * **Staff Mgmt:** To approve and manage workers. + * **Client Mgmt:** To onboard businesses. + * **Operations:** To monitor live events. + * **Finance:** To handle money. + * **Configuration:** To change system settings. + +--- + +## 3. Staff Management + +* **Primary Actor:** Operations Manager +* **Description:** The process of validating new staff members. +* **Preconditions:** User is in Staff Management module. +* **Main Flow:** + 1. User filters list for "Pending" applications. + 2. User reviews documents and profile photos. + 3. **Approve:** Staff becomes "Active" and can work. + 4. **Reject:** Staff is notified to fix their profile. + +--- + +## 4. Client Management + +* **Primary Actor:** Operations Manager +* **Description:** Setting up new business accounts. +* **Preconditions:** User is in Client Management module. +* **Main Flow:** + 1. User views existing clients. + 2. User creates a new Business entity. + 3. User sets up billing details and credit limits. + 4. User creates the initial Owner account for the client. + +--- + +## 5. Live Operations + +* **Primary Actor:** Operations Manager +* **Description:** Monitoring real-time activity and solving problems. +* **Preconditions:** Events are active. +* **Main Flow:** + 1. User views the Active Events map/list. + 2. User monitors staff attendance statuses. + 3. **Issue:** If a problem arises (e.g., no-show), user intervenes. + 4. **No Issue:** Shift completes normally. + +--- + +## 6. Finance & Payroll + +* **Primary Actor:** Finance Manager +* **Description:** Processing payments and charging clients. +* **Preconditions:** Shifts are completed. +* **Main Flow:** + 1. User reviews completed shifts. + 2. User resolves any pending disputes. + 3. User runs the "Payroll Process" to pay staff. + 4. User generates invoices for clients. + 5. User sends invoices via email. + +--- + +## 7. Configuration + +* **Primary Actor:** Super Admin +* **Description:** Managing the system's rules and settings. +* **Preconditions:** User has high-level permissions. +* **Main Flow:** + 1. **Skills:** User adds new skills or certificate requirements. + 2. **Permissions:** User updates what other admins can do. + 3. **Audit:** User reviews logs for security checks. + +--- + +# Use Case Diagram +```mermaid +flowchart TD + subgraph AdminLogin + A[Start Admin Panel] --> B[Login Screen]; + B --> C[Enter Credentials]; + C --> D{Verify Auth}; + D -- Success --> E[Admin Dashboard]; + D -- Failure --> B; + end + + subgraph DashboardNavigation + E --> F{Select Module}; + F -- Staff Mgmt --> G[Staff Management]; + F -- Client Mgmt --> H[Business Clients]; + F -- Operations --> I[Live Operations]; + F -- Finance --> J[Payroll & Invoicing]; + F -- Config --> K[System Configuration]; + end + + subgraph StaffManagement + G --> L[Filter Pending Staff]; + L --> M[Review Profile & Docs]; + M --> N{Decision}; + N -- Approve --> O[Mark Active]; + N -- Reject --> P[Request Changes]; + end + + subgraph ClientManagement + H --> Q[View Clients]; + Q --> R[Create New Business]; + R --> S[Setup Billing/Credit]; + S --> T[Create Owner Account]; + end + + subgraph LiveOperations + I --> U[View Active Events Map]; + U --> V[Monitor Attendance]; + V --> W{Issue Detected?}; + W -- Yes --> X[Resolve Dispute/Issue]; + W -- No --> Y[Shift Completed]; + end + + subgraph Finance + J --> Z[View Completed Shifts]; + Z --> AA[Resolve Disputes]; + AA --> AB[Process Payroll Run]; + AB --> AC[Generate Client Invoices]; + AC --> AD[Send Invoices]; + end + + subgraph Configuration + K --> AE[Manage Skills/Certs]; + K --> AF[Manage Roles/Permissions]; + K --> AG[View Audit Logs]; + end +```