# PHASE 2: BUSINESS LOGIC ANALYSIS
**Date:** February 3, 2026  
**Focus:** User Journeys, Current Features, Gap Analysis

## 🎯 CURRENT MARKETPLACE FUNCTIONALITY

### **✅ COMPLETE FEATURE SET (Already Built)**

#### **1. User Management**
- **Dual roles**: Contractor (hirer) & Worker (tradie)
- **Profile verification**: ABN, insurance, white card
- **Rating system**: Mutual ratings after job completion
- **Gamification**: Points for activity, referrals

#### **2. Job Marketplace**
- **Job posting**: Free for contractors
- **Job browsing**: Filter by category, location, rate
- **Applications**: Workers apply with cover letter, proposed rate
- **Matching**: Contractor reviews applications, accepts/rejects

#### **3. Contract & Payment System**
- **Contract creation**: Automatic when application accepted
- **Escrow payments**: Contractor deposits full amount + fees
- **Platform fee**: **7%** (currently percentage-based)
- **GST handling**: Automatic for GST-registered workers
- **Payment release**: After mutual ratings or 14-day auto-release

#### **4. Compliance & Safety**
- **WHS requirements**: Category-based risk levels
- **Insurance verification**: Public liability insurance checks
- **Australian compliance**: GST, ABN, tax withholding
- **Dispute resolution**: Formal process for conflicts

#### **5. Communication & Notifications**
- **In-app messaging**: Between contractor/worker
- **Email notifications**: Application updates, payments
- **Real-time updates**: Socket.io for live status

## 🔄 CURRENT USER JOURNEYS

### **CONTRACTOR (Hirer) Journey**
```
1. Register → Verify business (ABN optional)
2. Post job → Free, no upfront cost
3. Review applications → From multiple workers
4. Accept worker → Creates contract automatically
5. Pay to escrow → Full job value + 7% fee + GST (if applicable)
6. Work completion → Worker completes job
7. Release payment → After ratings or auto-release (14 days)
```

### **WORKER (Tradie) Journey**
```
1. Register → Verify trade qualifications
2. Browse jobs → Filter by trade, location, rate
3. Apply → Submit cover letter, proposed rate
4. Get accepted → Contract created automatically
5. Complete work → On-site as per contract
6. Get paid → After contractor releases escrow (minus 7% fee)
7. Rate contractor → Mutual rating system
```

## 💰 CURRENT MONETIZATION MODEL

### **7% Platform Fee (Percentage-Based)**
```
Example: $1,000 job
- Platform fee: $70 (7%)
- Stripe fee: $29 (2.9%)
- Worker receives: $901 (90.1%)
- GST: Additional 10% if worker GST-registered
```

### **Payment Flow**
1. **Contractor deposits**: Job value + 7% + GST (if applicable)
2. **Funds held**: In Stripe escrow
3. **Work completed**: Worker submits completion
4. **Ratings exchanged**: Mutual rating system
5. **Funds released**: To worker (minus 7% + Stripe fees)
6. **Platform fee**: Transferred to RateRight Stripe account

### **Documentation States:**
- **Legal/FAQ**: "Platform Fee: 7% retained by RateRight"
- **Payment terms**: Clearly documented 7% fee structure
- **Transparency**: Fees shown before payment

## 🎯 GAP ANALYSIS FOR £50+£10 MODEL

### **MISSING FEATURES (Need to Build)**

#### **1. £50 Flat Fee System**
- **Current**: 7% percentage fee
- **Required**: £50 flat fee per hire
- **Gap**: No flat fee calculation logic

#### **2. £10 Weekly Insurance**
- **Current**: Insurance verification only (yes/no)
- **Required**: Subscription system (£10/week)
- **Gap**: No payment for insurance, no subscription management

#### **3. Claims Management**
- **Current**: Dispute resolution for quality issues
- **Required**: Non-payment claims system
- **Gap**: No "worker not paid" claim process

#### **4. Legal Enforcement**
- **Current**: Platform facilitates, doesn't guarantee
- **Required**: "We pay worker, lawyer pursues contractor"
- **Gap**: No legal partner integration, no automated enforcement

