From 5cc4e0fc0abbf811f3228da37882a28285d3f599 Mon Sep 17 00:00:00 2001 From: bwnyasse <5323628+bwnyasse@users.noreply.github.com> Date: Sun, 11 Jan 2026 10:57:33 -0500 Subject: [PATCH 1/7] docs: add project onboarding master document This commit introduces a comprehensive document outlining the KROW Workforce Platform project, covering vision, architecture, domain logic, feature gap analysis, and development strategy. The document serves as a central source of truth for team onboarding and sprint planning, ensuring alignment and consistency across the project. It details the migration from a legacy system to a new GCP-based architecture using Firebase Data Connect, Cloud Functions, and Cloud SQL. Key aspects covered include: - Project vision and business value proposition - System architecture and technology stack comparison - Core domain logic and entity definitions - Feature gap analysis between legacy and prototype apps - Data Connect schema evolution and development strategy - Definition of Done (DoD) for features and sprints The document also includes appendices with entity relationship summaries, status enum references, and key file locations. --- docs/05-project-onboarding-master.md | 1065 ++++++++++++++++++++++++++ 1 file changed, 1065 insertions(+) create mode 100644 docs/05-project-onboarding-master.md diff --git a/docs/05-project-onboarding-master.md b/docs/05-project-onboarding-master.md new file mode 100644 index 00000000..cb155a89 --- /dev/null +++ b/docs/05-project-onboarding-master.md @@ -0,0 +1,1065 @@ +# KROW Workforce Platform - Project Onboarding Master Document + +> **Version:** 1.0 +> **Last Updated:** 2026-01-11 +> **Purpose:** Source of Truth for Team Onboarding & Sprint Planning + +--- + +## Table of Contents + +1. [Project Vision & Business Value](#1-project-vision--business-value) +2. [System Architecture (GCP Migration)](#2-system-architecture-gcp-migration) +3. [Core Domain Logic](#3-core-domain-logic) +4. [Feature Gap Analysis](#4-feature-gap-analysis) +5. [Data Connect & Development Strategy](#5-data-connect--development-strategy) +6. [Definition of Done (DoD)](#6-definition-of-done-dod) + +--- + +## 1. Project Vision & Business Value + +### 1.1 What is KROW? + +KROW is a **workforce management platform** that connects businesses (clients) with temporary/gig workers (staff) for event-based staffing needs. The platform handles the complete lifecycle from job posting to payment processing. + +### 1.2 The Problem We Solve + +| Stakeholder | Pain Point | KROW Solution | +|-------------|------------|---------------| +| **Businesses** | Finding qualified temp workers is time-consuming and unreliable | Instant access to pre-verified workers with ratings and certifications | +| **Workers** | Inconsistent gig opportunities, delayed payments, opaque earnings | Centralized shift discovery, real-time earnings tracking, transparent payment | +| **Administrators** | Manual coordination between clients and workers, paper-based time tracking | Automated assignment, QR/NFC clock-in, digital invoicing | + +### 1.3 Core Value Proposition + +``` +KROW = Uber for Event Staffing +``` + +- **For Clients:** Post events, define shifts, get matched workers, track time, pay invoices +- **For Staff:** Browse shifts, accept gigs, clock in/out, track earnings, get paid +- **For Admins:** Manage workforce, verify profiles, resolve disputes, generate reports + +### 1.4 Business Model + +1. **Service Fees:** Markup on worker hourly rates (configurable per business) +2. **Premium Add-ons:** Optional services (uniforms, equipment, expedited matching) +3. **Enterprise Contracts:** Long-term staffing agreements with volume discounts + +### 1.5 Strategic Objective + +> **Mission:** Achieve complete technical independence by consolidating the KROW platform onto a single, robust, and maintainable ecosystem: **Firebase & Google Cloud**. + +**Guiding Principles:** + +1. **Velocity & Focus:** Maximize productivity with Firebase Data Connect and generated SDKs +2. **Unified Backend:** Single backend (Data Connect) powers all applications (Web, iOS, Android) +3. **Scalability & Low Overhead:** Managed services minimize operational burden +4. **Data Ownership:** Full control over PostgreSQL database for complex reporting +5. **Base44 as Design Accelerator:** Treat Base44 as a prototyping tool, not a system to migrate +6. **Automation as Force Multiplier:** Automate via Makefile and CI/CD pipelines + +--- + +## 2. System Architecture (GCP Migration) + +### 2.1 Migration Overview + +``` +LEGACY (Digital Ocean) ──────────► NEW (Google Cloud Platform) +├── PHP/Laravel Backend ├── Firebase Data Connect (GraphQL) +├── Laravel Nova Admin ├── Cloud Functions (Business Logic) +├── GraphQL (Lighthouse) ├── Cloud Run (Heavy Compute) +├── PostgreSQL (Self-managed) ──────────► ├── Cloud SQL (Managed PostgreSQL) +├── Digital Ocean Spaces ──────────► ├── Cloud Storage +└── Firebase Auth + FCM ──────────► └── Firebase Auth + FCM (unchanged) +``` + +### 2.2 New Architecture Diagram + +```mermaid +graph TB + subgraph Clients["Client Applications"] + direction LR + Mobile["Flutter Apps
(Client + Staff)"] + Web["Vite/React
(Business + Admin)"] + end + + subgraph Firebase["Firebase Services"] + direction LR + Auth["Firebase Auth + FCM"] + DataConnect["Firebase Data Connect
GraphQL API + Generated SDKs"] + end + + subgraph Backend["Backend Services"] + direction LR + CloudRun["Cloud Run"] + CloudFunctions["Cloud Functions"] + end + + subgraph AI["AI Services"] + VertexAI["Vertex AI / Gemini"] + end + + subgraph Data["Data Layer"] + direction LR + CloudSQL["Cloud SQL
(PostgreSQL)"] + Storage["Cloud Storage"] + end + + subgraph Security["Security & Compliance"] + direction LR + SecServices["Cloud IAM | Monitoring | Secret Manager"] + Compliance["GDPR Ready | SOC 2 Type II | HIPAA Eligible"] + end + + Mobile -->|"GraphQL SDK"| DataConnect + Web -->|"GraphQL SDK"| DataConnect + Mobile -.-> Auth + Web -.-> Auth + + Mobile -->|"HTTP/REST"| CloudRun + Web -->|"HTTP/REST"| CloudRun + CloudFunctions -.->|"Events"| CloudRun + + DataConnect --> CloudSQL + CloudRun --> CloudSQL + CloudFunctions --> CloudSQL + CloudRun --> Storage + + CloudRun --> VertexAI + CloudFunctions --> VertexAI +``` + +### 2.3 Technology Stack Comparison + +| Component | Legacy (Current) | New (Target) | +|-----------|-----------------|--------------| +| **Backend Framework** | PHP/Laravel | Firebase Data Connect + Cloud Functions | +| **API Layer** | GraphQL (Lighthouse) | Firebase Data Connect (GraphQL) | +| **Admin Panel** | Laravel Nova | Custom React Admin (or Firebase Extension) | +| **Database** | PostgreSQL (DO Droplet) | Cloud SQL (Managed PostgreSQL) | +| **File Storage** | Digital Ocean Spaces | Cloud Storage | +| **Authentication** | Firebase Auth | Firebase Auth (unchanged) | +| **Notifications** | FCM | FCM (unchanged) | +| **Mobile Apps** | Flutter | Flutter (code restructure with Melos) | +| **Web App** | Inertia.js + Vue | Vite + React | +| **AI/ML** | None | Vertex AI / Gemini | +| **Hosting** | Digital Ocean | Firebase Hosting + Cloud Run | + +### 2.4 Key Architecture Decisions + +1. **Firebase Data Connect as Primary API:** + - Auto-generates type-safe SDKs for all clients + - Eliminates API versioning headaches + - Direct PostgreSQL access with GraphQL abstraction + +2. **Cloud Functions for Business Logic:** + - Email sending, AI invocations, file processing + - Event-driven architecture for async operations + - Clean separation from data layer + +3. **PostgreSQL Retention:** + - Full data ownership and portability + - Complex queries and reporting capabilities + - Industry-standard for enterprise requirements + +4. **Monorepo Structure:** + ``` + krow-workforce-web/ + ├── apps/ + │ ├── web-dashboard/ # Vite + React + │ ├── mobile-client/ # Flutter (business app) + │ └── mobile-staff/ # Flutter (worker app) + ├── backend/ + │ ├── dataconnect/ # Firebase Data Connect schemas + │ └── functions/ # Cloud Functions + ├── firebase/ # Firebase config + ├── internal/ + │ └── launchpad/ # Internal tools & prototypes + └── docs/ # Documentation + ``` + +--- + +## 3. Core Domain Logic + +### 3.1 Domain Entities Overview + +The KROW platform has **49 domain entities** organized into 8 logical groups: + +``` +┌────────────────────────────────────────────────────────────────────┐ +│ KROW DOMAIN MODEL │ +├────────────────────────────────────────────────────────────────────┤ +│ │ +│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ +│ │ USERS & │ │ BUSINESS & │ │ EVENTS & │ │ +│ │ MEMBERSHIP │ │ ORGANIZATION│ │ SHIFTS │ │ +│ ├─────────────┤ ├─────────────┤ ├─────────────┤ │ +│ │ User │ │ Business │ │ Event │ │ +│ │ Staff │ │ BusinessSet │ │ EventShift │ │ +│ │ Membership │ │ Hub │ │ Position │ │ +│ │ BizMember │ │ HubDept │ │ Assignment │ │ +│ │ HubMember │ │ BizContract │ │ WorkSession │ │ +│ └─────────────┘ └─────────────┘ └─────────────┘ │ +│ │ +│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ +│ │ SKILLS & │ │ FINANCIAL │ │ RATINGS & │ │ +│ │ CERTS │ │ PAYROLL │ │ PENALTIES │ │ +│ ├─────────────┤ ├─────────────┤ ├─────────────┤ │ +│ │ Skill │ │ Invoice │ │ StaffRating │ │ +│ │ SkillCat │ │ InvoiceItem │ │ PenaltyLog │ │ +│ │ StaffSkill │ │ InvDecline │ │ BizStaffPref│ │ +│ │ Certificate │ │ StaffPayment│ │ │ │ +│ │ SkillKit │ │ │ │ │ │ +│ └─────────────┘ └─────────────┘ └─────────────┘ │ +│ │ +│ ┌─────────────┐ ┌─────────────┐ │ +│ │ STAFF │ │ SUPPORT │ │ +│ │ PROFILE │ │ CONFIG │ │ +│ ├─────────────┤ ├─────────────┤ │ +│ │ EmergencyC │ │ Addon │ │ +│ │ BankAccount │ │ Tag │ │ +│ │ Accessibl │ │ Media │ │ +│ │ Schedule │ │ WorkingArea │ │ +│ └─────────────┘ └─────────────┘ │ +│ │ +└────────────────────────────────────────────────────────────────────┘ +``` + +### 3.2 Key Entity Definitions + +#### User & Authentication + +| Entity | Description | Key Fields | +|--------|-------------|------------| +| **User** | Base auth entity (Firebase) | `id`, `email`, `phone`, `role` | +| **Staff** | Worker profile | `auth_provider_id`, `name`, `email`, `phone`, `status`, `address`, `avatar`, `live_photo` | +| **Membership** | Polymorphic org membership | `user_id`, `memberable_id`, `memberable_type`, `role` | + +**Staff Status Flow:** +``` +registered → pending → completed_profile → verified → [active | blocked | inactive] +``` + +#### Business & Organization + +| Entity | Description | Key Fields | +|--------|-------------|------------| +| **Business** | Client company | `name`, `registration`, `status`, `avatar` | +| **BusinessSetting** | Payroll config | `prefix`, `overtime`, `clock_in`, `clock_out` | +| **Hub** | Branch location | `business_id`, `name`, `address`, `status` | +| **HubDepartment** | Dept within hub | `hub_id`, `name` | + +#### Events & Shifts + +| Entity | Description | Key Fields | +|--------|-------------|------------| +| **Event** | Job posting | `business_id`, `hub_id`, `name`, `date`, `status`, `contract_type` | +| **EventShift** | Work session | `event_id`, `name`, `address` | +| **EventShiftPosition** | Job opening | `shift_id`, `skill_id`, `count`, `rate`, `start_time`, `end_time`, `break` | +| **EventShiftPositionStaff** | Assignment | `staff_id`, `position_id`, `status`, `clock_in`, `clock_out` | + +**Event Status Flow:** +``` +draft → pending → assigned → confirmed → active → finished → completed → closed + ↘ under_review +``` + +**Assignment Status Flow:** +``` +assigned → confirmed → ongoing → completed + ↘ decline_by_staff → [penalty logged] + ↘ canceled_by_staff → [penalty logged] + ↘ no_showed → [penalty logged] +``` + +#### Skills & Certifications + +| Entity | Description | Key Fields | +|--------|-------------|------------| +| **Skill** | Job category | `category_id`, `name`, `price` | +| **StaffSkill** | Worker qualification | `staff_id`, `skill_id`, `level`, `experience`, `status` | +| **Certificate** | Required credential | `name`, `required` | +| **SkillKit** | Uniform/equipment req | `skill_id`, `name`, `is_required`, `type` | + +**Skill Levels:** `beginner` | `skilled` | `professional` + +#### Financial & Payroll + +| Entity | Description | Key Fields | +|--------|-------------|------------| +| **Invoice** | Business bill | `event_id`, `business_id`, `status`, `total`, `work_amount`, `addons_amount` | +| **InvoiceItem** | Line item | `invoice_id`, `staff_id`, `work_hours`, `rate`, `amounts` | +| **StaffPayment** | Worker payout | `staff_id`, `assignment_id`, `amount`, `status`, `paid_at` | + +**Invoice Status Flow:** +``` +open → disputed → resolved → verified → paid/reconciled + ↘ overdue +``` + +### 3.3 Core Business Workflows + +#### Workflow 1: Event Lifecycle + +```mermaid +sequenceDiagram + participant Client as Client App + participant API as Backend API + participant Admin as Admin + participant Staff as Staff App + + Note over Client,API: 1. Event Creation + Client->>API: Create Event with Shifts & Positions + API-->>Client: Event Created (Draft) + Client->>API: Publish Event + API-->>Client: Event Published + + Note over Admin,API: 2. Staff Assignment + Admin->>API: Assign Staff to Shift + API-->>Admin: Assignment Confirmed + API->>Staff: Notification: New Shift + + Note over Staff,API: 3. Shift Acceptance + Staff->>API: Accept Shift + API-->>Staff: Shift Confirmed + + Note over Client,Staff: 4. Day of Event + Client->>Client: Generate QR Code + Staff->>Staff: Scan QR Code + Staff->>API: Clock In + Staff->>API: Clock Out + + Note over Client,API: 5. Post-Event + Client->>API: Rate Staff + API->>API: Generate Invoice + Client->>API: Approve Invoice +``` + +#### Workflow 2: Staff Onboarding + +``` +1. Registration (Firebase Phone Auth) + ├── Create Staff record (status: registered) + └── Profile created with auth_provider_id + +2. Profile Completion + ├── Personal info (name, email, address) + ├── Avatar upload + ├── Emergency contacts + └── Bank account details + +3. Skills Declaration + ├── Add skills with level/experience + └── Status: pending → verified (admin) + +4. Certification Upload + ├── Upload certificates + └── Status: pending → verified (admin) + +5. Equipment Confirmation + ├── Confirm uniforms per skill + ├── Confirm equipment per skill + └── Upload photos as proof + +6. Profile Submission + ├── Complete verification checklist + └── Status: completed_profile → verified +``` + +#### Workflow 3: Payroll Calculation + +``` +Work Hours = (clock_out - clock_in) - break_duration + +Overtime Rules: +├── Regular Hours (1x): hours <= 8 +├── Overtime Hours (1.5x): 8 < hours <= 10 +└── Doubletime Hours (2x): hours > 10 + +Payment = (regular_hours × rate × 1.0) + + (overtime_hours × rate × 1.5) + + (doubletime_hours × rate × 2.0) + + addons_amount +``` + +### 3.4 API Structure (Legacy Reference) + +#### Client (Business) API + +**Queries:** +- `client_hubs` - Get accessible hubs +- `client_events(status)` - Paginated events +- `client_invoices(status)` - Paginated invoices +- `client_business_skills` - Business skill catalog + +**Mutations:** +- `client_create_event(input)` - Create event +- `client_publish_event(id)` - Publish event +- `track_client_clockin/clockout` - Manual time tracking +- `rate_client_staff(input)` - Rate worker + +#### Staff (Worker) API + +**Queries:** +- `me` - Current staff profile +- `staff_shifts(status)` - Paginated shifts +- `staff_payments(status)` - Paginated payments +- `verification_check_list` - Onboarding progress + +**Mutations:** +- `accept_shift(position_id)` - Accept shift +- `decline_shift(position_id, reason)` - Decline with penalty +- `track_staff_clockin/clockout` - Time tracking +- `update_staff_*` - Profile updates + +--- + +## 4. Feature Gap Analysis + +### 4.1 Legacy Feature Inventory + +#### Client Mobile App (Flutter) +| Feature | Files | Status | Priority | +|---------|-------|--------|----------| +| Event Creation & Management | 40 | Production | P0 | +| Event List & Details | 21 | Production | P0 | +| Invoice Management | 29 | Production | P0 | +| Hub Management | 11 | Production | P1 | +| Staff Assignment View | 4 | Production | P0 | +| Manual Clock In/Out | 9 | Production | P0 | +| Staff Rating | 9 | Production | P1 | +| Notifications | 12 | Production | P1 | +| Profile Management | 11 | Production | P2 | + +**Total:** 272 Dart files, 24,690 LOC, 12 features + +#### Staff Mobile App (Flutter) +| Feature | Files | Status | Priority | +|---------|-------|--------|----------| +| Authentication (Phone) | 9 | Production | P0 | +| Shift Management | 70 | Production | P0 | +| Earnings & Payments | 32 | Production | P0 | +| Profile (Complete) | 211 | Production | P0 | +| Check List (Verification) | 11 | Production | P1 | +| QR Scanner | 1 | Production | P0 | +| Support | 2 | Production | P2 | + +**Total:** 430 Dart files, 34,676 LOC, 10 features + +#### Backend (PHP/Laravel) +| Component | Count | Status | +|-----------|-------|--------| +| Eloquent Models | 49 | Production | +| Actions | 19 | Production | +| GraphQL Queries | 30+ | Production | +| GraphQL Mutations | 40+ | Production | +| Nova Resources | 20+ | Production | + +**Total:** 353 PHP files, 28,675 LOC + +### 4.2 Web Prototype Analysis (Source Code) + +**Location:** `internal/launchpad/prototypes-src/web/` + +The web prototype is a **fully functional React application** with rich business logic: + +#### 4.2.1 Feature Routes (38 Routes) + +| Category | Route | Component | Roles | +|----------|-------|-----------|-------| +| **Overview** | `/dashboard/admin` | AdminDashboard | Admin | +| | `/dashboard/client` | ClientDashboard | Client | +| | `/dashboard/vendor` | VendorDashboard | Vendor | +| | `/savings` | SavingsEngine | All | +| | `/performance` | VendorPerformance | Vendor, Admin | +| **Operations** | `/orders` | OrderList | Admin | +| | `/orders/client` | ClientOrderList | Client | +| | `/orders/vendor` | VendorOrderList | Vendor | +| | `/orders/:id` | OrderDetail | All | +| | `/orders/:id/edit` | EditOrder | All | +| | `/schedule` | Schedule | All | +| | `/availability` | StaffAvailability | All | +| | `/tasks` | TaskBoard | All | +| **Marketplace** | `/marketplace` | VendorMarketplace | Client, Admin | +| | `/marketplace/compare` | CompareRates | Client, Admin | +| **Workforce** | `/staff` | StaffList | All | +| | `/staff/add` | AddStaff | All | +| | `/staff/:id/edit` | EditStaff | All | +| | `/onboarding` | OnboardingFlow | All | +| | `/teams` | TeamList | All | +| | `/teams/create` | CreateTeam | All | +| | `/teams/:id` | TeamDetail | All | +| | `/compliance` | ComplianceDashboard | Vendor, Admin | +| | `/documents` | DocumentVault | Vendor, Admin | +| **Finance** | `/invoices` | InvoiceList | All | +| | `/invoices/new` | InvoiceEditor | All | +| | `/invoices/:id` | InvoiceDetail | All | +| **Business** | `/clients` | ClientList | Vendor, Admin | +| | `/clients/add` | AddClient | Vendor, Admin | +| | `/clients/:id/edit` | EditClient | Vendor, Admin | +| | `/rates` | ServiceRates | Vendor, Admin | +| **Analytics** | `/reports` | ReportsDashboard | All | +| | `/activity` | ActivityLog | Vendor, Admin | +| **Communication** | `/messages` | MessageCenter | All | +| | `/tutorials` | TutorialList | Client, Admin | +| **Support** | `/support` | SupportCenter | Client, Admin | + +#### 4.2.2 Business Logic Implemented (Client-Side) + +**1. Overtime Calculator** (`logic/OvertimeCalculator.ts`) +```typescript +// State-specific OT/DT rules (California vs Federal) +STATE_RULES = { + CA: { dailyOT: 8, dailyDT: 12, weeklyOT: 40, seventhDayDT: true }, + DEFAULT: { dailyOT: null, weeklyOT: 40 } +} +// Returns: status (GREEN/AMBER/RED), otHours, dtHours, costImpact +``` + +**2. Smart Assignment Engine** (`logic/SmartAssignmentEngine.ts`) +```typescript +// Multi-factor scoring algorithm +Factors: Skill Match, Reliability Score, Vendor Priority, + Fatigue Level, Compliance, Proximity, Cost Optimization +// Features: Double-booking detection, Auto-fill shifts +``` + +**3. Conflict Detection** (`logic/ConflictDetection.ts`) +```typescript +// Detects: Staff overlap, Venue overlap, Buffer time violations +// Supports: Multi-day events, Time buffers, Severity levels +``` + +**4. Order Status Utils** (`logic/OrderStatusUtils.ts`) +- Status color mapping +- Status transition rules + +**5. Double Booking Validator** (`logic/DoubleBookingValidator.ts`) +- Validates staff assignments across events + +#### 4.2.3 TypeScript Data Models (30+ Types) + +| Type | Fields | Maps to Legacy | +|------|--------|----------------| +| `User` | id, email, role, user_role, preferred_vendor_id, dashboard_layout | User + BusinessMember | +| `Staff` | id, employee_name, position, rating, reliability_score, vendor_id | Staff | +| `Event` | id, event_name, date, status, shifts, assigned_staff, is_rapid, buffer_time | Event | +| `Shift` | roles[] | EventShift | +| `ShiftRole` | role, count, start_time, end_time, bill_rate, pay_rate | EventShiftPosition | +| `StaffAssignment` | staff_id, staff_name, role | EventShiftPositionStaff | +| `Invoice` | id, invoice_number, status, amount, roles[], disputed_items | Invoice + InvoiceItem | +| `Business` | id, business_name, hubs[], favorite_staff, blocked_staff, erp_* | Business | +| `Vendor` | id, legal_name, region, approval_status, markup, fee, rates[] | NEW | +| `VendorRate` | id, vendor_name, role_name, client_rate, employee_wage, markup_% | NEW | +| `Team` | id, team_name, owner_id, members, hubs, favorite_staff, blocked_staff | Business context | +| `TeamMember` | id, team_id, member_name, email, role, department, hub | Membership | +| `TeamHub` | id, team_id, hub_name, departments[] | Hub + HubDepartment | +| `Task` | id, task_name, priority, status, assigned_members, files | NEW | +| `Certification` | id, employee_id, certification_type, status, expiry_date | StaffCertificate | +| `WorkerAvailability` | staff_id, availability_status, need_work_index, utilization_% | NEW | +| `Conversation` | id, subject, participants[], last_message | NEW | +| `ActivityLog` | id, title, description, activity_type, icon_type | ActivityLog | + +### 4.3 Feature Gap Matrix (Updated) + +| Feature Area | Legacy Mobile | Web Prototype | Gap Status | +|--------------|---------------|---------------|------------| +| **Auth & Onboarding** | Full (Phone) | Basic (Email) | Merge approaches | +| **Event/Order CRUD** | Full | Full + Enhanced | Prototype ahead | +| **Shift Management** | Full | Full + Scheduler | Prototype ahead | +| **Time Tracking (QR/NFC)** | Full | None | Legacy only | +| **Invoice Generation** | Full | Full + Templates | Prototype ahead | +| **Payroll Calculation** | Backend only | **Client-side OT calc** | Port to backend | +| **Staff Profile** | Full (211 files) | Basic | Legacy ahead | +| **Skills & Certs** | Full | Compliance Dashboard | Legacy ahead | +| **Ratings & Penalties** | Full | None explicit | Legacy only | +| **Notifications** | Full | None | Legacy only | +| **Admin Dashboard** | Nova | **3 Role Dashboards** | Prototype ahead | +| **Vendor Management** | None | **Full Marketplace** | Prototype only | +| **Smart Assignment** | None | **AI Engine** | Prototype only | +| **Conflict Detection** | None | **Full** | Prototype only | +| **Savings Engine** | None | **Full** | Prototype only | +| **Task Board** | None | **Full** | Prototype only | +| **Messaging** | None | **Full** | Prototype only | +| **Reports** | Basic | **Advanced Templates** | Prototype ahead | +| **Teams/Organizations** | Membership | **Full Team Mgmt** | Prototype ahead | +| **Worker Availability** | Schedule | **Predictive** | Prototype ahead | + +### 4.4 NEW Features in Prototype (Not in Legacy) + +These are **new capabilities** to be implemented: + +1. **Savings Engine** - Cost optimization recommendations +2. **Vendor Marketplace** - Vendor discovery and comparison +3. **Smart Assignment Engine** - AI-powered worker matching +4. **Conflict Detection** - Staff/venue/buffer conflict alerts +5. **State-Specific OT Calculator** - California labor law compliance +6. **Task Board** - Project management within platform +7. **Rate Cards & Compare Rates** - Pricing transparency +8. **Worker Availability Prediction** - Utilization scoring +9. **Report Templates** - Scheduled, exportable reports +10. **ERP Integration Settings** - Enterprise system connectivity +11. **Multi-Dashboard by Role** - Admin/Client/Vendor views +12. **Messaging Center** - In-app communication + +### 4.5 Legacy Features Missing in Prototype + +These **must be ported** from legacy: + +1. **Phone Authentication** - Firebase phone auth flow +2. **QR/NFC Clock In/Out** - Mobile time tracking +3. **Staff Profile Completion Wizard** - 9-step verification +4. **Skills & Skill Kits** - Uniform/equipment confirmation +5. **Certificate Upload & Verification** - Document management +6. **Penalty System** - Decline/cancel/no-show tracking +7. **Staff Rating by Business** - Performance reviews +8. **Payment Workflow** - Staff payout confirmation +9. **Emergency Contacts** - Worker safety info +10. **Bank Account Management** - Payout details +11. **Push Notifications** - FCM integration +12. **Geofencing** - Location-based clock validation + +### 4.6 Migration Strategy + +``` +┌─────────────────────────────────────────────────────────────────┐ +│ FEATURE MIGRATION PRIORITY │ +├─────────────────────────────────────────────────────────────────┤ +│ │ +│ P0 - MUST HAVE (Sprint 3-4) │ +│ ├── Auth (Phone + Email) │ +│ ├── Event/Order CRUD │ +│ ├── Staff Profile Basics │ +│ ├── Invoice List/Detail │ +│ └── Dashboard (by role) │ +│ │ +│ P1 - SHOULD HAVE (Sprint 5-6) │ +│ ├── Clock In/Out (QR at minimum) │ +│ ├── Smart Assignment │ +│ ├── Conflict Detection │ +│ ├── Staff Verification Workflow │ +│ └── Notifications │ +│ │ +│ P2 - NICE TO HAVE (Sprint 7+) │ +│ ├── Savings Engine │ +│ ├── Vendor Marketplace │ +│ ├── Advanced Reports │ +│ ├── Task Board │ +│ └── Messaging │ +│ │ +└─────────────────────────────────────────────────────────────────┘ +``` + +### 4.7 Mobile Prototype Analysis (Source Code) + +#### 4.7.1 Mobile Client App (Flutter) + +**Location:** `internal/launchpad/prototypes-src/mobile/client/` + +**Routes (22 screens):** + +| Category | Route | Screen | Description | +|----------|-------|--------|-------------| +| **Auth** | `/client-get-started` | GetStarted | Welcome screen | +| | `/client-sign-in` | SignIn | Email/password login | +| | `/client-sign-up` | SignUp | Registration | +| **Orders** | `/create-order` | CreateOrder | Order type selector | +| | `/create-order/rapid` | **RapidOrderFlow** | **NEW: Voice-enabled URGENT orders** | +| | `/create-order/one-time` | OneTimeOrderFlow | Single event | +| | `/create-order/recurring` | RecurringOrderFlow | Repeating schedule | +| | `/create-order/permanent` | PermanentOrderFlow | Ongoing staffing | +| **Main Nav** | `/client-coverage` | Coverage | Staffing coverage dashboard | +| | `/client-billing` | Billing | Invoice management | +| | `/client-home` | Home | Main dashboard | +| | `/client-shifts` | Shifts | Active orders | +| | `/client-reports` | Reports | Analytics hub | +| **Reports** | `/daily-ops-report` | DailyOps | **NEW: Daily operations** | +| | `/spend-report` | Spend | Cost analysis | +| | `/forecast-report` | **Forecast** | **NEW: Predictive staffing** | +| | `/performance-report` | Performance | Vendor/staff metrics | +| | `/no-show-report` | NoShow | Attendance tracking | +| | `/coverage-report-detail` | CoverageDetail | Coverage analytics | +| **Other** | `/verify-worker-attire` | **VerifyAttire** | **NEW: Uniform check** | +| | `/client-hubs` | Hubs | Location management | +| | `/client-settings` | Settings | Preferences | + +**Key NEW Features:** +- **RAPID Orders** - Voice-enabled urgent staffing requests ("Need 2 cooks ASAP") +- **4 Order Types** - One-time, Rapid, Recurring, Permanent +- **Forecast Reports** - Predictive staffing needs +- **Verify Worker Attire** - Photo verification of uniforms + +--- + +#### 4.7.2 Mobile Staff App (Flutter) + +**Location:** `internal/launchpad/prototypes-src/mobile/staff/` + +**Routes (35+ screens):** + +| Category | Route | Screen | Description | +|----------|-------|--------|-------------| +| **Auth** | `/get-started` | GetStarted | Welcome | +| | `/phone-verification` | PhoneVerification | OTP flow | +| | `/profile-setup` | ProfileSetup | Initial setup | +| **Main Nav** | `/shifts` | Shifts | Available/assigned shifts | +| | `/payments` | Payments | Earnings overview | +| | `/worker-home` | Home | Dashboard | +| | `/clock-in` | **ClockIn** | **Swipe/NFC + GPS + Commute** | +| | `/worker-profile` | Profile | Settings hub | +| **Earnings** | `/earnings` | Earnings | Detailed breakdown | +| | `/early-pay` | **EarlyPay** | **NEW: Instant pay (5% fee)** | +| **Shifts** | `/shift-details/:id` | ShiftDetails | Shift info | +| | `/jobs` | Jobs | Job search | +| | `/availability` | Availability | Schedule preferences | +| | `/benefits` | Benefits | Perks info | +| **Profile/Onboarding** | `/personal-info` | PersonalInfo | Basic details | +| | `/emergency-contact` | EmergencyContact | Safety info | +| | `/experience` | Experience | Work history | +| | `/attire` | Attire | Uniform confirmation | +| **Profile/Compliance** | `/documents` | Documents | ID uploads | +| | `/certificates` | Certificates | Certifications | +| | `/tax-forms` | TaxForms | Tax documents hub | +| | `/taxforms/i9` | **FormI9** | **NEW: I-9 verification** | +| | `/taxforms/w4` | **FormW4** | **NEW: W-4 tax form** | +| **Profile/Finances** | `/bank-account` | BankAccount | Payout setup | +| | `/time-card` | TimeCard | Hours log | +| **Profile/Level Up** | `/krow-university` | **KrowUniversity** | **NEW: Training platform** | +| | `/trainings` | **Trainings** | **NEW: Skill courses** | +| | `/leaderboard` | **Leaderboard** | **NEW: Gamification** | +| **Profile/Support** | `/faqs` | FAQs | Help articles | +| | `/messages` | Messages | Support chat | +| | `/privacy` | Privacy | Settings | + +**Key NEW Features:** + +1. **Advanced Clock-In System:** + - Swipe-to-check-in UI + - NFC badge support + - **Commute Tracker** (GPS-based ETA) + - Lunch break modal + - Geofencing validation + +2. **Early Pay (Earned Wage Access):** + - Request portion of earned wages early + - 5% service fee + - Enrollment flow with terms + +3. **Gamification & Training:** + - **KROW University** - Training courses + - **Leaderboard** - Worker rankings + - **Trainings** - Skill development + +4. **Tax Compliance:** + - **Form I-9** - Employment eligibility + - **Form W-4** - Tax withholding + +5. **Enhanced Profile:** + - Time Card history + - Documents vault + - Certificate management + +--- + +### 4.8 Complete Feature Comparison (All 3 Apps) + +| Feature | Legacy Mobile | Web Prototype | Mobile Prototype | +|---------|--------------|---------------|------------------| +| **Auth - Phone** | ✅ | ❌ | ✅ | +| **Auth - Email** | ❌ | ✅ | ✅ | +| **Order Types** | 1 (basic) | 4 (one-time, rapid, recurring, permanent) | **4 types** | +| **RAPID Orders (Voice)** | ❌ | ❌ | **✅ NEW** | +| **Clock In - QR** | ✅ | ❌ | ❌ | +| **Clock In - Swipe** | ❌ | ❌ | **✅ NEW** | +| **Clock In - NFC** | ❌ | ❌ | **✅ NEW** | +| **Commute Tracker** | ❌ | ❌ | **✅ NEW** | +| **Early Pay** | ❌ | ❌ | **✅ NEW** | +| **KROW University** | ❌ | ❌ | **✅ NEW** | +| **Leaderboard** | ❌ | ❌ | **✅ NEW** | +| **Tax Forms (I-9, W-4)** | ❌ | ❌ | **✅ NEW** | +| **Forecast Reports** | ❌ | ❌ | **✅ NEW** | +| **Verify Attire** | ❌ | ❌ | **✅ NEW** | +| **Smart Assignment** | ❌ | **✅** | ❌ | +| **Conflict Detection** | ❌ | **✅** | ❌ | +| **Savings Engine** | ❌ | **✅** | ❌ | +| **Vendor Marketplace** | ❌ | **✅** | ❌ | +| **Staff Profile (complete)** | ✅ | Basic | Enhanced | +| **Penalty System** | ✅ | ❌ | ❌ | +| **Staff Rating** | ✅ | ❌ | ❌ | + +### 4.9 Source Code Locations + +| Component | Location | Tech | +|-----------|----------|------| +| Web Prototype Source | `internal/launchpad/prototypes-src/web/` | React + TypeScript | +| Mobile Client Prototype | `internal/launchpad/prototypes-src/mobile/client/` | Flutter + Dart | +| Mobile Staff Prototype | `internal/launchpad/prototypes-src/mobile/staff/` | Flutter + Dart | +| Legacy Client Mobile | `_legacy/apps/krow_client_context.md` | Flutter (context doc) | +| Legacy Staff Mobile | `_legacy/apps/krow_staff_context.md` | Flutter (context doc) | +| Legacy Backend | `_legacy/apps/php_backend_context.md` | PHP/Laravel | +| New Backend | `backend/dataconnect/` | Firebase Data Connect | + +--- + +## 5. Data Connect & Development Strategy + +### 5.1 Feature-Driven Schema Evolution + +> **Principle:** The Data Connect schema is **not** pre-designed. It evolves iteratively as features are implemented. + +``` +Feature Implementation Flow: +┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ +│ Pick Feature │ ──► │ Define Schema │ ──► │ Implement UI │ +│ from Sprint │ │ Tables/Queries │ │ with SDK │ +└──────────────────┘ └──────────────────┘ └──────────────────┘ + │ │ │ + │ │ │ + ▼ ▼ ▼ + No mocks! Just enough Generated SDK + Real data for feature guarantees types + from start +``` + +### 5.2 No Mock Data Policy + +**Why no mocks?** +1. Data Connect generates type-safe SDKs automatically +2. Mocks create drift between expected and actual schemas +3. Real data surfaces integration issues early +4. Reduces "works on my machine" problems + +**Instead of mocks:** +- Use Firebase emulator suite for local development +- Seed development database with realistic test data +- Write schema migrations as features are added + +### 5.3 Sprint 3 Schema Strategy + +For each feature in Sprint 3: + +1. **Identify Data Requirements** + - What entities does this feature need? + - What fields are required vs optional? + - What relationships exist? + +2. **Write Schema Incrementally** + ```gql + # backend/dataconnect/schema/event.gql + type Event @table { + id: UUID! @default(expr: "uuidV4()") + name: String! + status: EventStatus! + date: Date! + business: Business! @relation + hub: Hub @relation + shifts: [EventShift!]! @relation + createdAt: Timestamp! @default(expr: "request.time") + } + ``` + +3. **Define Queries/Mutations** + ```gql + # backend/dataconnect/queries/events.gql + query ListEvents($status: EventStatus) @auth(level: USER) { + events(where: { status: { eq: $status } }) { + id, name, status, date + business { name } + } + } + ``` + +4. **Generate SDK & Implement UI** + ```bash + firebase dataconnect:sdk:generate + ``` + +### 5.4 Development Environment Setup + +```bash +# Prerequisites +node -v # >= 20.x +pnpm -v # latest +fvm use # Flutter version management +firebase --version # >= 13.x + +# Setup +git clone +cd krow-workforce-web +pnpm install +firebase login +firebase use development + +# Start development +make dev # Start all services +make dev-web # Web only +make dev-mobile # Mobile emulators +make sync-prototypes # Sync visual references +``` + +### 5.5 Recommended Sprint 3 Feature Order + +Based on minimal dependencies: + +1. **Authentication Flow** (depends: Firebase Auth only) +2. **Staff Profile Basics** (depends: Auth) +3. **Event List View** (depends: Auth, basic schema) +4. **Event Creation** (depends: Auth, Events schema) +5. **Shift Assignment** (depends: Events, Staff) +6. **Time Tracking** (depends: Assignments) +7. **Invoice Generation** (depends: Completed shifts) + +--- + +## 6. Definition of Done (DoD) + +### 6.1 Feature-Level DoD + +A feature is **DONE** when: + +- [ ] **Schema:** Data Connect schema defined and deployed +- [ ] **SDK:** Generated SDK integrated into app +- [ ] **UI:** All screens implemented per prototype design +- [ ] **Logic:** Business logic working correctly +- [ ] **Tests:** Unit tests for critical logic (>80% coverage) +- [ ] **Integration:** E2E test for happy path +- [ ] **Security:** Auth rules validated +- [ ] **Accessibility:** Basic a11y compliance +- [ ] **Documentation:** API documented in schema comments +- [ ] **Review:** Code reviewed and approved + +### 6.2 Sprint-Level DoD + +A sprint is **DONE** when: + +- [ ] All planned features meet Feature DoD +- [ ] No P0 bugs in staging environment +- [ ] Performance: <3s initial load, <500ms interactions +- [ ] Security audit passed (no critical vulnerabilities) +- [ ] Staging deployed and validated +- [ ] Demo-ready for stakeholders +- [ ] Documentation updated + +### 6.3 Code Quality Standards + +| Aspect | Standard | +|--------|----------| +| **Linting** | Zero ESLint/Dart analyzer errors | +| **Formatting** | Prettier (JS/TS), dart format | +| **Types** | Strict TypeScript, no `any` | +| **Commits** | Conventional commits format | +| **PRs** | Template completed, 1+ approval | +| **Tests** | Unit + Integration for new code | + +### 6.4 Commit Message Format + +``` +(): + +[optional body] + +[optional footer] +``` + +**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` + +**Examples:** +``` +feat(events): add event creation form +fix(auth): handle token expiration correctly +docs(readme): update setup instructions +``` + +### 6.5 Branch Strategy + +``` +main (production) + └── dev (staging) + └── feature/KROW-123-event-creation + └── feature/KROW-124-shift-management + └── fix/KROW-125-clock-in-bug +``` + +### 6.6 PR Checklist + +```markdown +## PR Checklist +- [ ] Code follows project conventions +- [ ] Self-reviewed changes +- [ ] Added/updated tests +- [ ] Documentation updated if needed +- [ ] No console.log/print statements +- [ ] Sensitive data not hardcoded +- [ ] Tested on emulator/device +``` + +--- + +## Appendix A: Entity Relationship Summary + +``` +User (1) ─── (M) Membership ──┬── Business + ├── Hub + └── HubDepartment + +Staff (1) ──┬── (M) StaffSkill ─── Skill ─── SkillCategory + │ └── (M) StaffSkillKit ─── SkillKit + ├── (M) StaffCertificate ─── Certificate + ├── (1) StaffBankAccount + ├── (1) StaffAccessibility + ├── (M) StaffSchedule + ├── (M) StaffEmergencyContact + └── (M) EventShiftPositionStaff + +Business (1) ──┬── (1) BusinessSetting + ├── (1) BusinessContact + ├── (M) BusinessContract + ├── (M) Hub ──── (M) HubDepartment + └── (M) Event ──── (M) EventShift ──── (M) EventShiftPosition + │ + └── (M) Invoice ──── (M) InvoiceItem +``` + +--- + +## Appendix B: Status Enums Reference + +### Event Status +`draft` → `pending` → `assigned` → `confirmed` → `active` → `finished` → `completed` → `closed` + +### Assignment Status +`assigned` | `confirmed` | `ongoing` | `completed` | `canceled_by_staff` | `decline_by_staff` | `canceled_by_business` | `canceled_by_admin` | `requested_replace` | `no_showed` + +### Staff Status +`registered` | `pending` | `verified` | `blocked` | `inactive` | `completed_profile` + +### Invoice Status +`open` | `disputed` | `resolved` | `verified` | `overdue` | `reconciled` | `paid` + +### Payment Status +`new` | `confirmed_by_admin` | `confirmed_by_staff` | `decline_by_staff` | `sent` | `paid` | `failed` | `canceled` + +--- + +## Appendix C: Key Files Reference + +| Purpose | Location | +|---------|----------| +| Vision document | `docs/00-vision.md` | +| Backend API spec (legacy) | `docs/01-backend-api-specification.md` | +| CI/CD config | `docs/02-codemagic-env-vars.md` | +| Contributing guide | `docs/03-contributing.md` | +| Prototype sync | `docs/04-sync-prototypes.md` | +| Legacy PHP context | `_legacy/apps/php_backend_context.md` | +| Legacy Client context | `_legacy/apps/krow_client_context.md` | +| Legacy Staff context | `_legacy/apps/krow_staff_context.md` | +| Architecture diagrams | `internal/launchpad/assets/diagrams/` | +| Data Connect schemas | `backend/dataconnect/` | + +--- + +*This document is the source of truth for team onboarding. Update it as the project evolves.* From 8916a4ac49c7505ab453bb9440d0d693035048b7 Mon Sep 17 00:00:00 2001 From: bwnyasse <5323628+bwnyasse@users.noreply.github.com> Date: Mon, 12 Jan 2026 11:44:26 -0500 Subject: [PATCH 2/7] feat: add feature roadmap and tickets documentation feat: add detailed feature roadmap and tickets documentation feat: add roadmap overview diagram feat: add roadmap p0 mvp diagram feat: add roadmap p0 complete workflow diagram feat: update diagrams config to include new roadmap diagrams feat: add support for syncing source code for ai context chore: update allowed hashes feat: add jose.salazar@oloodi.com to iap-users.txt feat: add fazulilahi@gmail.com to iap-users.txt feat: add zouantchaw74@gmail.com to iap-users.txt --- .gitignore | 3 + docs/03-contributing.md | 3 +- docs/05-project-onboarding-master.md | 11 +- docs/06-feature-roadmap-tickets.md | 681 +++++++++ docs/07-feature-roadmap-tickets-details.md | 1333 +++++++++++++++++ internal/launchpad/allowed-hashes.json | 5 +- .../assets/diagrams/diagrams-config.json | 18 +- .../roadmap/0-roadmap-overview.mermaid | 25 + .../diagrams/roadmap/1-roadmap-p0-mvp.mermaid | 32 + .../roadmap/2-roadmap-p0-complete.mermaid | 30 + .../assets/diagrams/roadmap/roadmap.mermaid | 17 - internal/launchpad/iap-users.txt | 6 + scripts/sync-prototypes.sh | 31 + 13 files changed, 2168 insertions(+), 27 deletions(-) create mode 100644 docs/06-feature-roadmap-tickets.md create mode 100644 docs/07-feature-roadmap-tickets-details.md create mode 100644 internal/launchpad/assets/diagrams/roadmap/0-roadmap-overview.mermaid create mode 100644 internal/launchpad/assets/diagrams/roadmap/1-roadmap-p0-mvp.mermaid create mode 100644 internal/launchpad/assets/diagrams/roadmap/2-roadmap-p0-complete.mermaid delete mode 100644 internal/launchpad/assets/diagrams/roadmap/roadmap.mermaid diff --git a/.gitignore b/.gitignore index c23832af..9f3989b2 100644 --- a/.gitignore +++ b/.gitignore @@ -165,6 +165,9 @@ internal/launchpad/prototypes/web/* internal/launchpad/prototypes/mobile/**/* !internal/launchpad/prototypes/mobile/**/.keep +# Prototype Source Code (synced for AI/Claude context, not for version control) +internal/launchpad/prototypes-src/ + # Temporary migration artifacts _legacy/ krow-workforce-export-latest/ diff --git a/docs/03-contributing.md b/docs/03-contributing.md index 06a4c787..8b521423 100644 --- a/docs/03-contributing.md +++ b/docs/03-contributing.md @@ -85,7 +85,8 @@ Follow these steps to set up your development environment and gain access to all ## 🔗 Useful Links - **KROW Internal Launchpad:** [https://launchpad.krowwithus.com](https://launchpad.krowwithus.com) +- **Project Onboarding (Start Here):** [docs/05-project-onboarding-master.md](./05-project-onboarding-master.md) - Comprehensive guide covering architecture, domain logic, feature gap analysis, and development strategy - **Project Vision:** [docs/00-vision.md](./00-vision.md) -- **Backend Specification:** [docs/01-backend-api-specification.md](./01-backend-api-specification.md) +- **Backend Specification (Legacy Reference):** [docs/01-backend-api-specification.md](./01-backend-api-specification.md) - Historical API spec from Digital Ocean stack - **Codemagic Env Vars:** [docs/02-codemagic-env-vars.md](./02-codemagic-env-vars.md) diff --git a/docs/05-project-onboarding-master.md b/docs/05-project-onboarding-master.md index cb155a89..0486a87b 100644 --- a/docs/05-project-onboarding-master.md +++ b/docs/05-project-onboarding-master.md @@ -917,7 +917,7 @@ Based on minimal dependencies: ## 6. Definition of Done (DoD) -### 6.1 Feature-Level DoD +### 6.1 Feature-Level DoD (MVP Phase) A feature is **DONE** when: @@ -925,13 +925,14 @@ A feature is **DONE** when: - [ ] **SDK:** Generated SDK integrated into app - [ ] **UI:** All screens implemented per prototype design - [ ] **Logic:** Business logic working correctly -- [ ] **Tests:** Unit tests for critical logic (>80% coverage) -- [ ] **Integration:** E2E test for happy path +- [ ] **Manual Testing:** Feature tested directly in the application (happy path + edge cases) - [ ] **Security:** Auth rules validated - [ ] **Accessibility:** Basic a11y compliance - [ ] **Documentation:** API documented in schema comments - [ ] **Review:** Code reviewed and approved +> **Note (MVP):** For rapid MVP delivery, we focus on manual/integration testing directly in applications rather than unit tests. Automated test coverage will be added post-MVP. + ### 6.2 Sprint-Level DoD A sprint is **DONE** when: @@ -953,7 +954,7 @@ A sprint is **DONE** when: | **Types** | Strict TypeScript, no `any` | | **Commits** | Conventional commits format | | **PRs** | Template completed, 1+ approval | -| **Tests** | Unit + Integration for new code | +| **Testing (MVP)** | Manual testing in application | ### 6.4 Commit Message Format @@ -990,7 +991,7 @@ main (production) ## PR Checklist - [ ] Code follows project conventions - [ ] Self-reviewed changes -- [ ] Added/updated tests +- [ ] Feature manually tested in application - [ ] Documentation updated if needed - [ ] No console.log/print statements - [ ] Sensitive data not hardcoded diff --git a/docs/06-feature-roadmap-tickets.md b/docs/06-feature-roadmap-tickets.md new file mode 100644 index 00000000..a3da93bd --- /dev/null +++ b/docs/06-feature-roadmap-tickets.md @@ -0,0 +1,681 @@ +# KROW Feature Roadmap & Tickets + +> **Organization:** By priority (P0 → P1 → P2), then by domain +> **Source:** Analysis of prototypes in `internal/launchpad/prototypes-src/` + +--- + +## Overview + +```mermaid +flowchart LR + subgraph P0["P0: MVP Core (Sprint 3-4)"] + A[Auth] --> B[Staff Onboarding] + B --> C[Events/Orders] + C --> D[Shifts/Assignment] + D --> E[Clock In/Out] + E --> F[Timesheets] + F --> G[Invoices] + G --> H[Earnings View] + end + + subgraph P1["P1: Enhanced (Sprint 5-6)"] + I[Smart Assignment] + J[Early Pay] + K[RAPID Orders] + L[Reports] + end + + subgraph P2["P2: Full Vision (Sprint 7+)"] + M[KROW University] + N[Gamification] + O[Advanced Analytics] + end + + P0 --> P1 --> P2 +``` + +--- + +## Progression by App + +### At the end of P0 (MVP), each app allows: + +```mermaid +flowchart TB + subgraph WEB["WEB (Admin/Client)"] + W1[Email/Password Login] + W2[Role-based Dashboard] + W3[Manage Staff] + W4[Create Events/Orders] + W5[Assign Staff to Shifts] + W6[Approve Timesheets] + W7[Generate Invoices] + W8[View Basic Reports] + end + + subgraph MC["MOBILE CLIENT"] + MC1[Email + Social Login] + MC2[Coverage Dashboard] + MC3[Create Orders] + MC4[View Active Shifts] + MC5[Manage Hubs] + MC6[View Billing] + MC7[Basic Reports] + end + + subgraph MS["MOBILE STAFF"] + MS1[Phone + SMS OTP Login] + MS2[Complete Onboarding] + MS3[View Available Shifts] + MS4[Accept/Decline Shifts] + MS5[Swipe Clock In/Out] + MS6[View Earnings] + MS7[I-9/W-4 Forms] + MS8[Bank Account Setup] + end +``` + +--- + +# P0 - MUST HAVE (Sprint 3-4) + +> **Goal:** End-to-end functional MVP +> **Total:** 52 tickets + +--- + +## P0.1 - Authentication + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-AUTH-01 | Email/Password Login | Login form with email + password | +| P0-AUTH-02 | Password Reset | Send reset email, link, new password | +| P0-AUTH-03 | Role-Based Redirect | Admin → `/dashboard/admin`, Client → `/dashboard/client`, Vendor → `/dashboard/vendor` | +| P0-AUTH-04 | Session Persistence | Token persist, auto-refresh, logout | + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-AUTH-05 | Get Started Screen | Welcome screen with Sign In / Sign Up options | +| P0-AUTH-06 | Email/Password Login | Form with email + password | +| P0-AUTH-07 | Social Login (Apple/Google) | Apple and Google sign-in buttons | +| P0-AUTH-08 | Client Registration | Business signup form | + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-AUTH-09 | Get Started Screen | Welcome screen "Work, Grow, Elevate" | +| P0-AUTH-10 | Phone Verification | US phone number input (+1) | +| P0-AUTH-11 | SMS OTP Code | Send and validate 6-digit code | +| P0-AUTH-12 | Login vs Signup Mode | Same flow, different destination | + +--- + +## P0.2 - Staff Management + +### MOBILE STAFF - Onboarding + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-STAFF-01 | Profile Setup Wizard | Screen after phone verification | +| P0-STAFF-02 | Personal Info Screen | Name, date of birth, address | +| P0-STAFF-03 | Emergency Contact | Emergency contact (name, relationship, phone) | +| P0-STAFF-04 | Experience Screen | Skills/experience selection | +| P0-STAFF-05 | Attire Screen | Uniform/outfit photo | +| P0-STAFF-06 | Bank Account Setup | Banking info for payment | + +### WEB - Admin Staff Management + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-STAFF-07 | Staff List | List with search, filters (status, skills) | +| P0-STAFF-08 | Staff Detail View | Full profile, documents, history | +| P0-STAFF-09 | Add Staff (Admin) | Staff creation form | +| P0-STAFF-10 | Edit Staff | Modify staff info | +| P0-STAFF-11 | Staff Approval Queue | Approve/Reject new staff | + +--- + +## P0.3 - Business & Hub Management + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-BIZ-01 | Client List | Business list with search/filter | +| P0-BIZ-02 | Add Client | Business creation form | +| P0-BIZ-03 | Edit Client | Modify business info | +| P0-BIZ-04 | Service Rates Config | Configure rates per position | + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-BIZ-05 | Client Hubs Screen | Location list and management | +| P0-BIZ-06 | Client Settings | Business account settings | + +--- + +## P0.4 - Event & Order Management + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-EVENT-01 | Order List (Admin) | All orders with filters | +| P0-EVENT-02 | Order List (Client) | Client's orders only | +| P0-EVENT-03 | Order List (Vendor) | Orders assigned to vendor | +| P0-EVENT-04 | Order Detail | Detailed view with shifts | +| P0-EVENT-05 | Edit Order | Modify event/shifts | +| P0-EVENT-06 | Schedule View | Event calendar | + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-EVENT-07 | Create Order Screen | Order type selection | +| P0-EVENT-08 | One-Time Order Flow | Wizard for one-time event creation | +| P0-EVENT-09 | Client Shifts Screen | Client's shifts list | +| P0-EVENT-10 | Client Coverage Screen | Staffing coverage view | + +--- + +## P0.5 - Shift & Assignment + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-SHIFT-01 | Staff Availability View | View staff availability | +| P0-SHIFT-02 | Manual Assignment | Assign staff to shift | +| P0-SHIFT-03 | Task Board | Task/assignment kanban | + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-SHIFT-04 | Shifts Screen (Tabs) | Available / My Shifts / History | +| P0-SHIFT-05 | Shift Details Screen | Details with location, hours, pay | +| P0-SHIFT-06 | Accept/Decline Shift | Actions on proposed shift | +| P0-SHIFT-07 | Jobs Screen | Explore all available jobs | +| P0-SHIFT-08 | Availability Screen | Configure availability | + +--- + +## P0.6 - Time & Attendance + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-TIME-01 | Clock In Screen | Main clock-in screen | +| P0-TIME-02 | Swipe to Clock In | Swipe gesture to confirm | +| P0-TIME-03 | Swipe to Clock Out | Swipe gesture to end | +| P0-TIME-04 | GPS Location Capture | Record position at clock | +| P0-TIME-05 | Time Card Screen | Clock history | + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-TIME-06 | Timesheet Approval | Timesheet approval queue | + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-TIME-07 | Client Timesheets | View timesheets for approval | + +--- + +## P0.7 - Financial + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-FIN-01 | Invoice List | Invoice list with status | +| P0-FIN-02 | Invoice Detail | Detailed invoice view | +| P0-FIN-03 | Invoice Editor | Create/modify invoice | + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-FIN-04 | Payments Screen | Earnings dashboard | +| P0-FIN-05 | Earnings Screen | Earnings detail | + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-FIN-06 | Client Billing Screen | Client billing view | + +--- + +## P0.8 - Compliance & Documents + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-COMP-01 | Tax Forms Screen | Tax forms list | +| P0-COMP-02 | Form I-9 | I-9 employment eligibility form | +| P0-COMP-03 | Form W-4 | W-4 tax withholding form | +| P0-COMP-04 | Documents Screen | Upload/view documents | +| P0-COMP-05 | Certificates Screen | Manage certifications | + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-COMP-06 | Compliance Dashboard | Compliance view for all staff | +| P0-COMP-07 | Document Vault | Document storage | + +--- + +## P0.9 - Dashboards & Navigation + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-DASH-01 | Admin Dashboard | Widgets: stats, alerts, actions | +| P0-DASH-02 | Client Dashboard | Widgets: coverage, orders, spend | +| P0-DASH-03 | Vendor Dashboard | Widgets: orders, staff, revenue | + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-DASH-04 | Client Home Screen | Mobile main dashboard | +| P0-DASH-05 | Bottom Navigation | Coverage, Billing, Home, Shifts, Reports | + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P0-DASH-06 | Worker Home Screen | Staff main dashboard | +| P0-DASH-07 | Bottom Navigation | Shifts, Payments, Home, Clock-In, Profile | +| P0-DASH-08 | Worker Profile Screen | Settings and features menu | + +--- + +## Complete P0 Workflow + +```mermaid +sequenceDiagram + participant Staff as Mobile Staff + participant Client as Mobile Client + participant Admin as Web Admin + + Note over Staff,Admin: 1. SETUP + Staff->>Staff: Phone + OTP Login + Staff->>Staff: Complete Onboarding + Staff->>Staff: Submit I-9, W-4 + Admin->>Admin: Approve Staff + + Note over Staff,Admin: 2. ORDER + Client->>Client: Email Login + Client->>Client: Create Order (One-Time) + Admin->>Admin: View Order + + Note over Staff,Admin: 3. ASSIGNMENT + Admin->>Admin: Assign Staff to Shift + Staff->>Staff: View Shift Offer + Staff->>Staff: Accept Shift + + Note over Staff,Admin: 4. WORK + Staff->>Staff: Swipe Clock In (GPS) + Staff->>Staff: Swipe Clock Out + + Note over Staff,Admin: 5. PAYMENT + Client->>Client: Approve Timesheet + Admin->>Admin: Generate Invoice + Client->>Client: View Invoice + Staff->>Staff: View Earnings +``` + +--- + +# P1 - SHOULD HAVE (Sprint 5-6) + +> **Goal:** Differentiating features +> **Total:** 38 tickets + +--- + +## P1.1 - Smart Features + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-SMART-01 | Smart Assignment Engine | Auto-match staff based on skills, availability, proximity | +| P1-SMART-02 | Conflict Detection | Detect double-booking | +| P1-SMART-03 | Overtime Calculator | OT/DT calculation with California rules | +| P1-SMART-04 | Savings Engine | Potential savings analysis | + +--- + +## P1.2 - Advanced Orders + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-ORDER-01 | RAPID Order Flow | Quick simplified order creation | +| P1-ORDER-02 | Recurring Order Flow | Recurring orders (weekly, monthly) | +| P1-ORDER-03 | Permanent Order Flow | Permanent placements | +| P1-ORDER-04 | Verify Worker Attire | Staff attire verification | + +--- + +## P1.3 - Early Pay + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-PAY-01 | Early Pay Screen | Access earnings before payday | +| P1-PAY-02 | Early Pay Request | Request early payment (5% fee) | +| P1-PAY-03 | Instant Transfer | Transfer to bank account | +| P1-PAY-04 | Benefits Screen | Available benefits view | + +--- + +## P1.4 - Reports + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-REPORT-01 | Client Reports Screen | Reports hub | +| P1-REPORT-02 | Daily Ops Report | Daily operations report | +| P1-REPORT-03 | Spend Report | Spending analysis | +| P1-REPORT-04 | Forecast Report | Needs forecast | +| P1-REPORT-05 | Performance Report | Staff performance | +| P1-REPORT-06 | No-Show Report | Absence report | +| P1-REPORT-07 | Coverage Report | Coverage report | + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-REPORT-08 | Reports Dashboard | Admin reports center | +| P1-REPORT-09 | Activity Log | System activity log | +| P1-REPORT-10 | Vendor Performance | Vendor performance | + +--- + +## P1.5 - Communication + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-COMM-01 | Message Center | Internal messaging | +| P1-COMM-02 | Tutorial List | Training videos/guides | +| P1-COMM-03 | Support Center | Help center | + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-COMM-04 | Messages Screen | Staff messaging | +| P1-COMM-05 | FAQs Screen | Frequently asked questions | +| P1-COMM-06 | Privacy Screen | Privacy settings | + +--- + +## P1.6 - Teams & Workers + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-TEAM-01 | Team List | Team list | +| P1-TEAM-02 | Create Team | Create team | +| P1-TEAM-03 | Team Detail | Team details | +| P1-TEAM-04 | Staff Onboarding Flow | Web onboarding wizard | + +### MOBILE CLIENT + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-TEAM-05 | Client Workers Screen | View assigned staff | + +--- + +## P1.7 - Marketplace + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P1-MKT-01 | Vendor Marketplace | Discover vendors | +| P1-MKT-02 | Compare Rates | Compare rates | + +--- + +## P1 Added Workflow + +```mermaid +flowchart TB + subgraph SMART["Smart Features"] + A[Client creates Order] --> B{Smart Engine} + B --> C[Auto-suggest Staff] + C --> D[Check Conflicts] + D --> E[Calculate OT Impact] + E --> F[Assign Optimal Staff] + end + + subgraph EARLYPAY["Early Pay"] + G[Staff completes Shift] + G --> H[Earnings Available] + H --> I[Request Early Pay] + I --> J[5% Fee Applied] + J --> K[Instant Bank Transfer] + end + + subgraph RAPID["RAPID Orders"] + L[Client opens RAPID] + L --> M[Quick Selection] + M --> N[Minimal Fields] + N --> O[Instant Submit] + end +``` + +--- + +# P2 - NICE TO HAVE (Sprint 7+) + +> **Goal:** Complete prototype vision +> **Total:** 28 tickets + +--- + +## P2.1 - KROW University + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P2-UNI-01 | KROW University Screen | Training hub | +| P2-UNI-02 | Trainings Screen | Available courses list | +| P2-UNI-03 | Course Enrollment | Enroll in a course | +| P2-UNI-04 | Video Lessons | Video playback | +| P2-UNI-05 | Quizzes | Knowledge tests | +| P2-UNI-06 | Certificates Earned | Earned badges/certs | + +--- + +## P2.2 - Gamification + +### MOBILE STAFF + +| ID | Ticket | Description | +|----|--------|-------------| +| P2-GAME-01 | Leaderboard Screen | Staff ranking | +| P2-GAME-02 | XP System | Experience points | +| P2-GAME-03 | Badges | Achievement badges | +| P2-GAME-04 | Level Progression | Level progression | +| P2-GAME-05 | Referral Program | Referral program | + +--- + +## P2.3 - Advanced Scheduling + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P2-SCHED-01 | Drag-Drop Scheduler | Drag-and-drop planning | +| P2-SCHED-02 | Automation Engine | Automation rules | +| P2-SCHED-03 | Double-Booking Override | Exception handling | +| P2-SCHED-04 | Cancellation Fee Modal | Cancellation fee management | + +--- + +## P2.4 - Advanced Finance + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P2-FIN-01 | Auto Invoice Generator | Auto invoice generation | +| P2-FIN-02 | Invoice Export Panel | Multi-format export | +| P2-FIN-03 | Invoice Quick Actions | Quick actions | + +--- + +## P2.5 - Advanced Analytics + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P2-ANAL-01 | Staffing Cost Report | Staffing cost analysis | +| P2-ANAL-02 | Staff Performance Report | Individual performance | +| P2-ANAL-03 | Operational Efficiency | Operational efficiency | +| P2-ANAL-04 | Report Template Library | Template library | +| P2-ANAL-05 | Scheduled Reports | Scheduled reports | +| P2-ANAL-06 | Report PDF Preview | PDF preview | +| P2-ANAL-07 | Report Insights Banner | Automatic insights | + +--- + +## P2.6 - Advanced Client Features + +### WEB + +| ID | Ticket | Description | +|----|--------|-------------| +| P2-CLI-01 | Client Loyalty Card | Loyalty program | +| P2-CLI-02 | Client Vendor Preferences | Vendor preferences | +| P2-CLI-03 | Dashboard Customizer | Dashboard customization | + +--- + +## Complete P2 Workflow + +```mermaid +flowchart TB + subgraph UNI["KROW University"] + U1[Staff opens University] --> U2[Browse Courses] + U2 --> U3[Enroll in Course] + U3 --> U4[Watch Videos] + U4 --> U5[Pass Quiz] + U5 --> U6[Earn Certificate] + U6 --> U7[+XP Points] + end + + subgraph GAME["Gamification"] + G1[Complete Shifts] --> G2[Earn XP] + G2 --> G3[Level Up] + G3 --> G4[Unlock Badges] + G4 --> G5[Climb Leaderboard] + G5 --> G6[Better Shift Priority] + end + + subgraph AUTO["Advanced Automation"] + A1[New Order Created] + A1 --> A2[Automation Rules Check] + A2 --> A3[Auto-Assign Preferred Staff] + A3 --> A4[Auto-Generate Invoice] + A4 --> A5[Auto-Send Reports] + end +``` + +--- + +# Completion Checklist + +## When P0 is done: + +- [ ] **Auth works** for all 3 apps (phone OTP for staff, email for client/web) +- [ ] **Staff can fully onboard** via mobile +- [ ] **Client can create** one-time orders +- [ ] **Admin can assign** staff to shifts +- [ ] **Staff can clock in/out** with swipe + GPS +- [ ] **Timesheets are approved** by client +- [ ] **Invoices are generated** and visible +- [ ] **Staff can view earnings** +- [ ] **I-9/W-4 forms** work + +**= MVP ACHIEVED** + +--- + +## When P1 is done: + +- [ ] **Smart Assignment** automatically suggests best staff +- [ ] **Conflict detection** prevents double-bookings +- [ ] **Early Pay** allows staff to access earnings +- [ ] **RAPID orders** speeds up creation +- [ ] **Recurring orders** handles repetitive needs +- [ ] **Full reports** give clients visibility +- [ ] **Messaging** enables direct communication + +**= ENHANCED MVP** + +--- + +## When P2 is done: + +- [ ] **KROW University** trains staff +- [ ] **Gamification** motivates via XP and leaderboard +- [ ] **Advanced scheduling** optimizes planning +- [ ] **Auto-invoicing** reduces manual work +- [ ] **Advanced analytics** provide business insights + +**= FULL PROTOTYPE VISION ACHIEVED** + +--- + +# Summary + +| Priority | Sprints | Tickets | +|----------|---------|---------| +| **P0** | 3-4 | **52** | +| **P1** | 5-6 | **38** | +| **P2** | 7+ | **28** | +| **TOTAL** | - | **118** | + +### By App + +| App | P0 | P1 | P2 | Total | +|-----|----|----|-----|-------| +| Web | 22 | 16 | 14 | 52 | +| Mobile Client | 12 | 12 | 3 | 27 | +| Mobile Staff | 18 | 10 | 11 | 39 | + +--- + +**Document Created:** January 2026 +**Source:** Analysis of `internal/launchpad/prototypes-src/` diff --git a/docs/07-feature-roadmap-tickets-details.md b/docs/07-feature-roadmap-tickets-details.md new file mode 100644 index 00000000..64c11bdf --- /dev/null +++ b/docs/07-feature-roadmap-tickets-details.md @@ -0,0 +1,1333 @@ +# KROW Feature Roadmap - Detailed Tickets + +> **Purpose:** Detailed reference for writing issues and developer briefings +> **Quick Reference:** See `06-feature-roadmap-tickets.md` for overview +> **Source:** Prototypes in `internal/launchpad/prototypes-src/` + +--- + +# P0 - MUST HAVE (Sprint 3-4) + +--- + +## P0.1 - Authentication + +### WEB + +--- + +#### P0-AUTH-01 + +- **Ticket:** Email/Password Login +- **Description:** Login form with email + password +- **Details:** Implement login page at `/login` route. Form with email field (validated), password field (min 8 chars), "Sign In" button, and "Forgot password?" link. Show loading state during auth. Display error messages for invalid credentials. Reference: `prototypes-src/web/src/auth/Login.tsx` + +--- + +#### P0-AUTH-02 + +- **Ticket:** Password Reset +- **Description:** Send reset email, link, new password +- **Details:** "Forgot password" flow: (1) Enter email → (2) Receive email with reset link → (3) Click link opens password reset form → (4) Enter new password with confirmation → (5) Success message and redirect to login. Use Firebase Auth password reset. + +--- + +#### P0-AUTH-03 + +- **Ticket:** Role-Based Redirect +- **Description:** Admin → `/dashboard/admin`, Client → `/dashboard/client`, Vendor → `/dashboard/vendor` +- **Details:** After successful login, check user role from Firebase Auth custom claims or Firestore user document. Redirect to appropriate dashboard. If user navigates to wrong dashboard, redirect to their correct one. Reference: `prototypes-src/web/src/auth/Login.tsx` lines 34-46. + +--- + +#### P0-AUTH-04 + +- **Ticket:** Session Persistence +- **Description:** Token persist, auto-refresh, logout +- **Details:** Use Firebase Auth persistence (local storage). Auto-refresh tokens before expiry. Implement logout button that clears session and redirects to `/login`. Handle token expiration gracefully (redirect to login with message). + +--- + +### MOBILE CLIENT + +--- + +#### P0-AUTH-05 + +- **Ticket:** Get Started Screen +- **Description:** Welcome screen with Sign In / Sign Up options +- **Details:** Initial app screen with KROW branding, hero image, tagline. Two buttons: "Sign In" (existing users) and "Sign Up" (new businesses). Reference: `prototypes-src/mobile/client/lib/screens/auth/client_get_started_screen.dart` + +--- + +#### P0-AUTH-06 + +- **Ticket:** Email/Password Login +- **Description:** Form with email + password +- **Details:** Sign-in screen with email field, password field (with show/hide toggle), "Sign In" button, "Forgot Password?" link. Validate email format. Show loading indicator during auth. Reference: `prototypes-src/mobile/client/lib/screens/auth/client_sign_in_screen.dart` + +--- + +#### P0-AUTH-07 + +- **Ticket:** Social Login (Apple/Google) +- **Description:** Apple and Google sign-in buttons +- **Details:** Add "Sign In with Apple" and "Sign In with Google" buttons below the email form with "or" divider. Use Firebase Auth social providers. Link to existing account if email matches. Reference: `client_sign_in_screen.dart` lines 274-286. + +--- + +#### P0-AUTH-08 + +- **Ticket:** Client Registration +- **Description:** Business signup form +- **Details:** Multi-step registration: (1) Email + password → (2) Business name, industry → (3) Contact info → (4) Email verification. Create user in Firebase Auth + business document in Firestore. Reference: `prototypes-src/mobile/client/lib/screens/auth/client_sign_up_screen.dart` + +--- + +### MOBILE STAFF + +--- + +#### P0-AUTH-09 + +- **Ticket:** Get Started Screen +- **Description:** Welcome screen "Work, Grow, Elevate" +- **Details:** Onboarding carousel with hero images. Tagline "Work, Grow, Elevate" with yellow highlight on "Elevate". Two buttons: "Sign Up" (primary yellow) and "Log In" (outline). Dark blue background (#1A2234). Reference: `prototypes-src/mobile/staff/lib/screens/auth/get_started_screen.dart` + +--- + +#### P0-AUTH-10 + +- **Ticket:** Phone Verification +- **Description:** US phone number input (+1) +- **Details:** Phone input screen with country code selector (default +1 US flag). 10-digit phone number field with numeric keyboard. Validate phone format before enabling "Send Code" button. Reference: `prototypes-src/mobile/staff/lib/screens/auth/phone_verification_screen.dart` lines 277-357. + +--- + +#### P0-AUTH-11 + +- **Ticket:** SMS OTP Code +- **Description:** Send and validate 6-digit code +- **Details:** After phone submit, show 6 individual digit input fields. Auto-advance cursor on input. 30-second countdown for resend. "Resend code" link after countdown. Auto-submit when all 6 digits entered. Use Firebase Phone Auth. Reference: `phone_verification_screen.dart` lines 360-485. + +--- + +#### P0-AUTH-12 + +- **Ticket:** Login vs Signup Mode +- **Description:** Same flow, different destination +- **Details:** Both "Sign Up" and "Log In" buttons go to phone verification. Pass `mode` query param (`signup` or `login`). After OTP verification: signup → `/profile-setup`, login → `/worker-home`. Reference: `phone_verification_screen.dart` lines 107-111. + +--- + +## P0.2 - Staff Management + +### MOBILE STAFF - Onboarding + +--- + +#### P0-STAFF-01 + +- **Ticket:** Profile Setup Wizard +- **Description:** Screen after phone verification +- **Details:** Multi-step onboarding wizard with progress indicator. Steps: Personal Info → Emergency Contact → Experience → Attire → Bank Account. Allow save & continue later. Track completion percentage. Reference: `prototypes-src/mobile/staff/lib/screens/auth/profile_setup_screen.dart` + +--- + +#### P0-STAFF-02 + +- **Ticket:** Personal Info Screen +- **Description:** Name, date of birth, address +- **Details:** Form fields: First name, Last name, Date of birth (date picker), Street address, City, State (dropdown), ZIP code. All fields required. Validate ZIP format. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/onboarding/personal_info_screen.dart` + +--- + +#### P0-STAFF-03 + +- **Ticket:** Emergency Contact +- **Description:** Emergency contact (name, relationship, phone) +- **Details:** Form fields: Contact name, Relationship (dropdown: Parent, Spouse, Sibling, Friend, Other), Phone number. Required for compliance. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/onboarding/emergency_contact_screen.dart` + +--- + +#### P0-STAFF-04 + +- **Ticket:** Experience Screen +- **Description:** Skills/experience selection +- **Details:** Multi-select list of skills/positions (Bartender, Server, Cook, Busser, Host, etc.). Years of experience per skill (optional). Certifications held (Food Handler, TIPS, etc.). Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/onboarding/experience_screen.dart` + +--- + +#### P0-STAFF-05 + +- **Ticket:** Attire Screen +- **Description:** Uniform/outfit photo +- **Details:** Photo upload for standard work attire. Camera or gallery option. Guidelines shown (black pants, white shirt, etc.). Photo stored in Firebase Storage. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/onboarding/attire_screen.dart` + +--- + +#### P0-STAFF-06 + +- **Ticket:** Bank Account Setup +- **Description:** Banking info for payment +- **Details:** Form fields: Bank name, Routing number (9 digits), Account number, Account type (Checking/Savings). Secure input with masking. Validate routing number format. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/finances/bank_account_screen.dart` + +--- + +### WEB - Admin Staff Management + +--- + +#### P0-STAFF-07 + +- **Ticket:** Staff List +- **Description:** List with search, filters (status, skills) +- **Details:** Table view with columns: Name, Photo, Status, Skills, Rating, Last Active. Search by name/email. Filters: Status (Active, Pending, Suspended), Skills (multi-select), Rating range. Pagination. Click row to view details. Reference: `prototypes-src/web/src/features/workforce/directory/StaffList.tsx` + +--- + +#### P0-STAFF-08 + +- **Ticket:** Staff Detail View +- **Description:** Full profile, documents, history +- **Details:** Profile header with photo, name, status badge. Tabs: Overview (contact, skills, rating), Documents (I-9, W-4, certs), Work History (past shifts), Compliance (verification status). Edit button for admins. + +--- + +#### P0-STAFF-09 + +- **Ticket:** Add Staff (Admin) +- **Description:** Staff creation form +- **Details:** Admin can manually add staff. Form: Email, Phone, First/Last name, Skills selection. Sends invite to staff to complete profile. Creates pending staff record. Reference: `prototypes-src/web/src/features/workforce/directory/AddStaff.tsx` + +--- + +#### P0-STAFF-10 + +- **Ticket:** Edit Staff +- **Description:** Modify staff info +- **Details:** Edit form for staff details. Admin can update: Contact info, Skills, Status, Notes. Cannot edit: Bank info (staff only), Documents (upload only). Audit log of changes. Reference: `prototypes-src/web/src/features/workforce/directory/EditStaff.tsx` + +--- + +#### P0-STAFF-11 + +- **Ticket:** Staff Approval Queue +- **Description:** Approve/Reject new staff +- **Details:** List of pending staff applications. Show: Name, signup date, documents status, completion %. Actions: Approve (activates account), Reject (with reason), Request more info. Bulk approve option. + +--- + +## P0.3 - Business & Hub Management + +### WEB + +--- + +#### P0-BIZ-01 + +- **Ticket:** Client List +- **Description:** Business list with search/filter +- **Details:** Table view with columns: Business name, Logo, Industry, Status, # Hubs, Last Order. Search by name. Filters: Status (Active, Pending, Suspended), Industry. Click row for details. Reference: `prototypes-src/web/src/features/business/clients/ClientList.tsx` + +--- + +#### P0-BIZ-02 + +- **Ticket:** Add Client +- **Description:** Business creation form +- **Details:** Form: Business name, Industry (dropdown), Primary contact (name, email, phone), Billing address, Logo upload. Creates business + first hub. Sends welcome email to contact. Reference: `prototypes-src/web/src/features/business/clients/AddClient.tsx` + +--- + +#### P0-BIZ-03 + +- **Ticket:** Edit Client +- **Description:** Modify business info +- **Details:** Edit form for business details. Sections: General Info, Billing Info, Primary Contact, Rate Overrides. Status toggle (Active/Suspended). Reference: `prototypes-src/web/src/features/business/clients/EditClient.tsx` + +--- + +#### P0-BIZ-04 + +- **Ticket:** Service Rates Config +- **Description:** Configure rates per position +- **Details:** Rate management screen. Default rates by position (Server: $18/hr, Bartender: $22/hr, etc.). Overtime multipliers (1.5x after 8hrs, 2x after 12hrs for CA). Holiday rates. Per-client rate overrides. Reference: `prototypes-src/web/src/features/business/rates/ServiceRates.tsx` + +--- + +### MOBILE CLIENT + +--- + +#### P0-BIZ-05 + +- **Ticket:** Client Hubs Screen +- **Description:** Location list and management +- **Details:** List of business locations (hubs). Each hub shows: Name, Address, # upcoming shifts. Add new hub button. Edit hub (name, address, contact). Deactivate hub option. Reference: `prototypes-src/mobile/client/lib/screens/client/client_hubs_screen.dart` + +--- + +#### P0-BIZ-06 + +- **Ticket:** Client Settings +- **Description:** Business account settings +- **Details:** Settings screen with sections: Account (business info), Notifications (push, email preferences), Users (invite team members), Billing (payment methods), Support (contact, FAQs). Reference: `prototypes-src/mobile/client/lib/screens/client/client_settings_screen.dart` + +--- + +## P0.4 - Event & Order Management + +### WEB + +--- + +#### P0-EVENT-01 + +- **Ticket:** Order List (Admin) +- **Description:** All orders with filters +- **Details:** Master list of all orders across clients. Columns: Order #, Client, Event Date, Status, Positions, Fill Rate. Filters: Status, Date range, Client. Color-coded status badges. Click for details. Reference: `prototypes-src/web/src/features/operations/orders/OrderList.tsx` + +--- + +#### P0-EVENT-02 + +- **Ticket:** Order List (Client) +- **Description:** Client's orders only +- **Details:** Filtered view showing only logged-in client's orders. Same columns as admin but without client column. "Create Order" button prominent. Reference: `prototypes-src/web/src/features/operations/orders/ClientOrderList.tsx` + +--- + +#### P0-EVENT-03 + +- **Ticket:** Order List (Vendor) +- **Description:** Orders assigned to vendor +- **Details:** Filtered view showing orders where vendor has assigned staff. Shows: Order #, Client, Date, Vendor's assigned positions, Revenue. Reference: `prototypes-src/web/src/features/operations/orders/VendorOrderList.tsx` + +--- + +#### P0-EVENT-04 + +- **Ticket:** Order Detail +- **Description:** Detailed view with shifts +- **Details:** Full order view. Header: Client, Date, Location, Status. Shifts section: List of shifts with times, positions needed, assigned staff. Actions: Edit, Cancel, Duplicate. Timeline of status changes. Reference: `prototypes-src/web/src/features/operations/orders/OrderDetail.tsx` + +--- + +#### P0-EVENT-05 + +- **Ticket:** Edit Order +- **Description:** Modify event/shifts +- **Details:** Edit form for existing order. Can modify: Event details, Add/remove shifts, Change position counts, Update times. Cannot edit after event starts. Notifications sent for changes. Reference: `prototypes-src/web/src/features/operations/orders/EditOrder.tsx` + +--- + +#### P0-EVENT-06 + +- **Ticket:** Schedule View +- **Description:** Event calendar +- **Details:** Calendar view of all orders. Month/Week/Day toggle. Color-coded by status (draft=gray, confirmed=green, active=blue). Click event to open detail modal. Drag to reschedule (with confirmation). Reference: `prototypes-src/web/src/features/operations/schedule/Schedule.tsx` + +--- + +### MOBILE CLIENT + +--- + +#### P0-EVENT-07 + +- **Ticket:** Create Order Screen +- **Description:** Order type selection +- **Details:** Order creation entry point. Shows order type cards: One-Time Event, Recurring (P1), RAPID (P1), Permanent (P1). For P0, only One-Time is active. Tap to start wizard. Reference: `prototypes-src/mobile/client/lib/screens/client/create_order_screen.dart` + +--- + +#### P0-EVENT-08 + +- **Ticket:** One-Time Order Flow +- **Description:** Wizard for one-time event creation +- **Details:** Multi-step wizard: (1) Event basics (name, date, time) → (2) Location (select hub or enter address) → (3) Positions (type, count, hours) → (4) Review & Submit. Progress indicator. Save draft option. Reference: `prototypes-src/mobile/client/lib/screens/client/create_order_pages/one_time_order_flow_page.dart` + +--- + +#### P0-EVENT-09 + +- **Ticket:** Client Shifts Screen +- **Description:** Client's shifts list +- **Details:** List view of all shifts across client's orders. Tabs: Upcoming, In Progress, Completed. Each shift shows: Date, Time, Position, Assigned staff (or "X of Y filled"). Tap for details. Reference: `prototypes-src/mobile/client/lib/screens/client/client_shifts_screen.dart` + +--- + +#### P0-EVENT-10 + +- **Ticket:** Client Coverage Screen +- **Description:** Staffing coverage view +- **Details:** Dashboard showing coverage metrics. Today's coverage %, Upcoming gaps, Positions to fill. Visual timeline of today's shifts. Quick actions: Fill gaps, Contact assigned staff. Reference: `prototypes-src/mobile/client/lib/screens/client/client_coverage_screen.dart` + +--- + +## P0.5 - Shift & Assignment + +### WEB + +--- + +#### P0-SHIFT-01 + +- **Ticket:** Staff Availability View +- **Description:** View staff availability +- **Details:** Calendar/grid showing staff availability. Rows = staff, Columns = days. Color coding: Available (green), Unavailable (red), Partially (yellow). Click staff to see details. Filter by skills. Reference: `prototypes-src/web/src/features/operations/availability/StaffAvailability.tsx` + +--- + +#### P0-SHIFT-02 + +- **Ticket:** Manual Assignment +- **Description:** Assign staff to shift +- **Details:** From order detail, click "Assign" on a shift. Modal shows available staff filtered by: Required skills, Availability, No conflicts. Select staff → Confirm. Staff receives notification. Update fill count. + +--- + +#### P0-SHIFT-03 + +- **Ticket:** Task Board +- **Description:** Task/assignment kanban +- **Details:** Kanban board with columns: Unassigned, Pending Acceptance, Confirmed, In Progress, Completed. Cards show shift info. Drag cards between columns (where allowed). Quick filters by date, client. Reference: `prototypes-src/web/src/features/operations/tasks/TaskBoard.tsx` + +--- + +### MOBILE STAFF + +--- + +#### P0-SHIFT-04 + +- **Ticket:** Shifts Screen (Tabs) +- **Description:** Available / My Shifts / History +- **Details:** Main shifts screen with 3 tabs. "Available": Open shifts matching staff skills. "My Shifts": Accepted upcoming shifts. "History": Completed past shifts. Pull to refresh. Reference: `prototypes-src/mobile/staff/lib/screens/worker/shifts_screen.dart` + +--- + +#### P0-SHIFT-05 + +- **Ticket:** Shift Details Screen +- **Description:** Details with location, hours, pay +- **Details:** Full shift information: Event name, Client, Date/Time, Location (with map link), Position, Hourly rate, Estimated pay, Dress code, Special instructions. Action buttons based on status. Reference: `prototypes-src/mobile/staff/lib/screens/worker/shift_details_screen.dart` + +--- + +#### P0-SHIFT-06 + +- **Ticket:** Accept/Decline Shift +- **Description:** Actions on proposed shift +- **Details:** When viewing available shift: "Accept" (primary button) and "Decline" (secondary). Accept → shift moves to My Shifts, notification to admin. Decline → optional reason, shift removed from available list. + +--- + +#### P0-SHIFT-07 + +- **Ticket:** Jobs Screen +- **Description:** Explore all available jobs +- **Details:** Discovery screen for available work. Filter by: Location/distance, Date range, Position type, Pay rate. Sort by: Nearest, Highest pay, Soonest. Map view toggle. Reference: `prototypes-src/mobile/staff/lib/screens/worker/jobs_screen.dart` + +--- + +#### P0-SHIFT-08 + +- **Ticket:** Availability Screen +- **Description:** Configure availability +- **Details:** Weekly recurring availability grid. Toggle days/times available. Block specific dates (vacation, etc.). Sync with phone calendar (optional). Changes reflected in job matching. Reference: `prototypes-src/mobile/staff/lib/screens/worker/availability_screen.dart` + +--- + +## P0.6 - Time & Attendance + +### MOBILE STAFF + +--- + +#### P0-TIME-01 + +- **Ticket:** Clock In Screen +- **Description:** Main clock-in screen +- **Details:** Dedicated tab in bottom nav. Shows today's shift (if any). Large clock-in button when shift is within window (e.g., 15 min before start). Current time display. Shift details summary. Reference: `prototypes-src/mobile/staff/lib/screens/worker/clock_in_screen.dart` + +--- + +#### P0-TIME-02 + +- **Ticket:** Swipe to Clock In +- **Description:** Swipe gesture to confirm +- **Details:** "Slide to Clock In" button. User must swipe right to confirm (prevents accidental taps). Haptic feedback on swipe. Visual progress indicator. Success animation on complete. Reference: Swipe gesture in `clock_in_screen.dart` + +--- + +#### P0-TIME-03 + +- **Ticket:** Swipe to Clock Out +- **Description:** Swipe gesture to end +- **Details:** After clocked in, button changes to "Slide to Clock Out". Same swipe mechanic. Shows elapsed time. Confirmation dialog if clocking out early. Summary of hours worked after clock out. + +--- + +#### P0-TIME-04 + +- **Ticket:** GPS Location Capture +- **Description:** Record position at clock +- **Details:** Capture device GPS coordinates at clock in and clock out. Store with time record. Request location permission if not granted. Show location on map in timesheet. Flag if outside expected venue radius. + +--- + +#### P0-TIME-05 + +- **Ticket:** Time Card Screen +- **Description:** Clock history +- **Details:** List of all clock in/out records. Shows: Date, Shift, Clock in time, Clock out time, Total hours, Status (Pending/Approved). Filter by date range. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/finances/time_card_screen.dart` + +--- + +### WEB + +--- + +#### P0-TIME-06 + +- **Ticket:** Timesheet Approval +- **Description:** Timesheet approval queue +- **Details:** List of pending timesheets awaiting approval. Shows: Staff name, Date, Shift, Hours, Clock times, GPS location. Actions: Approve, Dispute (with reason). Bulk approve option. Filter by client, date. + +--- + +### MOBILE CLIENT + +--- + +#### P0-TIME-07 + +- **Ticket:** Client Timesheets +- **Description:** View timesheets for approval +- **Details:** List of timesheets for client's shifts. Pending approval tab prominent. Shows: Staff, Date, Hours, Status. Tap to view details with GPS map. Approve/Dispute buttons. Reference: `prototypes-src/mobile/client/lib/screens/client/client_timesheets_screen.dart` + +--- + +## P0.7 - Financial + +### WEB + +--- + +#### P0-FIN-01 + +- **Ticket:** Invoice List +- **Description:** Invoice list with status +- **Details:** Table of all invoices. Columns: Invoice #, Client, Date, Amount, Status, Due Date. Filters: Status (Draft, Sent, Paid, Overdue), Date range, Client. Color-coded status. Total outstanding amount shown. Reference: `prototypes-src/web/src/features/finance/invoices/InvoiceList.tsx` + +--- + +#### P0-FIN-02 + +- **Ticket:** Invoice Detail +- **Description:** Detailed invoice view +- **Details:** Full invoice display. Header: Client info, Invoice #, Dates. Line items: Shifts with staff, hours, rates, totals. Subtotal, Taxes, Fees, Grand Total. Actions: Send, Download PDF, Mark Paid. Payment history. Reference: `prototypes-src/web/src/features/finance/invoices/InvoiceDetail.tsx` + +--- + +#### P0-FIN-03 + +- **Ticket:** Invoice Editor +- **Description:** Create/modify invoice +- **Details:** Invoice creation/edit form. Select client, Add line items (from completed shifts or manual), Set rates, Add adjustments, Apply taxes. Preview before sending. Save as draft option. Reference: `prototypes-src/web/src/features/finance/invoices/InvoiceEditor.tsx` + +--- + +### MOBILE STAFF + +--- + +#### P0-FIN-04 + +- **Ticket:** Payments Screen +- **Description:** Earnings dashboard +- **Details:** Main payments tab showing: Total earnings (all time), This pay period, Next payment date, Recent transactions. Quick action to Early Pay (P1). Graph of earnings trend. Reference: `prototypes-src/mobile/staff/lib/screens/worker/payments_screen.dart` + +--- + +#### P0-FIN-05 + +- **Ticket:** Earnings Screen +- **Description:** Earnings detail +- **Details:** Detailed earnings breakdown. Filter by period. List of all earnings: Date, Shift, Hours, Rate, Total. Tips (if any). Deductions. YTD summary. Export option. Reference: `prototypes-src/mobile/staff/lib/screens/worker/earnings_screen.dart` + +--- + +### MOBILE CLIENT + +--- + +#### P0-FIN-06 + +- **Ticket:** Client Billing Screen +- **Description:** Client billing view +- **Details:** Billing dashboard for client. Outstanding balance, Recent invoices, Payment due dates. Pay invoice button (if online payment enabled). Download invoices. Payment history. Reference: `prototypes-src/mobile/client/lib/screens/client/client_billing_screen.dart` + +--- + +## P0.8 - Compliance & Documents + +### MOBILE STAFF + +--- + +#### P0-COMP-01 + +- **Ticket:** Tax Forms Screen +- **Description:** Tax forms list +- **Details:** List of required tax forms. Shows: Form name, Status (Not Started/In Progress/Completed), Due date. Forms: I-9, W-4, State forms. Tap to open form. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/compliance/tax_forms_screen.dart` + +--- + +#### P0-COMP-02 + +- **Ticket:** Form I-9 +- **Description:** I-9 employment eligibility form +- **Details:** Digital I-9 form. Section 1: Employee info, Citizenship status, Signature. Document upload for List A or List B+C documents. Photo capture of documents. E-signature capture. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/compliance/taxforms/form_i9_screen.dart` + +--- + +#### P0-COMP-03 + +- **Ticket:** Form W-4 +- **Description:** W-4 tax withholding form +- **Details:** Digital W-4 form. Personal info, Filing status, Dependents, Other adjustments. Calculate withholding based on inputs. E-signature. Can update anytime. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/compliance/taxforms/form_w4_screen.dart` + +--- + +#### P0-COMP-04 + +- **Ticket:** Documents Screen +- **Description:** Upload/view documents +- **Details:** Document vault for staff. Categories: ID Documents, Tax Forms, Certifications, Other. Upload from camera or files. View/download uploaded docs. Delete option. Storage in Firebase Storage. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/compliance/documents_screen.dart` + +--- + +#### P0-COMP-05 + +- **Ticket:** Certificates Screen +- **Description:** Manage certifications +- **Details:** List of professional certifications. Add new: Type (Food Handler, TIPS, ServSafe, etc.), Issue date, Expiry date, Upload certificate image. Status: Valid, Expiring Soon, Expired. Renewal reminders. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/compliance/certificates_screen.dart` + +--- + +### WEB + +--- + +#### P0-COMP-06 + +- **Ticket:** Compliance Dashboard +- **Description:** Compliance view for all staff +- **Details:** Admin overview of staff compliance status. Metrics: % compliant, Missing documents, Expiring certs. Table: Staff name, I-9 status, W-4 status, Certs status. Filter by status. Export report. Reference: `prototypes-src/web/src/features/workforce/compliance/ComplianceDashboard.tsx` + +--- + +#### P0-COMP-07 + +- **Ticket:** Document Vault +- **Description:** Document storage +- **Details:** Admin view of all staff documents. Search by staff. View/download documents. Verify document authenticity. Flag issues. Audit trail of document access. Reference: `prototypes-src/web/src/features/workforce/documents/DocumentVault.tsx` + +--- + +## P0.9 - Dashboards & Navigation + +### WEB + +--- + +#### P0-DASH-01 + +- **Ticket:** Admin Dashboard +- **Description:** Widgets: stats, alerts, actions +- **Details:** Admin home screen. Widgets: Today's active shifts, Pending approvals (staff, timesheets), Revenue this month, Staff utilization. Alerts: Unfilled positions, Compliance issues. Quick actions: Create order, Add staff. Reference: `prototypes-src/web/src/features/overview/dashboard/AdminDashboard.tsx` + +--- + +#### P0-DASH-02 + +- **Ticket:** Client Dashboard +- **Description:** Widgets: coverage, orders, spend +- **Details:** Client home screen. Widgets: Today's coverage %, Upcoming orders, Spend this month, Top workers. Calendar preview. Quick actions: Create order, View invoices. Reference: `prototypes-src/web/src/features/overview/dashboard/ClientDashboard.tsx` + +--- + +#### P0-DASH-03 + +- **Ticket:** Vendor Dashboard +- **Description:** Widgets: orders, staff, revenue +- **Details:** Vendor home screen. Widgets: Active orders, Staff on shift, Revenue this month, Fill rate. Quick actions: View orders, Manage staff. Reference: `prototypes-src/web/src/features/overview/dashboard/VendorDashboard.tsx` + +--- + +### MOBILE CLIENT + +--- + +#### P0-DASH-04 + +- **Ticket:** Client Home Screen +- **Description:** Mobile main dashboard +- **Details:** Home tab content. Today's summary: Active shifts, Coverage %. Quick stats cards. Upcoming shifts preview. Quick action: Create Order (floating button). Pull to refresh. Reference: `prototypes-src/mobile/client/lib/screens/client/client_home_screen.dart` + +--- + +#### P0-DASH-05 + +- **Ticket:** Bottom Navigation +- **Description:** Coverage, Billing, Home, Shifts, Reports +- **Details:** 5-tab bottom navigation bar. Icons: Coverage (shield), Billing (dollar), Home (house, center), Shifts (calendar), Reports (chart). Home is center/prominent. Active tab highlighted. Reference: `prototypes-src/mobile/client/lib/widgets/scaffold_with_nav_bar.dart` + +--- + +### MOBILE STAFF + +--- + +#### P0-DASH-06 + +- **Ticket:** Worker Home Screen +- **Description:** Staff main dashboard +- **Details:** Home tab content. Welcome message with name. Today's shift (if any) with countdown. Earnings this week. Available shifts nearby. Quick stats. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_home_screen.dart` + +--- + +#### P0-DASH-07 + +- **Ticket:** Bottom Navigation +- **Description:** Shifts, Payments, Home, Clock-In, Profile +- **Details:** 5-tab bottom navigation. Icons: Shifts (calendar), Payments (dollar), Home (house, center), Clock-In (clock), Profile (person). Clock-In prominent when shift is active. Reference: `prototypes-src/mobile/staff/lib/widgets/scaffold_with_nav_bar.dart` + +--- + +#### P0-DASH-08 + +- **Ticket:** Worker Profile Screen +- **Description:** Settings and features menu +- **Details:** Profile tab content. Header: Photo, Name, Rating. Sections: Level Up (University, Leaderboard), Finances (Bank, Time Card), Compliance (Documents, Certs, Tax Forms), Support (Messages, FAQs, Privacy). Edit profile button. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile_screen.dart` + +--- + +# P1 - SHOULD HAVE (Sprint 5-6) + +--- + +## P1.1 - Smart Features + +### WEB + +--- + +#### P1-SMART-01 + +- **Ticket:** Smart Assignment Engine +- **Description:** Auto-match staff based on skills, availability, proximity +- **Details:** Algorithm that scores staff for a shift. Factors: Skill match (required vs has), Availability (calendar), Proximity (distance to venue), Rating (past performance), Fatigue (recent hours), Client preference (preferred/blocked lists). Returns ranked list. Reference: `prototypes-src/web/src/features/operations/orders/logic/SmartAssignmentEngine.ts` + +--- + +#### P1-SMART-02 + +- **Ticket:** Conflict Detection +- **Description:** Detect double-booking +- **Details:** Before assignment, check for conflicts: Same staff already assigned to overlapping shift, Travel time between shifts too short, Exceeds daily/weekly hour limits. Show warning with option to override. Reference: `prototypes-src/web/src/features/operations/orders/logic/ConflictDetection.ts` + +--- + +#### P1-SMART-03 + +- **Ticket:** Overtime Calculator +- **Description:** OT/DT calculation with California rules +- **Details:** Calculate overtime impact before assignment. Rules: Federal (>40hrs/week = 1.5x), California (>8hrs/day = 1.5x, >12hrs/day = 2x). Show cost impact: Regular vs OT earnings. Traffic light indicator (green/amber/red). Reference: `prototypes-src/web/src/features/operations/orders/logic/OvertimeCalculator.ts` + +--- + +#### P1-SMART-04 + +- **Ticket:** Savings Engine +- **Description:** Potential savings analysis +- **Details:** Analytics dashboard showing cost optimization opportunities. Suggestions: Reduce OT by redistributing shifts, Use higher-rated staff for premium clients, Identify underutilized staff. ROI calculations. Reference: `prototypes-src/web/src/features/overview/savings/SavingsEngine.tsx` + +--- + +## P1.2 - Advanced Orders + +### MOBILE CLIENT + +--- + +#### P1-ORDER-01 + +- **Ticket:** RAPID Order Flow +- **Description:** Quick simplified order creation +- **Details:** Streamlined order creation for urgent needs. Minimal fields: Position type, Count, Start time, Duration, Location (default to primary hub). One-tap submit. Higher priority in assignment queue. Reference: `prototypes-src/mobile/client/lib/screens/client/create_order_pages/rapid_order_flow_page.dart` + +--- + +#### P1-ORDER-02 + +- **Ticket:** Recurring Order Flow +- **Description:** Recurring orders (weekly, monthly) +- **Details:** Create orders that repeat. Set recurrence: Daily, Weekly (select days), Monthly (select dates). End date or occurrence count. Edit single occurrence or entire series. Skip dates option. Reference: `prototypes-src/mobile/client/lib/screens/client/create_order_pages/recurring_order_flow_page.dart` + +--- + +#### P1-ORDER-03 + +- **Ticket:** Permanent Order Flow +- **Description:** Permanent placements +- **Details:** Request permanent/ongoing staff placement. Different from event staffing. Specify: Position, Hours per week, Duration (ongoing or contract period). Different rate structure. Reference: `prototypes-src/mobile/client/lib/screens/client/create_order_pages/permanent_order_flow_page.dart` + +--- + +#### P1-ORDER-04 + +- **Ticket:** Verify Worker Attire +- **Description:** Staff attire verification +- **Details:** Client can verify staff attire at event start. Staff takes photo, client reviews. Approve or request change. Linked to dress code requirements in order. Reference: `prototypes-src/mobile/client/lib/screens/client/verify_worker_attire_screen.dart` + +--- + +## P1.3 - Early Pay + +### MOBILE STAFF + +--- + +#### P1-PAY-01 + +- **Ticket:** Early Pay Screen +- **Description:** Access earnings before payday +- **Details:** Earned Wage Access feature. Shows: Available early pay amount (completed shifts not yet paid), Fee disclosure (5%), How it works explanation. CTA button to request. Reference: `prototypes-src/mobile/staff/lib/screens/worker/early_pay_screen.dart` + +--- + +#### P1-PAY-02 + +- **Ticket:** Early Pay Request +- **Description:** Request early payment (5% fee) +- **Details:** Select amount to withdraw (up to available). Show fee calculation. Confirm bank account for deposit. Terms acceptance. Submit request. Processing status. + +--- + +#### P1-PAY-03 + +- **Ticket:** Instant Transfer +- **Description:** Transfer to bank account +- **Details:** After early pay request approved, initiate instant transfer. Integration with payment provider (Stripe, etc.). Show transfer status: Processing → Completed. Push notification on completion. + +--- + +#### P1-PAY-04 + +- **Ticket:** Benefits Screen +- **Description:** Available benefits view +- **Details:** Overview of staff benefits. Cards for: Early Pay, KROW University (P2), Referral Bonus, Insurance options (if available). Tap each for more info. Reference: `prototypes-src/mobile/staff/lib/screens/worker/benefits_screen.dart` + +--- + +## P1.4 - Reports + +### MOBILE CLIENT + +--- + +#### P1-REPORT-01 + +- **Ticket:** Client Reports Screen +- **Description:** Reports hub +- **Details:** Reports home screen. List of available reports with descriptions. Recent reports section. Generate new report button. Export options (PDF, CSV). Reference: `prototypes-src/mobile/client/lib/screens/client/client_reports_screen.dart` + +--- + +#### P1-REPORT-02 + +- **Ticket:** Daily Ops Report +- **Description:** Daily operations report +- **Details:** Summary of day's staffing operations. Sections: Shifts completed, Hours worked, Coverage %, Issues/incidents, Staff performance highlights. Date selector. Reference: `prototypes-src/mobile/client/lib/screens/client/reports/daily_ops_report_screen.dart` + +--- + +#### P1-REPORT-03 + +- **Ticket:** Spend Report +- **Description:** Spending analysis +- **Details:** Financial report on labor spend. Total spend by period, Breakdown by position/location, Comparison to previous periods, Spend trends chart. Budget vs actual (if budget set). Reference: `prototypes-src/mobile/client/lib/screens/client/reports/spend_report_screen.dart` + +--- + +#### P1-REPORT-04 + +- **Ticket:** Forecast Report +- **Description:** Needs forecast +- **Details:** Predictive report based on historical data. Projected staffing needs for upcoming period. Recommended order quantities. Budget forecast. Seasonal patterns. Reference: `prototypes-src/mobile/client/lib/screens/client/reports/forecast_report_screen.dart` + +--- + +#### P1-REPORT-05 + +- **Ticket:** Performance Report +- **Description:** Staff performance +- **Details:** Staff performance metrics. Top performers by rating, Attendance rates, On-time percentage. Compare staff performance. Identify training needs. Reference: `prototypes-src/mobile/client/lib/screens/client/reports/performance_report_screen.dart` + +--- + +#### P1-REPORT-06 + +- **Ticket:** No-Show Report +- **Description:** Absence report +- **Details:** Report on staff no-shows and late arrivals. List incidents with: Date, Staff, Shift, Reason (if provided). Impact analysis. Patterns identification. Reference: `prototypes-src/mobile/client/lib/screens/client/reports/no_show_report_screen.dart` + +--- + +#### P1-REPORT-07 + +- **Ticket:** Coverage Report +- **Description:** Coverage report +- **Details:** Staffing coverage analysis. Coverage % by day/shift, Unfilled positions history, Peak demand times, Recommendations for improving coverage. Reference: `prototypes-src/mobile/client/lib/screens/client/reports/coverage_report_screen.dart` + +--- + +### WEB + +--- + +#### P1-REPORT-08 + +- **Ticket:** Reports Dashboard +- **Description:** Admin reports center +- **Details:** Central reporting hub for admins. Quick stats widgets. Report categories: Operations, Financial, Workforce, Compliance. Generate custom reports. Schedule recurring reports. Reference: `prototypes-src/web/src/features/analytics/reports/ReportsDashboard.tsx` + +--- + +#### P1-REPORT-09 + +- **Ticket:** Activity Log +- **Description:** System activity log +- **Details:** Audit trail of all system actions. Columns: Timestamp, User, Action, Details. Filter by: User, Action type, Date range. Search. Export log. Reference: `prototypes-src/web/src/features/analytics/audit/ActivityLog.tsx` + +--- + +#### P1-REPORT-10 + +- **Ticket:** Vendor Performance +- **Description:** Vendor performance +- **Details:** Analytics on vendor performance. Metrics: Fill rate, Staff quality ratings, Response time, Reliability score. Compare vendors. Identify top/bottom performers. Reference: `prototypes-src/web/src/features/overview/performance/VendorPerformance.tsx` + +--- + +## P1.5 - Communication + +### WEB + +--- + +#### P1-COMM-01 + +- **Ticket:** Message Center +- **Description:** Internal messaging +- **Details:** In-app messaging system. Inbox view with conversations. Compose new message. Recipients: Individual staff, All staff on event, Client contacts. Message history. Read receipts. Reference: `prototypes-src/web/src/features/communication/messages/MessageCenter.tsx` + +--- + +#### P1-COMM-02 + +- **Ticket:** Tutorial List +- **Description:** Training videos/guides +- **Details:** Library of training content. Categories: Getting Started, Features, Best Practices. Video tutorials with playback. PDF guides. Mark as watched/read. Reference: `prototypes-src/web/src/features/communication/tutorials/TutorialList.tsx` + +--- + +#### P1-COMM-03 + +- **Ticket:** Support Center +- **Description:** Help center +- **Details:** In-app support resources. FAQs by category. Search knowledge base. Contact support form. Live chat (if enabled). Support ticket history. Reference: `prototypes-src/web/src/features/support/help/SupportCenter.tsx` + +--- + +### MOBILE STAFF + +--- + +#### P1-COMM-04 + +- **Ticket:** Messages Screen +- **Description:** Staff messaging +- **Details:** In-app messaging for staff. Inbox with conversations from admin/clients. Read/unread indicators. Reply functionality. Push notifications for new messages. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/support/messages_screen.dart` + +--- + +#### P1-COMM-05 + +- **Ticket:** FAQs Screen +- **Description:** Frequently asked questions +- **Details:** Searchable FAQ list. Categories: Account, Shifts, Payments, Compliance. Expandable Q&A format. Contact support link if not answered. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/support/faqs_screen.dart` + +--- + +#### P1-COMM-06 + +- **Ticket:** Privacy Screen +- **Description:** Privacy settings +- **Details:** Privacy and data settings. Options: Profile visibility, Location sharing preferences, Notification settings, Data download request, Account deletion request. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/support/privacy_screen.dart` + +--- + +## P1.6 - Teams & Workers + +### WEB + +--- + +#### P1-TEAM-01 + +- **Ticket:** Team List +- **Description:** Team list +- **Details:** View all teams. Team = group of staff for organization. Columns: Team name, # Members, Manager, Status. Create team button. Reference: `prototypes-src/web/src/features/workforce/teams/TeamList.tsx` + +--- + +#### P1-TEAM-02 + +- **Ticket:** Create Team +- **Description:** Create team +- **Details:** Form to create new team. Fields: Team name, Description, Manager (select from admins), Add members (multi-select staff). Reference: `prototypes-src/web/src/features/workforce/teams/CreateTeam.tsx` + +--- + +#### P1-TEAM-03 + +- **Ticket:** Team Detail +- **Description:** Team details +- **Details:** View team details. Header: Name, Manager, Description. Members list with roles. Add/remove members. Team performance metrics. Reference: `prototypes-src/web/src/features/workforce/teams/TeamDetail.tsx` + +--- + +#### P1-TEAM-04 + +- **Ticket:** Staff Onboarding Flow +- **Description:** Web onboarding wizard +- **Details:** Web-based staff onboarding for admin-assisted registration. Mirrors mobile onboarding steps. Admin can complete on behalf of staff (for in-person signup). Reference: `prototypes-src/web/src/features/workforce/onboarding/OnboardingFlow.tsx` + +--- + +### MOBILE CLIENT + +--- + +#### P1-TEAM-05 + +- **Ticket:** Client Workers Screen +- **Description:** View assigned staff +- **Details:** List of staff who have worked for this client. Shows: Name, Photo, Rating, # Shifts worked, Last worked date. Favorite/block options. Request specific staff for future orders. Reference: `prototypes-src/mobile/client/lib/screens/client/client_workers_screen.dart` + +--- + +## P1.7 - Marketplace + +### WEB + +--- + +#### P1-MKT-01 + +- **Ticket:** Vendor Marketplace +- **Description:** Discover vendors +- **Details:** Marketplace to find staffing vendors. Search/filter by: Location, Services offered, Ratings. Vendor profiles with: Description, Rates, Reviews. Contact/request quote. Reference: `prototypes-src/web/src/features/marketplace/discovery/VendorMarketplace.tsx` + +--- + +#### P1-MKT-02 + +- **Ticket:** Compare Rates +- **Description:** Compare rates +- **Details:** Compare pricing across vendors. Select vendors to compare. Side-by-side rate comparison by position. Factor in quality ratings. Best value recommendations. Reference: `prototypes-src/web/src/features/marketplace/rates/CompareRates.tsx` + +--- + +# P2 - NICE TO HAVE (Sprint 7+) + +--- + +## P2.1 - KROW University + +### MOBILE STAFF + +--- + +#### P2-UNI-01 + +- **Ticket:** KROW University Screen +- **Description:** Training hub +- **Details:** Main entry point for learning. Featured courses, Categories (Food Safety, Customer Service, etc.), Progress tracking, Earned certificates display. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/level_up/krow_university_screen.dart` + +--- + +#### P2-UNI-02 + +- **Ticket:** Trainings Screen +- **Description:** Available courses list +- **Details:** Browse all available training courses. Filter by: Category, Duration, Difficulty. Course cards show: Title, Duration, XP reward, Completion status. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/level_up/trainings_screen.dart` + +--- + +#### P2-UNI-03 + +- **Ticket:** Course Enrollment +- **Description:** Enroll in a course +- **Details:** View course details and enroll. Shows: Description, Lessons outline, Prerequisites, Time to complete, Certificate earned. Start course button. + +--- + +#### P2-UNI-04 + +- **Ticket:** Video Lessons +- **Description:** Video playback +- **Details:** Video lesson player. Progress tracking (resume where left off). Playback controls. Mark lesson complete. Next lesson auto-advance option. + +--- + +#### P2-UNI-05 + +- **Ticket:** Quizzes +- **Description:** Knowledge tests +- **Details:** Quiz component for courses. Multiple choice questions. Immediate feedback on answers. Pass/fail threshold. Retry option on fail. XP awarded on pass. + +--- + +#### P2-UNI-06 + +- **Ticket:** Certificates Earned +- **Description:** Earned badges/certs +- **Details:** Display earned certificates from completed courses. Shareable certificate images. Add to profile automatically. Employer-visible credentials. + +--- + +## P2.2 - Gamification + +### MOBILE STAFF + +--- + +#### P2-GAME-01 + +- **Ticket:** Leaderboard Screen +- **Description:** Staff ranking +- **Details:** Competitive leaderboard. Rankings by: Total XP, This week, This month. Show: Rank, Name, XP, Badge. User's own rank highlighted. Reference: `prototypes-src/mobile/staff/lib/screens/worker/worker_profile/level_up/leaderboard_screen.dart` + +--- + +#### P2-GAME-02 + +- **Ticket:** XP System +- **Description:** Experience points +- **Details:** XP earned for activities: Complete shift (+10), 5-star rating (+5), Complete course (+20), Referral (+50). XP visible throughout app. Level thresholds. + +--- + +#### P2-GAME-03 + +- **Ticket:** Badges +- **Description:** Achievement badges +- **Details:** Unlock badges for accomplishments: First Shift, 10 Shifts, 100 Shifts, Perfect Rating, Course Graduate, etc. Badge gallery in profile. Share badges. + +--- + +#### P2-GAME-04 + +- **Ticket:** Level Progression +- **Description:** Level progression +- **Details:** Staff levels based on XP: Rookie → Pro → Expert → Master. Level displayed on profile. Higher levels get priority for premium shifts. Level-up celebrations. + +--- + +#### P2-GAME-05 + +- **Ticket:** Referral Program +- **Description:** Referral program +- **Details:** Refer new staff and earn rewards. Generate referral code/link. Track referrals (signed up, completed first shift). Bonus XP + cash bonus on qualified referral. + +--- + +## P2.3 - Advanced Scheduling + +### WEB + +--- + +#### P2-SCHED-01 + +- **Ticket:** Drag-Drop Scheduler +- **Description:** Drag-and-drop planning +- **Details:** Visual scheduler with drag-drop. Drag staff onto shifts. Drag to reschedule. Visual conflict warnings. Capacity indicators. Reference: `prototypes-src/web/src/features/operations/orders/components/DragDropScheduler.tsx` + +--- + +#### P2-SCHED-02 + +- **Ticket:** Automation Engine +- **Description:** Automation rules +- **Details:** Create rules for automatic actions. Examples: "Auto-assign preferred staff", "Send reminder 24hrs before shift", "Flag if fill rate <80%". Rule builder interface. Reference: `prototypes-src/web/src/features/operations/orders/components/AutomationEngine.tsx` + +--- + +#### P2-SCHED-03 + +- **Ticket:** Double-Booking Override +- **Description:** Exception handling +- **Details:** When double-booking detected, allow admin override. Require reason. Documentation trail. Manager approval workflow if needed. Reference: `prototypes-src/web/src/features/operations/orders/components/DoubleBookingOverrideDialog.tsx` + +--- + +#### P2-SCHED-04 + +- **Ticket:** Cancellation Fee Modal +- **Description:** Cancellation fee management +- **Details:** When order cancelled, calculate applicable fees. Show: Cancellation policy, Fee amount, Reason options. Confirm cancellation with fee acknowledgment. Reference: `prototypes-src/web/src/features/operations/orders/components/CancellationFeeModal.tsx` + +--- + +## P2.4 - Advanced Finance + +### WEB + +--- + +#### P2-FIN-01 + +- **Ticket:** Auto Invoice Generator +- **Description:** Auto invoice generation +- **Details:** Automatically generate invoices on schedule. Configure: Trigger (weekly, after event), Recipients, Format. Review queue before sending. Reference: `prototypes-src/web/src/features/finance/invoices/components/AutoInvoiceGenerator.tsx` + +--- + +#### P2-FIN-02 + +- **Ticket:** Invoice Export Panel +- **Description:** Multi-format export +- **Details:** Export invoices in multiple formats. Options: PDF, CSV, QuickBooks, Xero integration. Batch export. Email directly from export. Reference: `prototypes-src/web/src/features/finance/invoices/components/InvoiceExportPanel.tsx` + +--- + +#### P2-FIN-03 + +- **Ticket:** Invoice Quick Actions +- **Description:** Quick actions +- **Details:** Quick action buttons on invoice list. Actions: Send reminder, Mark paid, Download, Void. Bulk actions on selected invoices. Reference: `prototypes-src/web/src/features/finance/invoices/components/InvoiceQuickActions.tsx` + +--- + +## P2.5 - Advanced Analytics + +### WEB + +--- + +#### P2-ANAL-01 + +- **Ticket:** Staffing Cost Report +- **Description:** Staffing cost analysis +- **Details:** Deep dive into labor costs. Breakdown by: Position, Location, Time period, Regular vs OT. Cost trends. Benchmark comparisons. Reference: `prototypes-src/web/src/features/analytics/reports/reportTypes/StaffingCostReport.tsx` + +--- + +#### P2-ANAL-02 + +- **Ticket:** Staff Performance Report +- **Description:** Individual performance +- **Details:** Individual staff performance metrics. Ratings over time, Attendance record, Skills utilization, Client feedback. Performance trend analysis. Reference: `prototypes-src/web/src/features/analytics/reports/reportTypes/StaffPerformanceReport.tsx` + +--- + +#### P2-ANAL-03 + +- **Ticket:** Operational Efficiency +- **Description:** Operational efficiency +- **Details:** Efficiency metrics dashboard. Fill rate, Time to fill, Utilization rate, Cost per hire. Benchmark against targets. Improvement recommendations. Reference: `prototypes-src/web/src/features/analytics/reports/reportTypes/OperationalEfficiencyReport.tsx` + +--- + +#### P2-ANAL-04 + +- **Ticket:** Report Template Library +- **Description:** Template library +- **Details:** Pre-built report templates. Categories: Financial, Operations, HR, Compliance. Customize templates. Save custom templates. Reference: `prototypes-src/web/src/features/analytics/reports/reportTypes/ReportTemplateLibrary.tsx` + +--- + +#### P2-ANAL-05 + +- **Ticket:** Scheduled Reports +- **Description:** Scheduled reports +- **Details:** Schedule reports to run automatically. Configure: Report type, Frequency, Recipients, Format. View scheduled reports list. Pause/resume. Reference: `prototypes-src/web/src/features/analytics/reports/reportTypes/ScheduledReports.tsx` + +--- + +#### P2-ANAL-06 + +- **Ticket:** Report PDF Preview +- **Description:** PDF preview +- **Details:** Preview report as PDF before export. WYSIWYG preview. Page layout options. Branding customization. Reference: `prototypes-src/web/src/features/analytics/reports/components/ReportPDFPreview.tsx` + +--- + +#### P2-ANAL-07 + +- **Ticket:** Report Insights Banner +- **Description:** Automatic insights +- **Details:** AI-generated insights banner on reports. Highlights: Key findings, Anomalies, Trends, Recommendations. Dismissable. Reference: `prototypes-src/web/src/features/analytics/reports/components/ReportInsightsBanner.tsx` + +--- + +## P2.6 - Advanced Client Features + +### WEB + +--- + +#### P2-CLI-01 + +- **Ticket:** Client Loyalty Card +- **Description:** Loyalty program +- **Details:** Client loyalty/rewards program. Points for orders, Tier levels, Perks (priority booking, discounts). Dashboard widget showing status. Reference: `prototypes-src/web/src/features/overview/dashboard/components/ClientLoyaltyCard.tsx` + +--- + +#### P2-CLI-02 + +- **Ticket:** Client Vendor Preferences +- **Description:** Vendor preferences +- **Details:** Client can set vendor preferences. Preferred vendors list, Blocked vendors, Default vendor for positions. Used in smart assignment. Reference: `prototypes-src/web/src/features/marketplace/components/ClientVendorPreferences.tsx` + +--- + +#### P2-CLI-03 + +- **Ticket:** Dashboard Customizer +- **Description:** Dashboard customization +- **Details:** Customize dashboard layout. Add/remove widgets, Rearrange order, Resize widgets. Save custom layout. Reset to default option. Reference: `prototypes-src/web/src/features/overview/dashboard/components/DashboardCustomizer.tsx` + +--- + +# Summary + +| Priority | Tickets | Goal | +|----------|---------|------| +| **P0** | 52 | End-to-end MVP | +| **P1** | 38 | Differentiating features | +| **P2** | 28 | Full prototype vision | +| **TOTAL** | **118** | | + +--- + +**Document Created:** January 2026 +**Source:** Analysis of `internal/launchpad/prototypes-src/` diff --git a/internal/launchpad/allowed-hashes.json b/internal/launchpad/allowed-hashes.json index a3f1512d..e4d974b5 100644 --- a/internal/launchpad/allowed-hashes.json +++ b/internal/launchpad/allowed-hashes.json @@ -1,5 +1,8 @@ [ "1b2e22bdec8f6493bf71ee535b6db6b4b5cd2d373f0ffb25524e229f3b5b7f5f", "e075ff357ef35be2d55b0e383d59c5256980c492ada7ab84c84b2bb5ac26a73f", - "994b31c1aef3d59fe59bc3b8e1dec860a6fb3c73cbf41bdf45028e2c1ecbcf7a" + "8205f6c72d8e97358fe7638b02503c17b4bfd4a397c143ea27151f3f106720d4", + "994b31c1aef3d59fe59bc3b8e1dec860a6fb3c73cbf41bdf45028e2c1ecbcf7a", + "99144d7e873dd0ab56c185d5f42fee2048b1be73513cf36dc1df3eae1e524489", + "088aa009feb3ac78d37242c9abc339aacf42665dccdb626415590148855d0623" ] \ No newline at end of file diff --git a/internal/launchpad/assets/diagrams/diagrams-config.json b/internal/launchpad/assets/diagrams/diagrams-config.json index 4a8ea5c1..640cc3ce 100644 --- a/internal/launchpad/assets/diagrams/diagrams-config.json +++ b/internal/launchpad/assets/diagrams/diagrams-config.json @@ -42,10 +42,22 @@ "icon": "bi-geo-alt" }, { - "path": "assets/diagrams/roadmap/roadmap.mermaid", - "title": "Project Roadmap", + "path": "assets/diagrams/roadmap/0-roadmap-overview.mermaid", + "title": "Roadmap Overview", "type": "mermaid", - "icon": "bi-calendar-check" + "icon": "bi-geo-alt" + }, + { + "path": "assets/diagrams/roadmap/1-roadmap-p0-mvp.mermaid", + "title": "Roadmap P0 MVP", + "type": "mermaid", + "icon": "bi-geo-alt" + }, + { + "path": "assets/diagrams/roadmap/2-roadmap-p0-complete.mermaid", + "title": "Roadmap P0 Complete Workflow", + "type": "mermaid", + "icon": "bi-geo-alt" }, { "path": "assets/diagrams/legacy/staff-mobile-application/overview.mermaid", diff --git a/internal/launchpad/assets/diagrams/roadmap/0-roadmap-overview.mermaid b/internal/launchpad/assets/diagrams/roadmap/0-roadmap-overview.mermaid new file mode 100644 index 00000000..510249e8 --- /dev/null +++ b/internal/launchpad/assets/diagrams/roadmap/0-roadmap-overview.mermaid @@ -0,0 +1,25 @@ +flowchart LR + subgraph P0["P0: MVP Core (Sprint 3-4)"] + A[Auth] --> B[Staff Onboarding] + B --> C[Events/Orders] + C --> D[Shifts/Assignment] + D --> E[Clock In/Out] + E --> F[Timesheets] + F --> G[Invoices] + G --> H[Earnings View] + end + + subgraph P1["P1: Enhanced (Sprint 5-6)"] + I[Smart Assignment] + J[Early Pay] + K[RAPID Orders] + L[Reports] + end + + subgraph P2["P2: Full Vision (Sprint 7+)"] + M[KROW University] + N[Gamification] + O[Advanced Analytics] + end + + P0 --> P1 --> P2 \ No newline at end of file diff --git a/internal/launchpad/assets/diagrams/roadmap/1-roadmap-p0-mvp.mermaid b/internal/launchpad/assets/diagrams/roadmap/1-roadmap-p0-mvp.mermaid new file mode 100644 index 00000000..f75657a2 --- /dev/null +++ b/internal/launchpad/assets/diagrams/roadmap/1-roadmap-p0-mvp.mermaid @@ -0,0 +1,32 @@ +flowchart TB + subgraph WEB["WEB (Admin/Client)"] + W1[Email/Password Login] + W2[Role-based Dashboard] + W3[Manage Staff] + W4[Create Events/Orders] + W5[Assign Staff to Shifts] + W6[Approve Timesheets] + W7[Generate Invoices] + W8[View Basic Reports] + end + + subgraph MC["MOBILE CLIENT"] + MC1[Email + Social Login] + MC2[Coverage Dashboard] + MC3[Create Orders] + MC4[View Active Shifts] + MC5[Manage Hubs] + MC6[View Billing] + MC7[Basic Reports] + end + + subgraph MS["MOBILE STAFF"] + MS1[Phone + SMS OTP Login] + MS2[Complete Onboarding] + MS3[View Available Shifts] + MS4[Accept/Decline Shifts] + MS5[Swipe Clock In/Out] + MS6[View Earnings] + MS7[I-9/W-4 Forms] + MS8[Bank Account Setup] + end \ No newline at end of file diff --git a/internal/launchpad/assets/diagrams/roadmap/2-roadmap-p0-complete.mermaid b/internal/launchpad/assets/diagrams/roadmap/2-roadmap-p0-complete.mermaid new file mode 100644 index 00000000..a00fa0ca --- /dev/null +++ b/internal/launchpad/assets/diagrams/roadmap/2-roadmap-p0-complete.mermaid @@ -0,0 +1,30 @@ +sequenceDiagram + participant Staff as Mobile Staff + participant Client as Mobile Client + participant Admin as Web Admin + + Note over Staff,Admin: 1. SETUP + Staff->>Staff: Phone + OTP Login + Staff->>Staff: Complete Onboarding + Staff->>Staff: Submit I-9, W-4 + Admin->>Admin: Approve Staff + + Note over Staff,Admin: 2. ORDER + Client->>Client: Email Login + Client->>Client: Create Order (One-Time) + Admin->>Admin: View Order + + Note over Staff,Admin: 3. ASSIGNMENT + Admin->>Admin: Assign Staff to Shift + Staff->>Staff: View Shift Offer + Staff->>Staff: Accept Shift + + Note over Staff,Admin: 4. WORK + Staff->>Staff: Swipe Clock In (GPS) + Staff->>Staff: Swipe Clock Out + + Note over Staff,Admin: 5. PAYMENT + Client->>Client: Approve Timesheet + Admin->>Admin: Generate Invoice + Client->>Client: View Invoice + Staff->>Staff: View Earnings \ No newline at end of file diff --git a/internal/launchpad/assets/diagrams/roadmap/roadmap.mermaid b/internal/launchpad/assets/diagrams/roadmap/roadmap.mermaid deleted file mode 100644 index 3d243cec..00000000 --- a/internal/launchpad/assets/diagrams/roadmap/roadmap.mermaid +++ /dev/null @@ -1,17 +0,0 @@ -timeline - title KROW Platform - Accelerated Migration & Enhancement Roadmap (2 Months to Production) - - section Phase 1: Foundation & New Workflow Adoption - Week 1-2 : Initialize Firebase projects (Dev, Staging) and configure hosting
Set up CI/CD pipelines for automated deployments
Adopt new development and deployment workflows - Week 3-4 : Configure internal launchpad for easy access to resources
Team training on new tools and workflows
Documentation setup - Key Milestones : Dev & Staging environments fully operational
Team ready to work with new infrastructure - - section Phase 2: Functional Parity & New Experience - Week 5-6 : Migrate core backend logic (Cloud Functions, Firestore/Cloud SQL)
Reconnect Web and Mobile apps to new APIs
Database migration and validation - Week 7-8 : Integrate new UI/UX design across all applications
Implement new core business workflows
Feature parity testing - Key Milestones : All existing features are ISO-functional on the new platform
New design and core workflows fully integrated and tested - - section Phase 3: Preparation & Production Launch - Week 9-10 : Complete end-to-end testing and performance optimization
Security audits and penetration testing
Load testing and optimization - Week 11-12 : Set up robust monitoring and alerting system for production
Final production deployment
Legacy infrastructure decommissioning plan - Key Milestones : KROW is live in production with new design and workflows
Legacy infrastructure ready for decommissioning \ No newline at end of file diff --git a/internal/launchpad/iap-users.txt b/internal/launchpad/iap-users.txt index a9e897ef..e8f041d5 100644 --- a/internal/launchpad/iap-users.txt +++ b/internal/launchpad/iap-users.txt @@ -8,7 +8,13 @@ user:admin@krowwithus.com # External users - Oloodi employees user:boris@oloodi.com +user:jose.salazar@oloodi.com user:achintha.isuru@oloodi.com + # External users - Legendary employees + +# External users - gmail.com +user:fazulilahi@gmail.com +user:zouantchaw74@gmail.com \ No newline at end of file diff --git a/scripts/sync-prototypes.sh b/scripts/sync-prototypes.sh index de759202..5d4f3d73 100755 --- a/scripts/sync-prototypes.sh +++ b/scripts/sync-prototypes.sh @@ -14,6 +14,11 @@ MOBILE_STAFF_SOURCE="$POC_REPO_PATH/prototypes/mobile/staff/staff_mobile_applica MOBILE_STAFF_DEST="internal/launchpad/prototypes/mobile/staff" MOBILE_STAFF_HREF="/prototypes/mobile/staff/" +# Source code destinations (for AI/Claude context) +WEB_SRC_DEST="internal/launchpad/prototypes-src/web" +MOBILE_CLIENT_SRC_DEST="internal/launchpad/prototypes-src/mobile/client" +MOBILE_STAFF_SRC_DEST="internal/launchpad/prototypes-src/mobile/staff" + # Colors GREEN='\033[0;32m' BLUE='\033[0;34m' @@ -77,6 +82,16 @@ if [ -d "$WEB_POC_SOURCE" ]; then cp -R "$WEB_POC_SOURCE/dist/"* "$WEB_DEST/" echo -e "${GREEN}✅ Web Dashboard synced successfully.${NC}" + + # Copy source code for AI context + echo " -> Copying source code for AI context..." + rm -rf "$WEB_SRC_DEST" + mkdir -p "$WEB_SRC_DEST" + cp -R "$WEB_POC_SOURCE/src" "$WEB_SRC_DEST/" + [ -f "$WEB_POC_SOURCE/package.json" ] && cp "$WEB_POC_SOURCE/package.json" "$WEB_SRC_DEST/" + [ -f "$WEB_POC_SOURCE/tsconfig.json" ] && cp "$WEB_POC_SOURCE/tsconfig.json" "$WEB_SRC_DEST/" + [ -f "$WEB_POC_SOURCE/vite.config.ts" ] && cp "$WEB_POC_SOURCE/vite.config.ts" "$WEB_SRC_DEST/" + echo -e "${GREEN}✅ Web source code copied.${NC}" else echo -e "${RED}⚠️ Warning: Web POC source directory not found at $WEB_POC_SOURCE${NC}" fi @@ -123,6 +138,14 @@ if [ -d "$MOBILE_CLIENT_SOURCE" ]; then cp -R "$MOBILE_CLIENT_SOURCE/build/web/"* "$MOBILE_CLIENT_DEST/" echo -e "${GREEN}✅ Mobile Client synced successfully.${NC}" + + # Copy source code for AI context + echo " -> Copying source code for AI context..." + rm -rf "$MOBILE_CLIENT_SRC_DEST" + mkdir -p "$MOBILE_CLIENT_SRC_DEST" + cp -R "$MOBILE_CLIENT_SOURCE/lib" "$MOBILE_CLIENT_SRC_DEST/" + [ -f "$MOBILE_CLIENT_SOURCE/pubspec.yaml" ] && cp "$MOBILE_CLIENT_SOURCE/pubspec.yaml" "$MOBILE_CLIENT_SRC_DEST/" + echo -e "${GREEN}✅ Mobile Client source code copied.${NC}" else echo -e "${RED}⚠️ Warning: Mobile Client source not found at $MOBILE_CLIENT_SOURCE${NC}" fi @@ -146,6 +169,14 @@ if [ -d "$MOBILE_STAFF_SOURCE" ]; then cp -R "$MOBILE_STAFF_SOURCE/build/web/"* "$MOBILE_STAFF_DEST/" echo -e "${GREEN}✅ Mobile Staff synced successfully.${NC}" + + # Copy source code for AI context + echo " -> Copying source code for AI context..." + rm -rf "$MOBILE_STAFF_SRC_DEST" + mkdir -p "$MOBILE_STAFF_SRC_DEST" + cp -R "$MOBILE_STAFF_SOURCE/lib" "$MOBILE_STAFF_SRC_DEST/" + [ -f "$MOBILE_STAFF_SOURCE/pubspec.yaml" ] && cp "$MOBILE_STAFF_SOURCE/pubspec.yaml" "$MOBILE_STAFF_SRC_DEST/" + echo -e "${GREEN}✅ Mobile Staff source code copied.${NC}" else echo -e "${RED}⚠️ Warning: Mobile Staff source not found at $MOBILE_STAFF_SOURCE${NC}" fi From 7d61997373a27142d0c745378958e65103e8f60d Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Mon, 12 Jan 2026 17:26:43 -0500 Subject: [PATCH 3/7] doc: doc 05 updated with some changes --- docs/05-project-onboarding-master.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/05-project-onboarding-master.md b/docs/05-project-onboarding-master.md index 0486a87b..7f6091ae 100644 --- a/docs/05-project-onboarding-master.md +++ b/docs/05-project-onboarding-master.md @@ -171,7 +171,7 @@ graph TB ├── apps/ │ ├── web-dashboard/ # Vite + React │ ├── mobile-client/ # Flutter (business app) - │ └── mobile-staff/ # Flutter (worker app) + │ └── mobile-worker/ # Flutter (worker app) ├── backend/ │ ├── dataconnect/ # Firebase Data Connect schemas │ └── functions/ # Cloud Functions @@ -310,7 +310,7 @@ sequenceDiagram participant Client as Client App participant API as Backend API participant Admin as Admin - participant Staff as Staff App + participant Staff as Worker App Note over Client,API: 1. Event Creation Client->>API: Create Event with Shifts & Positions @@ -318,10 +318,12 @@ sequenceDiagram Client->>API: Publish Event API-->>Client: Event Published - Note over Admin,API: 2. Staff Assignment - Admin->>API: Assign Staff to Shift - API-->>Admin: Assignment Confirmed - API->>Staff: Notification: New Shift + opt 2. Staff Assignment (Optional) + Note over Admin,API: Optional Staff Assignment + Admin->>API: Assign Staff to Shift + API-->>Admin: Assignment Confirmed + API->>Staff: Notification: New Shift + end Note over Staff,API: 3. Shift Acceptance Staff->>API: Accept Shift @@ -337,6 +339,7 @@ sequenceDiagram Client->>API: Rate Staff API->>API: Generate Invoice Client->>API: Approve Invoice + ``` #### Workflow 2: Staff Onboarding @@ -370,6 +373,12 @@ sequenceDiagram └── Status: completed_profile → verified ``` +But there is an ambiguity in the workflow. In the legacy application, worker verification happens at the beginning, and all workers are fully verified before they can access the application. In the new version, however, workers are allowed to access the application without being fully verified. This creates ambiguity in the following areas: +- Definition of worker verification in the new system + - Does verification mean the worker has fully completed their profile, or can a worker be considered verified with an incomplete profile? +- Visibility of shifts for unverified workers + - Should unverified workers be able to view the shifts page? + #### Workflow 3: Payroll Calculation ``` @@ -695,7 +704,7 @@ These **must be ported** from legacy: --- -#### 4.7.2 Mobile Staff App (Flutter) +#### 4.7.2 Mobile Worker App (Flutter) **Location:** `internal/launchpad/prototypes-src/mobile/staff/` @@ -797,9 +806,9 @@ These **must be ported** from legacy: |-----------|----------|------| | Web Prototype Source | `internal/launchpad/prototypes-src/web/` | React + TypeScript | | Mobile Client Prototype | `internal/launchpad/prototypes-src/mobile/client/` | Flutter + Dart | -| Mobile Staff Prototype | `internal/launchpad/prototypes-src/mobile/staff/` | Flutter + Dart | +| Mobile Worker Prototype | `internal/launchpad/prototypes-src/mobile/worker/` | Flutter + Dart | | Legacy Client Mobile | `_legacy/apps/krow_client_context.md` | Flutter (context doc) | -| Legacy Staff Mobile | `_legacy/apps/krow_staff_context.md` | Flutter (context doc) | +| Legacy Worker (Legacy Staff) Mobile | `_legacy/apps/krow_staff_context.md` | Flutter (context doc) | | Legacy Backend | `_legacy/apps/php_backend_context.md` | PHP/Laravel | | New Backend | `backend/dataconnect/` | Firebase Data Connect | From ade07eea727e9f5f02fc6c60e2ee4332fb1209c9 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Mon, 12 Jan 2026 17:31:31 -0500 Subject: [PATCH 4/7] chore: update links to name to be worker --- internal/launchpad/assets/data/links.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launchpad/assets/data/links.json b/internal/launchpad/assets/data/links.json index d64094ea..08bc2bea 100644 --- a/internal/launchpad/assets/data/links.json +++ b/internal/launchpad/assets/data/links.json @@ -39,7 +39,7 @@ "textHoverClass": "group-hover:text-blue-700" }, { - "title": "Mobile Staff MVP", + "title": "Mobile Worker MVP", "url": "/prototypes/mobile/staff/index.html", "badge": "Concept", "badgeColorClass": "bg-green-500", From ef31dbe4147ae0958d66a563c0b2e72ac7e27e4b Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Mon, 12 Jan 2026 21:01:31 -0500 Subject: [PATCH 5/7] docs: update the route of the mobile apps --- docs/05-project-onboarding-master.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/05-project-onboarding-master.md b/docs/05-project-onboarding-master.md index 7f6091ae..723e5444 100644 --- a/docs/05-project-onboarding-master.md +++ b/docs/05-project-onboarding-master.md @@ -170,8 +170,10 @@ graph TB krow-workforce-web/ ├── apps/ │ ├── web-dashboard/ # Vite + React - │ ├── mobile-client/ # Flutter (business app) - │ └── mobile-worker/ # Flutter (worker app) + │ ├── mobile/ + | | ├── apps/ + | | │ ├── client/ # Flutter (business app) + | | │ └── worker/ # Flutter (worker app) ├── backend/ │ ├── dataconnect/ # Firebase Data Connect schemas │ └── functions/ # Cloud Functions @@ -667,7 +669,7 @@ These **must be ported** from legacy: #### 4.7.1 Mobile Client App (Flutter) -**Location:** `internal/launchpad/prototypes-src/mobile/client/` +**Location:** `internal/launchpad/prototypes-src/mobile/apps/client/` **Routes (22 screens):** @@ -706,7 +708,7 @@ These **must be ported** from legacy: #### 4.7.2 Mobile Worker App (Flutter) -**Location:** `internal/launchpad/prototypes-src/mobile/staff/` +**Location:** `internal/launchpad/prototypes-src/mobile/apps/worker/` **Routes (35+ screens):** From 0ce416c81b996880a806f6252b703bf933b46ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Salazar?= <73718835+joshrs23@users.noreply.github.com> Date: Tue, 13 Jan 2026 09:36:31 -0500 Subject: [PATCH 6/7] diagrams --- .../dataconnect/docs/client_app_diagram.mmd | 74 +++++ .../dataconnect-schemas-mutations-queries.mmd | 124 ++++++++ backend/dataconnect/docs/dataconnect.mmd | 271 ++++++++++++++++++ .../dataconnect/docs/staff_app_diagram.mmd | 121 ++++++++ 4 files changed, 590 insertions(+) create mode 100644 backend/dataconnect/docs/client_app_diagram.mmd create mode 100644 backend/dataconnect/docs/dataconnect-schemas-mutations-queries.mmd create mode 100644 backend/dataconnect/docs/dataconnect.mmd create mode 100644 backend/dataconnect/docs/staff_app_diagram.mmd diff --git a/backend/dataconnect/docs/client_app_diagram.mmd b/backend/dataconnect/docs/client_app_diagram.mmd new file mode 100644 index 00000000..38d4868c --- /dev/null +++ b/backend/dataconnect/docs/client_app_diagram.mmd @@ -0,0 +1,74 @@ +flowchart LR + +subgraph C1["Login"] + S_client_sign_in["client_sign_in_screen.dart"] + S_client_sign_in --> S_client_sign_in_Q["Queries
* user - getUserById
* business - getBusinessesByUserId"] + S_client_sign_in --> S_client_sign_in_F["Firebase
* user - auth"] +end + +subgraph C2["Create account"] + S_client_sign_up["client_sign_up_screen.dart"] + S_client_sign_up --> S_client_sign_up_Q["Queries
* business - getBusinessesByUserId"] + S_client_sign_up --> S_client_sign_up_M["Mutations
* user - createUser
* business - createBusiness"] +end + +subgraph C3["Edit account"] + S_edit_account_na["manual_or_unknown_screen.dart"] + S_edit_account_na --> S_edit_account_na_M["Mutations
* business - updateBusiness"] +end + +subgraph C4["Profile"] + S_client_settings["client_settings_screen.dart"] + S_client_settings --> S_client_settings_Q["Queries
* user - getUserById
* business - getBusinessesByUserId"] +end + +subgraph C5["Hubs"] + S_client_hubs["client_hubs_screen.dart"] + S_client_hubs --> S_client_hubs_Q["Queries
* hub - getHubsByOwnerId"] + S_client_hubs --> S_client_hubs_M["Mutations
* hub - createHub
* hub - updateHub
* hub - deleteHub"] +end + +subgraph C6["Orders"] + S_client_shifts["client_shifts_screen.dart"] + S_client_shifts --> S_client_shifts_Q["Queries
* order - getOrdersByOwnerId"] +end + +subgraph C7["RAPID Order"] + S_rapid_order["rapid_order_flow_page.dart"] + S_rapid_order --> S_rapid_order_M["Mutations
* order - createOrder"] +end + +subgraph C8["One-time Order"] + S_one_time["one_time_order_flow_page.dart"] + S_one_time --> S_one_time_Q["Queries
* role - listRolesByOwnerId"] + S_one_time --> S_one_time_M["Mutations
* position - createPosition
* order - createOrder"] +end + +subgraph C9["Permanent Placement"] + S_permanent["permanent_order_flow_page.dart"] + S_permanent --> S_permanent_Q["Queries
* role - listRolesByOwnerId"] + S_permanent --> S_permanent_M["Mutations
* position - createPosition
* order - createOrder"] +end + +subgraph C10["Recurring Order"] + S_recurring["recurring_order_flow_page.dart"] + S_recurring --> S_recurring_Q["Queries
* role - listRolesByOwnerId"] + S_recurring --> S_recurring_M["Mutations
* position - createPosition
* order - createOrder"] +end + +subgraph C11["Billing"] + S_billing["client_billing_screen.dart"] + S_billing --> S_billing_Q["Queries
* account - getAccountsByOwnerId
* invoice - getInvoicesByOwnerId
* recentPayment - filterRecentPayments"] + S_billing --> S_billing_M["Mutations
* account - createAccount
* account - updateAccount
* account - deleteAccount"] +end + +subgraph C12["Coverage"] + S_coverage["coverage_dashboard.dart"] + S_coverage --> S_coverage_Q["Queries
* order - getOrdersByOwnerId
* shift - filterShifts
* application - getApplicationsByShiftId"] +end + +subgraph C13["Home"] + S_client_home["client_home_screen.dart"] + S_client_home --> S_client_home_Q["Queries
* order - getOrdersByOwnerId
* shift - filterShifts
* application - getApplicationsByShiftId
* recentPayment - filterRecentPayments"] + S_client_home --> S_client_home_M["Mutations
* order - createOrder"] +end diff --git a/backend/dataconnect/docs/dataconnect-schemas-mutations-queries.mmd b/backend/dataconnect/docs/dataconnect-schemas-mutations-queries.mmd new file mode 100644 index 00000000..f241b3a5 --- /dev/null +++ b/backend/dataconnect/docs/dataconnect-schemas-mutations-queries.mmd @@ -0,0 +1,124 @@ +flowchart LR + subgraph "Profile & Onboarding" + User --> User_Q["Queries
- listUsers
- getUserById"] + User --> User_M["Mutations
- createUser
- updateUser
- deleteUser"] + Staff --> Staff_Q["Queries
- listStaff
- getStaffById
- getStaffByUserId"] + Staff --> Staff_M["Mutations
- createStaff
- updateStaff
- deleteStaff"] + Contact --> Contact_Q["Queries
- listContacts
- getContactById
- listContactsByStaffId"] + Contact --> Contact_M["Mutations
- createContact
- updateContact
- deleteContact"] + AttireOption --> AttireOption_Q["Queries
- listAttireOptions
- getAttireOptionById"] + AttireOption --> AttireOption_M["Mutations
- createAttireOption
- updateAttireOption
- deleteAttireOption"] + end + + subgraph "Compliance" + Document --> Document_Q["Queries
- listDocuments
- getDocumentById
- listDocumentsByStaffId"] + Document --> Document_M["Mutations
- createDocument
- updateDocument
- deleteDocument"] + Certificate --> Certificate_Q["Queries
- listCertificates
- getCertificateById
- listCertificatesByStaffId"] + Certificate --> Certificate_M["Mutations
- CreateCertificate
- UpdateCertificate
- DeleteCertificate"] + TaxForm --> TaxForm_Q["Queries
- listTaxForms
- getTaxFormById
- getTaxFormsByStaffId
- filterTaxForms"] + TaxForm --> TaxForm_M["Mutations
- createTaxForm
- updateTaxForm
- deleteTaxForm"] + RequiredDoc --> RequiredDoc_Q["Queries
- listRequiredDocs
- getRequiredDocById
- listRequiredDocsByUserId"] + RequiredDoc --> RequiredDoc_M["Mutations
- createRequiredDoc
- updateRequiredDoc
- deleteRequiredDoc"] + end + + subgraph "Finances" + Account --> Account_Q["Queries
- listAccounts
- getAccountById
- listAccountsByOwnerId"] + Account --> Account_M["Mutations
- createAccount
- updateAccount
- deleteAccount"] + TimeSheet --> TimeSheet_Q["Queries
- listTimeSheets
- getTimeSheetById
- listTimeSheetsByStaffId"] + TimeSheet --> TimeSheet_M["Mutations
- createTimeSheet
- updateTimeSheet
- deleteTimeSheet"] + RecentPayment --> RecentPayment_Q["Queries
- listRecentPayments
- getRecentPaymentById
- listRecentPaymentsByUserId"] + RecentPayment --> RecentPayment_M["Mutations
- createRecentPayment
- updateRecentPayment
- deleteRecentPayment"] + Invoice --> Invoice_Q["Queries
- listInvoices
- getInvoiceById"] + Invoice --> Invoice_M["Mutations
- createInvoice
- updateInvoice
- deleteInvoice"] + InvoiceTemplate --> InvoiceTemplate_Q["Queries
- listInvoiceTemplates
- getInvoiceTemplateById"] + InvoiceTemplate --> InvoiceTemplate_M["Mutations
- createInvoiceTemplate
- updateInvoiceTemplate
- deleteInvoiceTemplate"] + VendorRate --> VendorRate_Q["Queries
- listVendorRates
- getVendorRateById"] + VendorRate --> VendorRate_M["Mutations
- createVendorRate
- updateVendorRate
- deleteVendorRate"] + CustomRateCard --> CustomRateCard_Q["Queries
- listCustomRateCards
- getCustomRateCardById"] + CustomRateCard --> CustomRateCard_M["Mutations
- createCustomRateCard
- updateCustomRateCard
- deleteCustomRateCard"] + end + + subgraph "Shifts & Work" + Shift --> Shift_Q["Queries
- listShifts
- getShiftById
- filterShifts"] + Shift --> Shift_M["Mutations
- CreateShift
- UpdateShift
- DeleteShift"] + Application --> Application_Q["Queries
- getApplicationById
- listApplicationsByStaffId"] + Application --> Application_M["Mutations
- createApplication
- updateApplication
- deleteApplication"] + StaffShift --> StaffShift_Q["Queries
- getMyShifts
- getStaffShiftById
- getStaffShiftsByShiftId"] + StaffShift --> StaffShift_M["Mutations
- createStaffShift
- updateStaffShift
- deleteStaffShift"] + StaffAvailability --> StaffAvailability_Q["Queries
- listStaffAvailabilities
- getStaffAvailabilityById
- getStaffAvailabilityByStaffId"] + StaffAvailability --> StaffAvailability_M["Mutations
- createStaffAvailability
- updateStaffAvailability
- deleteStaffAvailability"] + Assignment --> Assignment_Q["Queries
- listAssignments
- getAssignmentById
- listAssignmentsByStaffId"] + Assignment --> Assignment_M["Mutations
- CreateAssignment
- UpdateAssignment
- DeleteAssignment"] + Order --> Order_Q["Queries
- listOrders
- getOrderById"] + Order --> Order_M["Mutations
- createOrder
- updateOrder
- deleteOrder"] + Position --> Position_Q["Queries
- listPositions
- getPositionById
- listPositionsByOrderId"] + Position --> Position_M["Mutations
- createPosition
- updatePosition
- deletePosition"] + Category --> Category_Q["Queries
- listCategories
- getCategoryById"] + Category --> Category_M["Mutations
- createCategory
- updateCategory
- deleteCategory"] + Role --> Role_Q["Queries
- listRoles
- getRoleById"] + Role --> Role_M["Mutations
- createRole
- updateRole
- deleteRole"] + RoleCategory --> RoleCategory_Q["Queries
- listRoleCategories
- getRoleCategoryById"] + RoleCategory --> RoleCategory_M["Mutations
- createRoleCategory
- updateRoleCategory
- deleteRoleCategory"] + Schedule --> Schedule_Q["Queries
- listSchedules
- getScheduleById
- getScheduleByPositionId"] + Schedule --> Schedule_M["Mutations
- createSchedule
- updateSchedule
- deleteSchedule"] + Workforce --> Workforce_Q["Queries"] + Workforce --> Workforce_M["Mutations"] + end + + subgraph "Learning" + Course --> Course_Q["Queries
- listCourses
- getCourseById
- filterCourses"] + Course --> Course_M["Mutations
- createCourse
- updateCourse
- deleteCourse"] + Level --> Level_Q["Queries
- listLevels
- getLevelById"] + Level --> Level_M["Mutations
- createLevel
- updateLevel
- deleteLevel"] + StaffCourse --> StaffCourse_Q["Queries
- getStaffCourseById
- listStaffCoursesByStaffId
- listStaffCoursesByCourseId
- getStaffCourseByStaffAndCourse"] + StaffCourse --> StaffCourse_M["Mutations
- createStaffCourse
- updateStaffCourse
- deleteStaffCourse"] + end + + subgraph "Benefits" + BenefitsData --> BenefitsData_Q["Queries
- listBenefitsData
- getBenefitsDataById
- getBenefitsDataByStaffId"] + BenefitsData --> BenefitsData_M["Mutations
- createBenefitsData
- updateBenefitsData
- deleteBenefitsData"] + end + + subgraph "Business & Vendors" + Business --> Business_Q["Queries
- listBusinesses
- getBusinessById
- getBusinessesByUserId"] + Business --> Business_M["Mutations
- createBusiness
- updateBusiness
- deleteBusiness"] + Vendor --> Vendor_Q["Queries
- listVendors
- getVendorById"] + Vendor --> Vendor_M["Mutations
- createVendor
- updateVendor
- deleteVendor"] + Hub --> Hub_Q["Queries
- listHubs
- getHubById"] + Hub --> Hub_M["Mutations
- createHub
- updateHub
- deleteHub"] + end + + subgraph "Teams" + Team --> Team_Q["Queries
- listTeams
- getTeamById"] + Team --> Team_M["Mutations
- createTeam
- updateTeam
- deleteTeam"] + TeamMember --> TeamMember_Q["Queries
- listTeamMembers
- getTeamMemberById
- listTeamMembersByTeamId"] + TeamMember --> TeamMember_M["Mutations
- createTeamMember
- updateTeamMember
- deleteTeamMember"] + MemberTask --> MemberTask_Q["Queries
- getMyTasks
- getMemberTaskById
- getMemberTasksByTaskId"] + MemberTask --> MemberTask_M["Mutations
- createMemberTask
- updateMemberTask
- deleteMemberTask"] + TeamHub --> TeamHub_Q["Queries
- listTeamHubs
- getTeamHubById
- listTeamHubsByTeamId"] + TeamHub --> TeamHub_M["Mutations
- createTeamHub
- updateTeamHub
- deleteTeamHub"] + Task --> Task_Q["Queries
- listTasks
- getTaskById"] + Task --> Task_M["Mutations
- createTask
- updateTask
- deleteTask"] + TaskComment --> TaskComment_Q["Queries
- listTaskComments
- getTaskCommentById
- listTaskCommentsByTaskId"] + TaskComment --> TaskComment_M["Mutations
- createTaskComment
- updateTaskComment
- deleteTaskComment"] + end + + subgraph "Communication" + Conversation --> Conversation_Q["Queries
- listConversations
- getConversationById
- getConversationsByUserId"] + Conversation --> Conversation_M["Mutations
- createConversation
- updateConversation
- deleteConversation"] + Message --> Message_Q["Queries
- listMessages
- getMessageById
- listMessagesByConversationId"] + Message --> Message_M["Mutations
- createMessage
- updateMessage
- deleteMessage"] + end + + subgraph "Others" + ActivityLog --> ActivityLog_Q["Queries
- listActivityLogs
- getActivityLogById
- listActivityLogsByUserId"] + ActivityLog --> ActivityLog_M["Mutations
- createActivityLog
- updateActivityLog
- deleteActivityLog"] + ClientFeedback --> ClientFeedback_Q["Queries
- listClientFeedbacks
- getClientFeedbackById"] + ClientFeedback --> ClientFeedback_M["Mutations
- createClientFeedback
- updateClientFeedback
- deleteClientFeedback"] + FaqData --> FaqData_Q["Queries
- listFaqDatas
- getFaqDataById"] + FaqData --> FaqData_M["Mutations
- createFaqData
- updateFaqData
- deleteFaqData"] + end + + subgraph "Reporting" + Reports --> Reports_Q["Queries
- getCoverageReport
- getNoShowReport
- getSpendReport
- getForecastReport
- getPerformanceReport
- getDailyOpsReport"] + end diff --git a/backend/dataconnect/docs/dataconnect.mmd b/backend/dataconnect/docs/dataconnect.mmd new file mode 100644 index 00000000..b67267f0 --- /dev/null +++ b/backend/dataconnect/docs/dataconnect.mmd @@ -0,0 +1,271 @@ +erDiagram + User { + String id PK + String email + String fullName + Timestamp createdDate + } + Business { + UUID id PK + String userId FK + String businessName + Timestamp createdAt + } + Vendor { + UUID id PK + String userId FK + String companyName + Timestamp createdAt + } + Staff { + UUID id PK + String userId FK + UUID hubId FK + UUID ownerId FK + String fullName + Timestamp createdAt + } + Shift { + UUID id PK + UUID orderId FK + UUID ownerId FK + ShiftStatus status + Timestamp createdAt + } + Order { + UUID id PK + UUID ownerId FK + UUID hubId FK + OrderStatus status + Timestamp createdAt + } + Position { + UUID id PK + UUID orderId FK + UUID roleId FK + UUID ownerId FK + Timestamp createdAt + } + Task { + UUID id PK + UUID ownerId FK + TaskStatus status + Timestamp createdAt + } + Team { + UUID id PK + String ownerId FK + String teamName + Timestamp createdAt + } + TeamMember { + UUID id PK + UUID teamId FK + UUID hubId FK + String memberName + Timestamp createdAt + } + Hub { + UUID id PK + UUID ownerId FK + String name + Timestamp createdAt + } + Account { + UUID id PK + UUID ownerId FK "polymorphic ownerId" + String bank + Timestamp createdAt + } + Document { + UUID id PK + UUID staffId FK + DocumentStatus status + Timestamp createdAt + } + Certificate { + UUID id PK + UUID staffId FK + CertificateStatus status + Timestamp createdAt + } + Contact { + UUID id PK + UUID staffId FK + String name + Timestamp createdAt + } + BenefitsData { + UUID id PK + UUID staffId FK + String title + Timestamp createdAt + } + Course { + UUID id PK + String title + Timestamp createdAt + } + TaxForm { + UUID id PK + UUID staffId FK + TaxFormStatus status + Timestamp createdAt + } + TimeSheet { + UUID id PK + UUID staffId FK + UUID shiftId FK + TimeSheetStatus status + Timestamp createdAt + } + Invoice { + UUID id PK + UUID ownerId FK + InvoiceStatus status + Timestamp createdAt + } + Assignment { + UUID id PK + UUID staffId FK + UUID ownerId FK + AssignmentStatus status + Timestamp createdAt + } + Conversation { + UUID id PK + String subject + Timestamp createdAt + } + Message { + UUID id PK + UUID conversationId FK + String senderId + Timestamp createdAt + } + Role { + UUID id PK + UUID ownerId FK + String name + Timestamp createdAt + } + RecentPayment { + UUID id PK + UUID payedUserId FK + UUID ownerId FK + RecentPaymentStatus status + Timestamp createdAt + } + RequiredDoc { + UUID id PK + UUID ownerId FK + ReqDocumentStatus status + Timestamp createdAt + } + VendorRate { + UUID id PK + UUID vendorId FK + String roleName + Timestamp createdAt + } + Schedule { + UUID id PK + UUID positionId FK + Timestamp createdAt + } + TaskComment { + UUID id PK + UUID taskId FK + String authorName + Timestamp createdAt + } + TeamHub { + UUID id PK + UUID teamId FK + String hubName + Timestamp createdAt + } + Application { + UUID id PK + UUID shiftId FK + UUID staffId FK + ApplicationStatus status + Timestamp createdAt + } + StaffShift { + UUID id PK + UUID staffId FK + UUID shiftId FK + Timestamp createdAt + } + MemberTask { + UUID id PK + UUID teamMemberId FK + UUID taskId FK + Timestamp createdAt + } + StaffCourse { + UUID id PK + UUID staffId FK + UUID courseId FK + Timestamp createdAt + } + + User ||--|{ Staff : "has profile" + User ||--|{ Vendor : "can be" + User ||--|{ Business : "can be" + User ||--o{ ActivityLog : "generates" + + Business ||--o{ "Order" : "creates" + Business ||--o{ Invoice : "receives" + Business ||--o{ Task : "owns" + Business ||--o{ Hub : "owns" + Business ||--o{ Role : "defines" + Business ||--o{ Shift : "posts" + Business ||--o{ Staff : "employs" + Business ||--o{ Account : "owns" + + Vendor ||--o{ VendorRate : "defines" + Vendor ||--o{ Task : "owns" + Vendor ||--o{ Hub : "owns" + Vendor ||--o{ Role : "defines" + Vendor ||--o{ Shift : "posts" + Vendor ||--o{ Staff : "employs" + Vendor ||--o{ Account : "owns" + + Staff ||--o{ Document : "has" + Staff ||--o{ Certificate : "holds" + Staff ||--o{ Contact : "has emergency" + Staff ||--o{ BenefitsData : "accrues" + Staff ||--o{ TaxForm : "submits" + Staff ||--o{ TimeSheet : "fills" + Staff ||--o{ Assignment : "receives" + Staff ||--o{ Account : "owns" + Staff ||--o{ RecentPayment : "is paid to" + Staff ||--o{ RequiredDoc : "owns" + Staff ||--o{ Application : "submits" + Hub ||--o{ Staff : "is based at" + + Shift ||--o{ TimeSheet : "generates" + Shift ||--o{ Application : "receives" + + "Order" ||--o{ Shift : "contains" + "Order" ||--o{ Position : "requires" + + Task ||--o{ TaskComment : "has" + + Team ||--o{ TeamMember : "has" + Team ||--o{ TeamHub : "operates in" + + Conversation ||--o{ Message : "contains" + + Position ||--o{ Schedule : "has" + Role ||--o{ Position : "is for" + + %% Join Tables + Staff ||--|{ StaffShift : "works" + Shift ||--|{ StaffShift : "is worked by" + Staff ||--|{ StaffCourse : "enrolls in" + Course ||--|{ StaffCourse : "is taken by" + TeamMember ||--|{ MemberTask : "assigned to" + Task ||--|{ MemberTask : "is assigned to" diff --git a/backend/dataconnect/docs/staff_app_diagram.mmd b/backend/dataconnect/docs/staff_app_diagram.mmd new file mode 100644 index 00000000..d251a18e --- /dev/null +++ b/backend/dataconnect/docs/staff_app_diagram.mmd @@ -0,0 +1,121 @@ +flowchart LR + +subgraph L1["login/create user"] + S_auth_phone["phone_verification_screen.dart"] + S_auth_phone --> S_auth_phone_Q["Queries
* user - getUserById
* staff - getStaffByUserId"] + S_auth_phone --> S_auth_phone_M["Mutations
* user - createUser"] + S_auth_phone --> S_auth_phone_F["Firebase
* user - auth"] +end + +subgraph L2["Profile"] + S_worker_profile["worker_profile_screen.dart"] + S_worker_profile --> S_worker_profile_Q["Queries
* user - getUserById
* staff - getStaffByUserId"] +end + +subgraph L3["Personal info"] + S_personal_info["personal_info_screen.dart"] + S_personal_info --> S_personal_info_Q["Queries
* staff - getStaffByUserId"] + S_personal_info --> S_personal_info_M["Mutations
* staff - UpdateStaff"] +end + +subgraph L4["Emergency Contact"] + S_emergency["emergency_contact_screen.dart"] + S_emergency --> S_emergency_Q["Queries
* contact - getContactsByStaffId"] + S_emergency --> S_emergency_M["Mutations
* contact - updateContact
* contact - createContact
* contact - deleteContact"] +end + +subgraph L5["Experience & skills"] + S_experience["experience_screen.dart"] + S_experience --> S_experience_Q["Queries
* staff - getStaffByUserId"] + S_experience --> S_experience_M["Mutations
* staff - UpdateStaff"] +end + +subgraph L6["Attire"] + S_attire["attire_screen.dart"] + S_attire --> S_attire_Q["Queries
* attireOption - listAttireOptions
* staff - getStaffByUserId"] + S_attire --> S_attire_M["Mutations
* staff - UpdateStaff"] +end + +subgraph L7["Documents"] + S_documents["documents_screen.dart"] + S_documents --> S_documents_Q["Queries
* document - getDocumentsByStaffId"] + S_documents --> S_documents_M["Mutations
* document - updateDocument"] +end + +subgraph L8["Certificates"] + S_certificates["certificates_screen.dart"] + S_certificates --> S_certificates_Q["Queries
* certificate - listCertificatesByStaffId"] + S_certificates --> S_certificates_M["Mutations
* certificate - UpdateCertificate
* certificate - CreateCertificate
* certificate - DeleteCertificate"] +end + +subgraph L9["Tax Documents"] + S_tax_forms["tax_forms_screen.dart"] + S_tax_forms --> S_tax_forms_Q["Queries
* taxForm - getTaxFormsBystaffId"] + S_tax_forms --> S_tax_forms_M["Mutations
* taxForm - createTaxForm
* taxForm - updateTaxForm"] +end + +subgraph L10["KROW University"] + S_uni["krow_university_screen.dart"] + S_uni --> S_uni_Q["Queries
* course - listCourses
* staffCourse - listStaffCoursesByStaffId
* staff - getStaffByUserId
* level - listLevels
* certificate - listCertificatesByStaffId"] +end + +subgraph L11["Trainings"] + S_trainings["trainings_screen.dart"] + S_trainings --> S_trainings_Q["Queries
* course - listCourses
* staffCourse - listStaffCoursesByStaffId"] +end + +subgraph L12["Leaderboard"] + S_leaderboard["leaderboard_screen.dart"] + S_leaderboard --> S_leaderboard_Q["Queries
* staffCourse - missing"] +end + +subgraph L13["Bank Account"] + S_bank["bank_account_screen.dart"] + S_bank --> S_bank_Q["Queries
* account - getAccountsByOwnerId"] + S_bank --> S_bank_M["Mutations
* account - createAccount
* account - updateAccount
* account - deleteAccount"] +end + +subgraph L14["Earnings/Payments"] + S_payments["payments_screen.dart"] + S_payments --> S_payments_Q["Queries
* recentPayment - getRecentPaymentsByPayedUserId"] +end + +subgraph L15["Timecard"] + S_timecard["time_card_screen.dart"] + S_timecard --> S_timecard_Q["Queries
* timeSheet - getTimeSheetsByStaffId"] +end + +subgraph L16["Clock in"] + S_clockin["clock_in_screen.dart"] + S_clockin --> S_clockin_Q["Queries
* application - getApplicationsByStaffId"] + S_clockin --> S_clockin_M["Mutations
* application - createApplication
* application - updateApplicationStatus"] +end + +subgraph L17["Shifts"] + S_shifts["shifts_screen.dart"] + S_shifts --> S_shifts_Q["Queries
* application - getApplicationsByStaffId
* shift - filterShifts
* timeSheet - getTimeSheetsByStaffId"] + S_shifts --> S_shifts_M["Mutations
* application - updateApplicationStatus
* shift - CreateShift
* application - createApplication
* staffShift - createStaffShift"] +end + +subgraph L18["My availability"] + S_availability["availability_screen.dart"] + S_availability --> S_availability_Q["Queries
* staffAvailability - getStaffAvailabilityByStaffId"] + S_availability --> S_availability_M["Mutations
* staffAvailability - updateStaffAvailability
* staffAvailability - createStaffAvailability
* staffAvailability - deleteStaffAvailability"] +end + +subgraph L19["Your Benefits Overview"] + S_benefits["benefits_screen.dart"] + S_benefits --> S_benefits_Q["Queries
* benefitsData - getBenefitsDataByStaffId"] + S_benefits --> S_benefits_M["Mutations
* benefitsData - updateBenefitsData"] +end + +subgraph L20["Home"] + S_home["worker_home_screen.dart"] + S_home --> S_home_Q["Queries
* application - getApplicationsByStaffId
* shift - filterShifts
* benefitsData - getBenefitsDataByStaffId"] +end + +subgraph L21["Shift detail"] + S_shift_detail["shift_details_screen.dart"] + S_shift_detail --> S_shift_detail_Q["Queries
* application - getApplicationsByStaffId"] + S_shift_detail --> S_shift_detail_M["Mutations
* application - updateApplicationStatus"] +end From e78ddb8a49dd0039a561e533e5182535dc361fa2 Mon Sep 17 00:00:00 2001 From: bwnyasse <5323628+bwnyasse@users.noreply.github.com> Date: Thu, 15 Jan 2026 09:24:04 -0500 Subject: [PATCH 7/7] feat: update allowed hashes and IAP users This commit adds a new hash to the allowed-hashes.json file. This commit adds a new user to the iap-users.txt file. The new hash is for a new version of the launchpad. The new user is a new IAP user. --- internal/launchpad/allowed-hashes.json | 1 + internal/launchpad/iap-users.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/launchpad/allowed-hashes.json b/internal/launchpad/allowed-hashes.json index e4d974b5..55e478d5 100644 --- a/internal/launchpad/allowed-hashes.json +++ b/internal/launchpad/allowed-hashes.json @@ -3,6 +3,7 @@ "e075ff357ef35be2d55b0e383d59c5256980c492ada7ab84c84b2bb5ac26a73f", "8205f6c72d8e97358fe7638b02503c17b4bfd4a397c143ea27151f3f106720d4", "994b31c1aef3d59fe59bc3b8e1dec860a6fb3c73cbf41bdf45028e2c1ecbcf7a", + "69d44565e675b319114ac2fa7f9708d102a37a75ab3d7628b305c37d185dd2ed", "99144d7e873dd0ab56c185d5f42fee2048b1be73513cf36dc1df3eae1e524489", "088aa009feb3ac78d37242c9abc339aacf42665dccdb626415590148855d0623" ] \ No newline at end of file diff --git a/internal/launchpad/iap-users.txt b/internal/launchpad/iap-users.txt index e8f041d5..7cad216a 100644 --- a/internal/launchpad/iap-users.txt +++ b/internal/launchpad/iap-users.txt @@ -13,7 +13,7 @@ user:achintha.isuru@oloodi.com # External users - Legendary employees - +user:iortega@legendaryeventstaff.com # External users - gmail.com user:fazulilahi@gmail.com