#### **5. Insurance Fund Management**
- **Current**: No insurance fund
- **Required**: Separate fund for claim payouts
- **Gap**: No fund tracking, no reserve management

## 🔧 SPECIFIC CODE CHANGES NEEDED

### **File: `app/models/contract.py` (Line ~350)**
**Current:**
```python
platform_fee_rate = 0.07  # 7%
self.platform_fee = base_amount * platform_fee_rate
```

**Required:**
```python
# OPTION A: Keep 7% for large jobs, £50 for small
if base_amount > 714:  # £50 is 7% of £714
    platform_fee = base_amount * 0.07
else:
    platform_fee = 50  # £50 flat

# OPTION B: Always £50
platform_fee = 50  # £50 flat fee
```

### **File: `app/blueprints/marketplace/routes.py` (Line 534-555)**
**Current:** Application accepted → Contract created
**Required:** Application accepted → Charge £50 → Contract created

### **New Files Needed:**
1. `app/blueprints/insurance/` - Subscription management
2. `app/models/insurance.py` - Insurance subscriptions, claims
3. `app/services/insurance_service.py` - Claims processing
4. `app/templates/insurance/` - UI for insurance purchase/claims

## 📊 USER JOURNEY CHANGES (New Model)

### **CONTRACTOR Journey (Modified)**
```
1. Post job → Free (unchanged)
2. Accept worker → PAY £50 FEE (NEW)
3. Pay to escrow → Job value only (no 7% fee)
4. Work completion → (unchanged)
5. Release payment → (unchanged)
```

### **WORKER Journey (Modified)**
```
1. Register → (unchanged)
2. OPTIONAL: Buy insurance → £10/week (NEW)
3. Browse jobs → See "insured jobs" filter (NEW)
4. Apply → (unchanged)
5. If not paid → File claim (NEW)
6. Claim payout → From insurance fund (NEW)
```

## ⚠️ BUSINESS LOGIC IMPLICATIONS

### **Pricing Strategy Conflict**
- **Current**: 7% favors large jobs (£50 = 7% of £714)
- **New**: £50 favors small jobs, may lose large job revenue
- **Solution**: Tiered pricing? £50 min, 7% over £714?

### **Insurance Integration**
- **Current**: Insurance = verification checkbox
- **New**: Insurance = paid subscription + claims
- **Challenge**: Migrating existing "insured" users to paid model

### **Legal Liability Shift**
- **Current**: "Facilitator only, not guarantor"
- **New**: "We guarantee payment if insured"
- **Risk**: Increased liability, need insurance fund reserves

### **User Communication**
- **Current**: "7% platform fee"
- **New**: "£50 per hire + optional £10/week insurance"
- **Marketing**: Need clear value proposition change

## 🎯 CRITICAL DECISION POINTS

### **1. Fee Transition Strategy**
- **Option A**: Immediate switch (7% → £50)
- **Option B**: Gradual (offer both, default to £50)
- **Option C**: Tiered (£50 min, 7% over threshold)

### **2. Insurance Rollout**
- **Option A**: Mandatory for all new workers
- **Option B**: Optional (current model + paid option)
- **Option C**: Phased (optional now, mandatory later)

### **3. Claims Processing**
- **Option A**: Manual review (you approve each claim)
- **Option B**: Automated with thresholds
- **Option C**: Hybrid (auto under £500, manual over)

### **4. Legal Enforcement**
- **Option A**: In-house (template emails first)
- **Option B**: Legal partner (fixed-fee letters)
- **Option C**: Full service (we handle everything)

## 📈 IMPACT ASSESSMENT

### **Revenue Impact**
- **Small jobs (<£714)**: More revenue (£50 vs <£50 at 7%)
- **Large jobs (>£714)**: Less revenue (£50 vs >£50 at 7%)
- **Insurance**: New revenue stream (£10/week per worker)

### **User Experience Impact**
- **Contractors**: Simpler (£50 vs calculating 7%)
- **Workers**: More security (optional insurance)
- **Trust**: Increased (payment guarantee)

### **Operational Impact**
- **Increased complexity**: Insurance, claims, legal
- **Increased liability**: Guaranteeing payments
- **New systems**: Fund management, legal integration

---

**NEXT**: Phase 3 - Payment System Analysis (Stripe Integration Details)