(URLs)", "phone_number": "string", "profile_image_url": "string", "payment_method": "string", "card_last_four": "string", "billing_address": "string", "client_rating": "double (default: 5.0, range: 1-5)", "total_requests": "int (default: 0)", "client_reviews_count": "int (default: 0)", "loyalty_points": "int (default: 0)", "loyalty_tier": "enum (bronze, silver, gold, platinum)", "total_points_earned": "int (default: 0)", "created_date": "timestamp", "updated_date": "timestamp" } DispatcherProfiles Collection { "id": "string (auto)", "user_id": "string (ref: Users)", "phone_number": "string", "profile_image_url": "string", "passport_verified": "bool (default: false)", "passport_image_url": "string", "drivers_license_url": "string", "verification_status": "enum (pending, under_review, verified, rejected)", "identity_verification_status": "enum (pending, approved, rejected)", "vehicle_verification_status": "enum (pending, approved, rejected)", "background_check_status": "enum (pending, approved, rejected)", "vehicle_make_model": "string", "vehicle_year": "string", "vehicle_color": "string", "vehicle_license_plate": "string", "vehicle_registration_url": "string", "vehicle_insurance_url": "string", "vehicle_images": "array", "background_check_consent": "bool", "background_check_consent_date": "timestamp", "verification_notes": "string (admin only)", "verification_submitted_date": "timestamp", "verification_completed_date": "timestamp", "rejection_reason": "string", "rating": "double (default: 5.0)", "total_jobs": "int (default: 0)", "total_reviews": "int (default: 0)", "bank_details": "string (encrypted)", "bio": "string", "created_date": "timestamp", "updated_date": "timestamp" } ServiceRequests Collection { "id": "string (auto)", "client_id": "string (ref: Users)", "client_name": "string", "client_rating": "double", "car_model": "string", "license_plate": "string", "location_address": "string", "location_lat": "double", "location_lng": "double", "car_location_images": "array", "status": "enum (scheduled, pending, accepted, en_route, arrived, in_progress, completed, cancelled)", "is_scheduled": "bool (default: false)", "scheduled_date": "string (YYYY-MM-DD)", "scheduled_time": "string (HH:MM)", "scheduled_datetime": "timestamp", "becomes_available_at": "timestamp (24h before scheduled)", "dispatcher_id": "string (ref: Users)", "dispatcher_name": "string", "dispatcher_current_lat": "double", "dispatcher_current_lng": "double", "dispatcher_location_updated_at": "timestamp", "accepted_at": "timestamp", "en_route_at": "timestamp", "arrived_at": "timestamp", "started_at": "timestamp", "completed_at": "timestamp", "estimated_arrival_time": "timestamp", "estimated_duration_minutes": "int (default: 30)", "base_price": "double (default: 33.00 EUR)", "price": "double", "reward_applied": "bool", "reward_redemption_id": "string", "reward_discount": "double", "final_price": "double", "is_urgent": "bool", "urgency_multiplier": "double (1.0 - 1.5)", "location_multiplier": "double (1.0 - 1.3)", "priority_score": "double (calculated)", "notes": "string", "client_notified_accepted": "bool", "client_notified_en_route": "bool", "client_notified_arrived": "bool", "client_notified_started": "bool", "client_notified_completed": "bool", "created_date": "timestamp", "updated_date": "timestamp" } JobCompletions Collection { "id": "string (auto)", "request_id": "string (ref: ServiceRequests)", "dispatcher_id": "string", "client_id": "string", "completion_images": "array (4+ photos required)", "completion_video_url": "string", "completed_at": "timestamp", "completion_location_lat": "double", "completion_location_lng": "double", "location_verified": "bool", "location_distance_meters": "double", "payment_status": "enum (pending_review, processing, completed, disputed)", "payment_release_time": "timestamp", "auto_approve_at": "timestamp (48h after completion)", "client_reviewed": "bool", "client_reviewed_at": "timestamp", "auto_approved": "bool", "amount": "double", "created_date": "timestamp" } Reviews Collection (Dispatcher Reviews) { "id": "string (auto)", "request_id": "string", "reviewer_id": "string (client)", "reviewee_id": "string (dispatcher)", "reviewer_type": "enum (client, dispatcher)", "rating": "int (1-5)", "comment": "string", "applied": "bool (default: false)", "apply_date": "date (next day)", "created_date": "timestamp" } ClientReviews Collection (Client Reviews) { "id": "string (auto)", "request_id": "string", "reviewer_id": "string (dispatcher)", "reviewee_id": "string (client)", "reviewer_name": "string", "rating": "int (1-5)", "comment": "string", "applied": "bool", "apply_date": "date", "verified_service": "bool (default: true)", "service_categories": "array (communication, punctuality, etc.)", "created_date": "timestamp" } Messages Collection { "id": "string (auto)", "request_id": "string", "sender_id": "string", "sender_name": "string", "sender_type": "enum (client, dispatcher)", "message": "string", "message_type": "enum (text, image)", "image_url": "string", "read": "bool", "read_at": "timestamp", "delivered": "bool", "delivered_at": "timestamp", "created_date": "timestamp" } JobOffers Collection { "id": "string (auto)", "request_id": "string", "dispatcher_id": "string", "dispatcher_name": "string", "offer_status": "enum (pending, accepted, rejected, expired)", "offered_at": "timestamp", "expires_at": "timestamp (60 seconds)", "responded_at": "timestamp", "assignment_score": "double", "distance_km": "double", "job_details": "map (cached job info)", "rejection_reason": "string" } Rewards Collection { "id": "string (auto)", "title": "string", "description": "string", "points_required": "int", "discount_percentage": "double", "discount_amount": "double", "reward_type": "enum (percentage_discount, fixed_discount, free_service, priority_booking, special_perk)", "tier_required": "enum (bronze, silver, gold, platinum)", "is_active": "bool", "icon": "string", "expiry_days": "int (default: 30)" } RewardRedemptions Collection { "id": "string (auto)", "client_id": "string", "reward_id": "string", "reward_title": "string", "points_spent": "int", "discount_code": "string (unique)", "status": "enum (active, used, expired)", "expires_at": "timestamp", "used_at": "timestamp", "used_on_request_id": "string", "discount_amount": "double", "created_date": "timestamp" } Disputes Collection { "id": "string (auto)", "request_id": "string", "job_completion_id": "string", "client_id": "string", "dispatcher_id": "string", "raised_by_user_id": "string", "raised_by_name": "string", "raised_by_type": "enum (client, dispatcher)", "dispute_reason": "enum (service_quality, did_not_arrive, damage_claim, payment_issue, miscommunication, incomplete_service, pricing_dispute, behavior_issue, other)", "description": "string", "evidence_urls": "array", "status": "enum (open, under_review, awaiting_client_response, awaiting_dispatcher_response, resolved_client_favor, resolved_dispatcher_favor, resolved_mutual, escalated, closed)", "priority": "enum (low, medium, high, critical)", "opened_at": "timestamp", "resolved_at": "timestamp", "resolved_by_user_id": "string", "resolved_by_name": "string", "resolution_details": "string", "resolution_action": "enum (full_refund, partial_refund, no_refund, payment_released, payment_held, account_warning, account_suspended, other)", "refund_amount": "double", "admin_notes": "string", "last_activity_at": "timestamp" } DisputeComments Collection { "id": "string (auto)", "dispute_id": "string", "user_id": "string", "user_name": "string", "user_type": "enum (client, dispatcher, admin)", "comment": "string", "attachments": "array", "is_internal": "bool (admin notes)", "created_date": "timestamp" } FraudAlerts Collection { "id": "string (auto)", "user_id": "string", "user_type": "enum (client, dispatcher)", "alert_type": "enum (high_volume_short_jobs, rapid_earnings_increase, location_mismatch, multiple_disputes, suspicious_completion_pattern, rapid_cancellations, fake_gps)", "severity": "enum (low, medium, high, critical)", "alert_details": "map", "status": "enum (active, investigating, resolved, false_positive)", "reviewed_by": "string", "resolution_notes": "string", "related_jobs": "array", "created_date": "timestamp" } PricingRules Collection { "id": "string (auto)", "rule_name": "string", "rule_type": "enum (time_of_day, day_of_week, demand_surge, dispatcher_availability, location_premium, service_type)", "is_active": "bool", "multiplier": "double", "fixed_amount": "double", "time_conditions": "map", "demand_conditions": "map", "priority": "int", "description": "string", "applies_to_scheduled": "bool" } SupportTickets Collection { "id": "string (auto)", "user_id": "string", "user_name": "string", "user_email": "string", "user_type": "enum (client, dispatcher, both)", "subject": "string", "category": "enum (technical_issue, payment_issue, account_issue, service_quality, feature_request, other)", "priority": "enum (low, medium, high, urgent)", "status": "enum (open, in_progress, waiting_user, waiting_admin, resolved, closed)", "live_agent_requested": "bool", "assigned_to": "string", "assigned_to_name": "string", "last_message_at": "timestamp", "resolved_at": "timestamp", "closed_at": "timestamp", "expires_at": "timestamp (10 days after close)", "ai_handled": "bool", "satisfaction_rating": "int (1-5)", "tags": "array", "created_date": "timestamp" } SupportMessages Collection { "id": "string (auto)", "ticket_id": "string", "sender_id": "string", "sender_name": "string", "sender_type": "enum (user, admin, ai)", "message": "string", "message_type": "enum (text, image, file)", "attachment_url": "string", "read": "bool", "read_at": "timestamp", "ai_generated": "bool", "ai_confidence": "double", "requires_human": "bool", "created_date": "timestamp" } NotificationPreferences Collection { "id": "string (user_id)", "user_id": "string", "job_accepted": "bool (default: true)", "dispatcher_en_route": "bool (default: true)", "dispatcher_arrived": "bool (default: true)", "job_started": "bool (default: true)", "job_completed": "bool (default: true)", "new_job_offer": "bool (default: true)", "new_message": "bool (default: true)", "support_reply": "bool (default: true)", "dispute_update": "bool (default: true)", "dispute_resolved": "bool (default: true)", "verification_update": "bool (default: true)", "payment_processed": "bool (default: true)", "review_received": "bool (default: true)", "fraud_alert": "bool (default: true)", "rewards_earned": "bool (default: true)", "scheduled_job_reminder": "bool (default: true)", "email_notifications": "bool (default: false)", "push_notifications": "bool (default: true)", "sound_enabled": "bool (default: true)", "do_not_disturb": "bool (default: false)", "quiet_hours_enabled": "bool (default: false)", "quiet_hours_start": "string (HH:MM)", "quiet_hours_end": "string (HH:MM)" } 📱 User Flow & Pages Authentication & Onboarding Flow Splash/Loading Screen → Check authentication status Login/Signup → Firebase Auth (email/password) Email Verification → Send verification code, verify Phone Number Setup → Country picker, phone input, SMS verification Welcome Tutorial → Swipeable intro screens (3-4 slides) Onboarding Tutorial → Service flow explanation User Type Selection → Choose Client, Dispatcher, or Both Profile Setup: Client: Car details, photos, license plate Dispatcher: Vehicle info, documents upload, background check consent Dashboard → Navigate to appropriate dashboard Client Screens (20+ Screens) Main Navigation: Client Dashboard Stats cards: Scheduled, Pending, Active, Completed jobs Loyalty points widget Recent requests list "New Request" FAB button Create Request Car info (pre-filled from profile) Interactive map with pin location Address input with autocomplete Upload car location photos (min 1, max 4) Urgent toggle (1.5x price multiplier) Schedule for later toggle Date picker Time picker (7 AM - 9 PM, 30-min intervals) Notes/special instructions Apply reward (if available) Dynamic price display with breakdown Submit button My Requests Tabs: All, Active, Completed, Needs Review Request cards with: Car model, license plate Location Status badge Price Dispatcher (if assigned) Actions: View Details, Review, Cancel Job Details (Client view) Service info Status timeline Live tracking map (when dispatcher en route/arrived) Chat button Dispatcher info (when assigned) Cancel button (if pending) Raise dispute button (if needed) Review button (if completed) Review Dispatcher Star rating (1-5) Comment field Submit review Skip option Client Profile Profile photo Personal info (name, email, phone) Car details (editable) Car photos Payment methods Edit button Messages/Chat List of active conversations Unread badge Navigate to ChatBox per job Rewards Loyalty points balance Current tier (Bronze/Silver/Gold/Platinum) Available rewards grid Redeem button → generates discount code My redeemed rewards list (Active/Used/Expired) Job History Completed jobs list Filter by date range Total spent stats My Disputes List of disputes Status filters Open dispute details Notifications List of all notifications Mark as read Navigate to related screens Notification Settings Toggle preferences for each notification type Quiet hours configuration Do Not Disturb mode Support AI-powered chat interface Category selection Upload attachments Request live agent button Raise Dispute Select reason Description Upload evidence (photos/videos) Submit Dispute Details Dispute info Status Comments thread Add comment with attachments Dispatcher Screens (20+ Screens) Main Navigation: Dispatcher Dashboard Stats: Rating, Active Jobs, Completed Jobs, Total Earnings Verification status banner Quick actions: Browse Jobs, View Earnings AI Assistant button Available Jobs Tabs: Priority, Scheduled, Highest Pay, Most Recent Job count badges Job cards with: Car model/plate Client name + online status indicator Location Price Urgent/Scheduled/Priority badges Distance from dispatcher Accept button Real-time updates (every 5 seconds) Job offer notifications (60-second countdown) Job Offer Notification (Modal/Bottom Sheet) Job details preview 60-second countdown timer Accept button (green, prominent) Reject button Auto-expire when time runs out My Jobs Tabs: Active, Completed Active jobs: Status badges Navigate to job details Completed jobs: Earnings displayed Review client button Job Details (Dispatcher view) Job info Client info Status action buttons: "En Route" → Updates status, starts location tracking "I've Arrived" → Updates status "Start Job" → Updates status, starts timer "Complete Job" → Navigate to completion flow Live tracking map Chat button Cancel/Dispute buttons Complete Job Screen Upload completion photos (min 4: front, back, left, right) Optional: Upload video walkthrough GPS location verification Submit completion Auto-payment processing notification Review Client Star rating Comment Service categories checkboxes Submit Dispatcher Profile Profile photo Bio Rating + review count Vehicle info Verification status Bank details (for payouts) Edit button Dispatcher Verification Step 1: Identity Verification Upload passport/national ID Upload driver's license Step 2: Vehicle Documentation Vehicle details form Upload registration Upload insurance Upload vehicle photos Step 3: Background Check Consent form Submit for review Verification status tracking Verification Status Overall status Step-by-step status (Identity, Vehicle, Background Check) Approval/Rejection reasons Resubmit button if rejected Earnings Total earnings Pending payments (24-48h hold) Completed payments Filter by date Payment history list Withdrawal/payout options Public Dispatcher Profile (viewable by clients) Profile photo Name Bio Rating + reviews Total jobs completed Reviews list Messages/Chat (same as client) Notifications (same as client) Notification Settings (same as client) Support (same as client) My Disputes (same as client) Raise Dispute (same as client) Admin Screens (10+ Screens) Admin Analytics Dashboard KPI cards: Total Users, Active Jobs, Revenue, Disputes Charts: Jobs over time, Revenue over time, User growth Recent activity feed User Management Tabs: All Users, Clients, Dispatchers, Admins Search/filter User cards with: Name, email, type Account status Actions: View, Edit, Shadow Ban, Suspend, Ban User Details (Admin view) Full profile info Activity log Jobs history Reviews received Actions: Shadow Ban, Suspend, Reset Password, Delete Dispatcher Verification Review Pending verifications list Review documents (enlarge images) Approve/Reject per step Add verification notes Final approve/reject Fraud Alerts Alert cards with severity badges Filter by severity, status, type Alert details: User info Alert details Related jobs Investigation notes Actions: Investigate, Resolve, Mark False Positive Dispute Management Disputes list Filter by status, priority Dispute details: All evidence Comments from both parties Resolution options Refund processing Close dispute Support Tickets Tickets list (only with live_agent_requested = true) Filter by status, priority, category Ticket details: Chat interface Assign to admin Change status Add internal notes Resolve/close ticket Rewards Management Rewards list Create/Edit reward: Title, description Points required Discount type/amount Tier required Active toggle Expiry days Delete reward Pricing Rules Rules list Create/Edit rule: Rule name, type Multiplier/fixed amount Time/demand conditions Priority Active toggle Applies to scheduled jobs toggle Delete rule File Management Upload files (images, PDFs) View uploaded files Delete files Generate shareable URLs 🔑 Key Features & Business Logic 1. Dynamic Pricing System Base Price: €33.00 (configurable) Multipliers: Urgency: 1.5x if urgent toggle enabled Location: 1.3x if high-demand area (downtown, airport, business district) Time of Day: Based on PricingRules (e.g., 1.2x during peak hours 5-7 PM) Day of Week: Based on PricingRules (e.g., 1.15x on weekends) Demand Surge: Based on active requests vs. available dispatchers ratio Scheduled Discount: 0.85x for scheduled jobs (15% savings) Calculation: finalPrice = basePrice × urgencyMultiplier × locationMultiplier × timeMultiplier × dayMultiplier × demandMultiplier Price Breakdown Display: Base Price: €33.00 + Urgency (50%): +€16.50 + Location Premium (30%): +€9.90 + Peak Hours (20%): +€6.60 ────────────────────── Subtotal: €66.00 - Reward Discount: -€10.00 ────────────────────── Final Price: €56.00 2. Auto-Dispatch System Triggered When: New job created (pending status) or scheduled job becomes available Assignment Algorithm: Calculate Assignment Score for each verified, online dispatcher: score = (ratingWeight × dispatcherRating) - (distanceWeight × distanceKm) + (availabilityBonus if dispatcher has no active jobs) + (priorityBonus if high-priority job) Rank Dispatchers by score (highest first) Send Job Offer to top dispatcher (60-second timer) Create JobOffer document Send push notification Display in-app notification with countdown If Accepted: Update ServiceRequest: status = "accepted", dispatcher_id, accepted_at Cancel all other pending offers for this job Send notification to client If Rejected/Expired: Mark offer as rejected/expired Send offer to next dispatcher in queue Repeat until job is accepted or all dispatchers exhausted If No Dispatchers Available: Job remains in "pending" status Retry dispatch every 2 minutes Notify client of delay 3. Job Status Workflow Client Initiates: scheduled → Job created for future date/time Becomes available 24 hours before scheduled time Status changes to pending when available pending → Awaiting dispatcher acceptance Dispatcher Actions: 3. accepted → Dispatcher accepted job Client receives notification Chat enabled en_route → Dispatcher traveling to location Real-time GPS tracking starts Client sees live map with ETA arrived → Dispatcher at location Client receives notification Verify location (distance < 100m) in_progress → Job actively being performed Timer started Client can track duration completed → Job finished, completion uploaded Dispatcher uploads photos/video GPS location verified Payment placed on hold (24-48h) Client can review or auto-approve after 48h cancelled → Client or dispatcher cancelled Refund processed (if applicable) 4. Real-Time Location Tracking Implementation: Use Flutter location package or FlutterFlow location widget Update dispatcher location every 10 seconds when status = en_route or arrived Store in ServiceRequest: dispatcher_current_lat, dispatcher_current_lng, dispatcher_location_updated_at Display on client's map with: Dispatcher's current position (blue marker) Job location (red marker) Route polyline ETA calculation Location Verification: When dispatcher marks "arrived", calculate distance between current location and job location If > 100 meters, show warning: "You're not at the job location. Please navigate to the correct address." When completing job, verify completion location matches job location (< 100m) Flag suspicious patterns (fraud monitoring) 5. In-App Chat System Per Job: Messages scoped to request_id Real-time updates using Firestore listeners Support text and image messages Typing indicators Read receipts Unread count badges Chat UI: Message bubbles (left for received, right for sent) Timestamps Sender name/avatar Image gallery lightbox Send button + camera/gallery picker 6. Review System Delayed Application: Reviews submitted immediately but applied = false apply_date = tomorrow's date Background job runs daily at midnight to apply pending reviews where apply_date <= today Recalculate average rating and review count Update DispatcherProfile or ClientProfile Why Delayed?: Prevents instant retaliation reviews Gives time for dispute resolution More fair and balanced system Client Review Categories: Communication Punctuality Car Accuracy Friendliness Payment 7. Loyalty & Rewards System Points Earning: €1 spent = 10 loyalty points Referral bonus: 500 points First job: 200 points Tiers: Bronze: 0-999 points Silver: 1000-2999 points Gold: 3000-5999 points Platinum: 6000+ points Rewards Redemption: Client browses rewards (filtered by current tier) Redeem reward → deduct points, create RewardRedemption with unique discount code Set expiry (e.g., 30 days) When creating request, display active rewards Client selects reward → calculate discount, apply to final price On request creation, link reward_redemption_id, mark redemption as used Reward Types: Percentage discount (e.g., 20% off) Fixed discount (e.g., €5 off) Free service (€33 discount) Priority booking (dispatched first) Special perks (free wax, etc.) 8. Payment Processing Hold Period: 24-48 hours after job completion Auto-Approval: If client doesn't review/dispute within 48 hours, payment auto-approved Update JobCompletion: auto_approved = true, payment_status = completed Release funds to dispatcher Manual Approval: Client reviews job → payment released immediately Update: client_reviewed = true, payment_status = completed Disputes: Payment held indefinitely until dispute resolved Admin decides: full refund, partial refund, release to dispatcher Implementation: Use Stripe, PayPal, or in-app payment provider Store payment methods in ClientProfile (tokenized) Process payment on job completion Handle webhooks for payment status updates 9. Fraud Monitoring Automated Checks: High Volume Short Jobs: If dispatcher completes > 10 jobs in < 2 hours → flag Likely not actually performing service Rapid Earnings Increase: If earnings increase > 200% week-over-week → flag Location Mismatch: If completion location > 500m from job location → flag Fake GPS: Check for GPS spoofing indicators Verify location timestamp consistency Multiple Disputes: If user has > 3 disputes in 30 days → flag Suspicious Completion Pattern: Same completion photos for multiple jobs → flag Same completion time for all jobs (e.g., exactly 30 min) → flag Actions: Create FraudAlert document Notify admins Admin investigates, can: Shadow ban (user sees no jobs, but doesn't know they're banned) Suspend account Permanent ban 10. Dispute Management Raising Dispute: Either client or dispatcher can raise Select reason from predefined list Add detailed description Upload evidence (photos, videos) Creates Dispute document with status "open" Dispute Resolution: Admin reviews evidence Can request additional info (status: awaiting_client_response / awaiting_dispatcher_response) Admin decides resolution: Full refund to client Partial refund No refund, payment released to dispatcher Account warning/suspension Update Dispute status to resolved Process refund/payment release Notify both parties Auto-Escalation: If no admin response within 72 hours, status = "escalated" High-priority alerts sent to admins 11. Verification System (Dispatchers) 3-Step Process: Step 1: Identity Verification Upload passport or national ID (front + back) Upload driver's license Admin reviews documents Checks for: Valid, non-expired documents Name matches account Photo matches selfie (optional: use facial recognition API) Approve/Reject with notes Step 2: Vehicle Verification Enter vehicle details (make, model, year, color, plate) Upload registration document Upload insurance proof (must be current) Upload vehicle photos (4 sides) Admin reviews Checks for: Valid registration and insurance Vehicle matches description No damage/unsafe conditions Approve/Reject with notes Step 3: Background Check Dispatcher gives consent Integrate with background check API (e.g., Checkr, Onfido) Check for: Criminal record Driving violations Sex offender registry Auto-approve if clean, manual review if flags Approve/Reject with notes Final Verification: All 3 steps approved → verification_status = "verified" Dispatcher can now accept jobs If any step rejected → verification_status = "rejected" Dispatcher can resubmit corrected documents 12. Scheduled Jobs Client Scheduling: Toggle "Schedule for Later" Select date (today or future, up to 30 days) Select time (7 AM - 9 PM, 30-min slots) Price shows scheduled discount (15% off) Availability Logic: scheduled_datetime = selected date/time becomes_available_at = scheduled_datetime - 24 hours Status = "scheduled" until becomes_available_at At becomes_available_at: Background job checks for scheduled jobs Status changes to "pending" Auto-dispatch triggered Dispatcher View: Scheduled jobs shown in "Scheduled" tab with future date/time Higher priority in feed as scheduled time approaches Can accept up to 24 hours before scheduled time 13. AI-Powered Support Implementation: Integrate AI API (OpenAI GPT, Claude, or custom trained model) AI handles common questions: "How do I cancel a job?" "Where's my payment?" "How to change my car details?" "What if dispatcher doesn't show?" AI Chat Flow: User creates support ticket, selects category AI responds immediately with relevant help Conversation continues with AI If AI can't resolve (low confidence or user requests human): "Request Live Agent" button appears User clicks → live_agent_requested = true Ticket appears in admin panel Admin joins chat and takes over AI Confidence Scoring: AI returns confidence score (0-1) with each response If confidence < 0.6, set requires_human = true Proactively offer live agent 14. Notification System Types: In-app notifications (Firebase Firestore listeners) Push notifications (Firebase Cloud Messaging) Email notifications (optional, via SendGrid/Mailgun) Notification Events: For Clients: Job accepted Dispatcher en route Dispatcher arrived Job started Job completed (with review reminder) New message Review received Dispute update Rewards earned For Dispatchers: New job offer (60-second timer) Job cancelled by client New message Review received Verification status update Payment processed Fraud alert Notification Preferences: User can toggle each notification type Enable/disable push, email Quiet hours (e.g., 10 PM - 8 AM, no notifications) Do Not Disturb mode (mute all temporarily) Implementation: Store preferences in NotificationPreferences collection Check preferences before sending notification Use Firebase Cloud Functions to send push notifications Display in-app using NotificationListener widget 15. Shadow Banning Purpose: Stealth ban for suspected fraud without alerting user How It Works: Admin sets account_status = shadow_banned User can still login and use app BUT: Dispatchers: See no available jobs (empty feed) Clients: Requests receive no offers, eventually timeout User doesn't know they're banned Use Cases: Suspected fraud, pending investigation Multiple fraud alerts Pattern of poor behavior not severe enough for full ban Admin Actions: View shadow banned users Add shadow ban reason (internal note) Lift shadow ban or escalate to suspension/ban 🎨 UI/UX Design Guidelines Color Scheme Primary Navy: #0B132B Primary Purple: #6C63FF Accent Cyan: #4ECDC4 Accent Lilac: #B8A4FF Accent Blue: #5DADE2 Background Dark: #0B132B to #1a1f3a gradient Card Background: rgba(255,255,255,0.05) with blur Text Primary: #FFFFFF Text Secondary: #B0B8D4 Success: #10B981 Warning: #F59E0B Error: #EF4444 Typography Font: Inter (or system default: Roboto/SF Pro) Headings: Bold, 24-32px Body: Regular, 14-16px Small: 12px Components Glass Card: Background: rgba(255,255,255,0.05) Backdrop blur: 20px Border: 1px rgba(255,255,255,0.1) Border radius: 24px Hover: slight scale up, shadow Buttons: Primary: Gradient (Purple to Lilac), rounded 16px, shadow Secondary: Outline, white/10 border Icon buttons: Circular, 48px, glassmorphic Input Fields: Background: rgba(255,255,255,0.05) Border: 1px rgba(255,255,255,0.1) Rounded: 16px Focus: border color to Accent Cyan Status Badges: Pending: Yellow Accepted: Blue En Route: Purple In Progress: Purple Completed: Green Cancelled: Red Navigation: Bottom tab bar (client/dispatcher) Sidebar (admin) Icons from Lucide or Material Icons Animations Fade in on screen load Slide up for cards Smooth transitions between screens Skeleton loaders while fetching data Pull-to-refresh on lists Responsive Design Mobile-first (iOS & Android) Support tablet layouts (side-by-side panels) Landscape mode support Adaptive text sizes 🔌 Backend/API Requirements Firebase Setup Authentication: Email/Password, Phone Auth (SMS) Firestore Database: All collections listed above Cloud Storage: For images, videos, documents Cloud Functions: Background tasks (auto-dispatch, review application, scheduled job activation, fraud monitoring, cleanup) Cloud Messaging: Push notifications Cloud Functions (Node.js/TypeScript) 1. Auto-Dispatch Function exports.autoDispatchJob = functions.firestore .document('ServiceRequests/{requestId}') .onCreate(async (snap, context) => { const job = snap.data(); if (job.status === 'pending') { await dispatchJobToDispatchers(job); } }); 2. Apply Reviews (Daily Cron) exports.applyPendingReviews = functions.pubsub .schedule('every day 00:00') .onRun(async (context) => { const today = new Date().toISOString().split('T')[0]; const reviews = await getReviewsToApply(today); for (const review of reviews) { await applyReviewToProfile(review); } }); 3. Scheduled Job Activator (Runs every 5 minutes) exports.activateScheduledJobs = functions.pubsub .schedule('every 5 minutes') .onRun(async (context) => { const now = new Date(); const jobs = await getScheduledJobsDue(now); for (const job of jobs) { await updateJobStatus(job.id, 'pending'); await dispatchJobToDispatchers(job); } }); 4. Auto-Approve Completions (Runs hourly) exports.autoApproveCompletions = functions.pubsub .schedule('every 1 hours') .onRun(async (context) => { const now = new Date(); const completions = await getCompletionsDueForApproval(now); for (const completion of completions) { await approveCompletion(completion.id); await releasePayment(completion); } }); 5. Fraud Monitoring (Runs every hour) exports.monitorFraud = functions.pubsub .schedule('every 1 hours') .onRun(async (context) => { await checkHighVolumeShortJobs(); await checkLocationMismatches(); await checkSuspiciousPatterns(); }); 6. Support Ticket Cleanup (Daily) exports.cleanupExpiredTickets = functions.pubsub .schedule('every day 00:00') .onRun(async (context) => { const now = new Date(); const expired = await getExpiredTickets(now); for (const ticket of expired) { await deleteTicket(ticket.id); await deleteRelatedMessages(ticket.id); } }); 7. Send Notifications exports.sendNotification = functions.firestore .document('JobNotifications/{notificationId}') .onCreate(async (snap, context) => { const notification = snap.data(); const user = await getUser(notification.user_id); const prefs = await getNotificationPrefs(user.id); if (shouldSendNotification(notification, prefs)) { await sendPushNotification(user.fcm_token, notification); if (prefs.email_notifications) { await sendEmailNotification(user.email, notification); } } }); External APIs 1. Google Maps API: Places Autocomplete (address input) Geocoding (lat/lng from address) Directions (route polyline, ETA) Distance Matrix (calculate distance between points) 2. Payment Gateway (Stripe recommended): Setup: Create Stripe account, get API keys Add payment method (tokenized) Charge on job completion Refund for disputes Payout to dispatcher bank accounts 3. SMS Provider (Twilio): Send verification codes for phone numbers SMS notifications (optional) 4. Email Provider (SendGrid/Mailgun): Send verification emails Notification emails Password reset emails 5. Background Check API (Checkr/Onfido): Dispatcher verification Criminal record check Driving history 6. AI API (OpenAI/Claude): Support chat responses Content moderation (review comments) 7. Image Optimization (Cloudinary/imgix): Compress uploaded images Generate thumbnails Lazy loading 📋 Development Checklist Phase 1: Core Setup (Week 1-2) Firebase project setup (Auth, Firestore, Storage, Functions, Messaging) FlutterFlow project creation Define all Firestore collections with security rules Setup authentication flows (email, phone) Design system: colors, typography, components Phase 2: Authentication & Onboarding (Week 3-4) Login/Signup screens Email verification flow Phone number setup + SMS verification Welcome tutorial (swipeable intro) Onboarding tutorial (service flow) User type selection Client profile setup Dispatcher profile setup (basic info) Phase 3: Client Features (Week 5-7) Client dashboard Create request screen (map, photos, pricing) Dynamic pricing logic My requests list Job details screen (client view) Chat/messaging Review dispatcher Client profile management Rewards & redemption Job history Phase 4: Dispatcher Features (Week 8-10) Dispatcher verification flow (3 steps) Admin verification review panel Dispatcher dashboard Available jobs feed with filters Job offer notifications (60s timer) My jobs list Job details screen (dispatcher view) Job status updates (en route, arrived, started) Live location tracking Complete job (photos, video, GPS) Review client Dispatcher profile Earnings tracking Phase 5: Auto-Dispatch & Scheduling (Week 11) Auto-dispatch Cloud Function Assignment algorithm JobOffer creation and expiry Scheduled jobs logic Scheduled job activation (cron) Notification system integration Phase 6: Payments (Week 12) Stripe integration Add payment method Charge on job completion Payment hold period (24-48h) Auto-approval after 48h Manual approval on review Refund processing Dispatcher payouts Phase 7: Admin Panel (Week 13-14) Admin analytics dashboard User management (list, view, edit, ban) Fraud alerts management Dispute management & resolution Support tickets (live agent) Rewards management (CRUD) Pricing rules management (CRUD) File management Phase 8: Disputes & Support (Week 15) Raise dispute flow (both sides) Dispute details & comments AI-powered support chat Live agent handoff Support ticket lifecycle Auto-cleanup expired tickets Phase 9: Reviews & Ratings (Week 16) Review submission (delayed application) Apply pending reviews (daily cron) Rating recalculation Public dispatcher profiles with reviews Client reviews from dispatchers Phase 10: Fraud & Security (Week 17) Fraud monitoring Cloud Function Location verification Shadow banning logic Fraud alert creation Admin investigation tools Phase 11: Notifications (Week 18) Push notification setup (FCM) In-app notifications Email notifications Notification preferences screen Quiet hours & Do Not Disturb Phase 12: Polish & Testing (Week 19-20) UI/UX refinements Animations & transitions Error handling & validation Loading states & skeleton loaders Empty states Integration testing User acceptance testing Performance optimization Security audit Phase 13: Launch (Week 21) App Store submission (iOS) Google Play submission (Android) Marketing website Terms of Service & Privacy Policy Customer support setup Monitoring & analytics (Firebase Analytics, Crashlytics) Soft launch (beta testers) Full public launch 🚀 Post-Launch Roadmap Version 1.1 (Month 2-3) Referral program In-app wallet (prepaid credits) Multiple payment methods Service packages (monthly subscriptions) Push notification improvements Performance monitoring dashboard Version 1.2 (Month 4-5) Dispatcher teams (multiple dispatchers per job) Advanced scheduling (recurring jobs) Service add-ons (wax, interior cleaning, etc.) Dynamic service area maps Dispatcher earnings insights Client spending insights Version 2.0 (Month 6-8) Corporate accounts (businesses with fleets) API for third-party integrations White-label solution Multi-language support Multi-currency support International expansion 🔒 Security Considerations Data Encryption: All data in transit: HTTPS/TLS Sensitive data at rest: Firestore encryption Payment data: Never store raw card details, use tokenization Authentication: Firebase Auth with email/password Phone verification via SMS (Twilio) Email verification for account activation Session management with secure tokens Authorization: Firestore Security Rules for all collections User can only access their own data Admin role checking for admin panels Read-only vs. write permissions Input Validation: Sanitize all user inputs Validate email, phone formats Image upload restrictions (file type, size) XSS prevention Privacy: GDPR compliance (data export, deletion) Terms of Service & Privacy Policy User consent for data collection Anonymize analytics data Fraud Prevention: Location verification (GPS spoofing detection) Automated fraud monitoring Manual admin review for suspicious activity Rate limiting (API calls, job creation) 📊 Key Metrics to Track User Metrics: Total users (clients, dispatchers) Active users (DAU, MAU) User retention rate Churn rate Job Metrics: Total jobs created Jobs completed Average job completion time Job acceptance rate Job cancellation rate Financial Metrics: Total revenue Average job price Payment success rate Refund rate Dispatcher earnings Quality Metrics: Average client rating Average dispatcher rating Dispute rate Fraud alert rate Response time (support, disputes) Engagement Metrics: App opens per user Session duration Feature usage (chat, rewards, scheduling)"> (URLs)", "phone_number": "string", "profile_image_url": "string", "payment_method": "string", "card_last_four": "string", "billing_address": "string", "client_rating": "double (default: 5.0, range: 1-5)", "total_requests": "int (default: 0)", "client_reviews_count": "int (default: 0)", "loyalty_points": "int (default: 0)", "loyalty_tier": "enum (bronze, silver, gold, platinum)", "total_points_earned": "int (default: 0)", "created_date": "timestamp", "updated_date": "timestamp" } DispatcherProfiles Collection { "id": "string (auto)", "user_id": "string (ref: Users)", "phone_number": "string", "profile_image_url": "string", "passport_verified": "bool (default: false)", "passport_image_url": "string", "drivers_license_url": "string", "verification_status": "enum (pending, under_review, verified, rejected)", "identity_verification_status": "enum (pending, approved, rejected)", "vehicle_verification_status": "enum (pending, approved, rejected)", "background_check_status": "enum (pending, approved, rejected)", "vehicle_make_model": "string", "vehicle_year": "string", "vehicle_color": "string", "vehicle_license_plate": "string", "vehicle_registration_url": "string", "vehicle_insurance_url": "string", "vehicle_images": "array", "background_check_consent": "bool", "background_check_consent_date": "timestamp", "verification_notes": "string (admin only)", "verification_submitted_date": "timestamp", "verification_completed_date": "timestamp", "rejection_reason": "string", "rating": "double (default: 5.0)", "total_jobs": "int (default: 0)", "total_reviews": "int (default: 0)", "bank_details": "string (encrypted)", "bio": "string", "created_date": "timestamp", "updated_date": "timestamp" } ServiceRequests Collection { "id": "string (auto)", "client_id": "string (ref: Users)", "client_name": "string", "client_rating": "double", "car_model": "string", "license_plate": "string", "location_address": "string", "location_lat": "double", "location_lng": "double", "car_location_images": "array", "status": "enum (scheduled, pending, accepted, en_route, arrived, in_progress, completed, cancelled)", "is_scheduled": "bool (default: false)", "scheduled_date": "string (YYYY-MM-DD)", "scheduled_time": "string (HH:MM)", "scheduled_datetime": "timestamp", "becomes_available_at": "timestamp (24h before scheduled)", "dispatcher_id": "string (ref: Users)", "dispatcher_name": "string", "dispatcher_current_lat": "double", "dispatcher_current_lng": "double", "dispatcher_location_updated_at": "timestamp", "accepted_at": "timestamp", "en_route_at": "timestamp", "arrived_at": "timestamp", "started_at": "timestamp", "completed_at": "timestamp", "estimated_arrival_time": "timestamp", "estimated_duration_minutes": "int (default: 30)", "base_price": "double (default: 33.00 EUR)", "price": "double", "reward_applied": "bool", "reward_redemption_id": "string", "reward_discount": "double", "final_price": "double", "is_urgent": "bool", "urgency_multiplier": "double (1.0 - 1.5)", "location_multiplier": "double (1.0 - 1.3)", "priority_score": "double (calculated)", "notes": "string", "client_notified_accepted": "bool", "client_notified_en_route": "bool", "client_notified_arrived": "bool", "client_notified_started": "bool", "client_notified_completed": "bool", "created_date": "timestamp", "updated_date": "timestamp" } JobCompletions Collection { "id": "string (auto)", "request_id": "string (ref: ServiceRequests)", "dispatcher_id": "string", "client_id": "string", "completion_images": "array (4+ photos required)", "completion_video_url": "string", "completed_at": "timestamp", "completion_location_lat": "double", "completion_location_lng": "double", "location_verified": "bool", "location_distance_meters": "double", "payment_status": "enum (pending_review, processing, completed, disputed)", "payment_release_time": "timestamp", "auto_approve_at": "timestamp (48h after completion)", "client_reviewed": "bool", "client_reviewed_at": "timestamp", "auto_approved": "bool", "amount": "double", "created_date": "timestamp" } Reviews Collection (Dispatcher Reviews) { "id": "string (auto)", "request_id": "string", "reviewer_id": "string (client)", "reviewee_id": "string (dispatcher)", "reviewer_type": "enum (client, dispatcher)", "rating": "int (1-5)", "comment": "string", "applied": "bool (default: false)", "apply_date": "date (next day)", "created_date": "timestamp" } ClientReviews Collection (Client Reviews) { "id": "string (auto)", "request_id": "string", "reviewer_id": "string (dispatcher)", "reviewee_id": "string (client)", "reviewer_name": "string", "rating": "int (1-5)", "comment": "string", "applied": "bool", "apply_date": "date", "verified_service": "bool (default: true)", "service_categories": "array (communication, punctuality, etc.)", "created_date": "timestamp" } Messages Collection { "id": "string (auto)", "request_id": "string", "sender_id": "string", "sender_name": "string", "sender_type": "enum (client, dispatcher)", "message": "string", "message_type": "enum (text, image)", "image_url": "string", "read": "bool", "read_at": "timestamp", "delivered": "bool", "delivered_at": "timestamp", "created_date": "timestamp" } JobOffers Collection { "id": "string (auto)", "request_id": "string", "dispatcher_id": "string", "dispatcher_name": "string", "offer_status": "enum (pending, accepted, rejected, expired)", "offered_at": "timestamp", "expires_at": "timestamp (60 seconds)", "responded_at": "timestamp", "assignment_score": "double", "distance_km": "double", "job_details": "map (cached job info)", "rejection_reason": "string" } Rewards Collection { "id": "string (auto)", "title": "string", "description": "string", "points_required": "int", "discount_percentage": "double", "discount_amount": "double", "reward_type": "enum (percentage_discount, fixed_discount, free_service, priority_booking, special_perk)", "tier_required": "enum (bronze, silver, gold, platinum)", "is_active": "bool", "icon": "string", "expiry_days": "int (default: 30)" } RewardRedemptions Collection { "id": "string (auto)", "client_id": "string", "reward_id": "string", "reward_title": "string", "points_spent": "int", "discount_code": "string (unique)", "status": "enum (active, used, expired)", "expires_at": "timestamp", "used_at": "timestamp", "used_on_request_id": "string", "discount_amount": "double", "created_date": "timestamp" } Disputes Collection { "id": "string (auto)", "request_id": "string", "job_completion_id": "string", "client_id": "string", "dispatcher_id": "string", "raised_by_user_id": "string", "raised_by_name": "string", "raised_by_type": "enum (client, dispatcher)", "dispute_reason": "enum (service_quality, did_not_arrive, damage_claim, payment_issue, miscommunication, incomplete_service, pricing_dispute, behavior_issue, other)", "description": "string", "evidence_urls": "array", "status": "enum (open, under_review, awaiting_client_response, awaiting_dispatcher_response, resolved_client_favor, resolved_dispatcher_favor, resolved_mutual, escalated, closed)", "priority": "enum (low, medium, high, critical)", "opened_at": "timestamp", "resolved_at": "timestamp", "resolved_by_user_id": "string", "resolved_by_name": "string", "resolution_details": "string", "resolution_action": "enum (full_refund, partial_refund, no_refund, payment_released, payment_held, account_warning, account_suspended, other)", "refund_amount": "double", "admin_notes": "string", "last_activity_at": "timestamp" } DisputeComments Collection { "id": "string (auto)", "dispute_id": "string", "user_id": "string", "user_name": "string", "user_type": "enum (client, dispatcher, admin)", "comment": "string", "attachments": "array", "is_internal": "bool (admin notes)", "created_date": "timestamp" } FraudAlerts Collection { "id": "string (auto)", "user_id": "string", "user_type": "enum (client, dispatcher)", "alert_type": "enum (high_volume_short_jobs, rapid_earnings_increase, location_mismatch, multiple_disputes, suspicious_completion_pattern, rapid_cancellations, fake_gps)", "severity": "enum (low, medium, high, critical)", "alert_details": "map", "status": "enum (active, investigating, resolved, false_positive)", "reviewed_by": "string", "resolution_notes": "string", "related_jobs": "array", "created_date": "timestamp" } PricingRules Collection { "id": "string (auto)", "rule_name": "string", "rule_type": "enum (time_of_day, day_of_week, demand_surge, dispatcher_availability, location_premium, service_type)", "is_active": "bool", "multiplier": "double", "fixed_amount": "double", "time_conditions": "map", "demand_conditions": "map", "priority": "int", "description": "string", "applies_to_scheduled": "bool" } SupportTickets Collection { "id": "string (auto)", "user_id": "string", "user_name": "string", "user_email": "string", "user_type": "enum (client, dispatcher, both)", "subject": "string", "category": "enum (technical_issue, payment_issue, account_issue, service_quality, feature_request, other)", "priority": "enum (low, medium, high, urgent)", "status": "enum (open, in_progress, waiting_user, waiting_admin, resolved, closed)", "live_agent_requested": "bool", "assigned_to": "string", "assigned_to_name": "string", "last_message_at": "timestamp", "resolved_at": "timestamp", "closed_at": "timestamp", "expires_at": "timestamp (10 days after close)", "ai_handled": "bool", "satisfaction_rating": "int (1-5)", "tags": "array", "created_date": "timestamp" } SupportMessages Collection { "id": "string (auto)", "ticket_id": "string", "sender_id": "string", "sender_name": "string", "sender_type": "enum (user, admin, ai)", "message": "string", "message_type": "enum (text, image, file)", "attachment_url": "string", "read": "bool", "read_at": "timestamp", "ai_generated": "bool", "ai_confidence": "double", "requires_human": "bool", "created_date": "timestamp" } NotificationPreferences Collection { "id": "string (user_id)", "user_id": "string", "job_accepted": "bool (default: true)", "dispatcher_en_route": "bool (default: true)", "dispatcher_arrived": "bool (default: true)", "job_started": "bool (default: true)", "job_completed": "bool (default: true)", "new_job_offer": "bool (default: true)", "new_message": "bool (default: true)", "support_reply": "bool (default: true)", "dispute_update": "bool (default: true)", "dispute_resolved": "bool (default: true)", "verification_update": "bool (default: true)", "payment_processed": "bool (default: true)", "review_received": "bool (default: true)", "fraud_alert": "bool (default: true)", "rewards_earned": "bool (default: true)", "scheduled_job_reminder": "bool (default: true)", "email_notifications": "bool (default: false)", "push_notifications": "bool (default: true)", "sound_enabled": "bool (default: true)", "do_not_disturb": "bool (default: false)", "quiet_hours_enabled": "bool (default: false)", "quiet_hours_start": "string (HH:MM)", "quiet_hours_end": "string (HH:MM)" } 📱 User Flow & Pages Authentication & Onboarding Flow Splash/Loading Screen → Check authentication status Login/Signup → Firebase Auth (email/password) Email Verification → Send verification code, verify Phone Number Setup → Country picker, phone input, SMS verification Welcome Tutorial → Swipeable intro screens (3-4 slides) Onboarding Tutorial → Service flow explanation User Type Selection → Choose Client, Dispatcher, or Both Profile Setup: Client: Car details, photos, license plate Dispatcher: Vehicle info, documents upload, background check consent Dashboard → Navigate to appropriate dashboard Client Screens (20+ Screens) Main Navigation: Client Dashboard Stats cards: Scheduled, Pending, Active, Completed jobs Loyalty points widget Recent requests list "New Request" FAB button Create Request Car info (pre-filled from profile) Interactive map with pin location Address input with autocomplete Upload car location photos (min 1, max 4) Urgent toggle (1.5x price multiplier) Schedule for later toggle Date picker Time picker (7 AM - 9 PM, 30-min intervals) Notes/special instructions Apply reward (if available) Dynamic price display with breakdown Submit button My Requests Tabs: All, Active, Completed, Needs Review Request cards with: Car model, license plate Location Status badge Price Dispatcher (if assigned) Actions: View Details, Review, Cancel Job Details (Client view) Service info Status timeline Live tracking map (when dispatcher en route/arrived) Chat button Dispatcher info (when assigned) Cancel button (if pending) Raise dispute button (if needed) Review button (if completed) Review Dispatcher Star rating (1-5) Comment field Submit review Skip option Client Profile Profile photo Personal info (name, email, phone) Car details (editable) Car photos Payment methods Edit button Messages/Chat List of active conversations Unread badge Navigate to ChatBox per job Rewards Loyalty points balance Current tier (Bronze/Silver/Gold/Platinum) Available rewards grid Redeem button → generates discount code My redeemed rewards list (Active/Used/Expired) Job History Completed jobs list Filter by date range Total spent stats My Disputes List of disputes Status filters Open dispute details Notifications List of all notifications Mark as read Navigate to related screens Notification Settings Toggle preferences for each notification type Quiet hours configuration Do Not Disturb mode Support AI-powered chat interface Category selection Upload attachments Request live agent button Raise Dispute Select reason Description Upload evidence (photos/videos) Submit Dispute Details Dispute info Status Comments thread Add comment with attachments Dispatcher Screens (20+ Screens) Main Navigation: Dispatcher Dashboard Stats: Rating, Active Jobs, Completed Jobs, Total Earnings Verification status banner Quick actions: Browse Jobs, View Earnings AI Assistant button Available Jobs Tabs: Priority, Scheduled, Highest Pay, Most Recent Job count badges Job cards with: Car model/plate Client name + online status indicator Location Price Urgent/Scheduled/Priority badges Distance from dispatcher Accept button Real-time updates (every 5 seconds) Job offer notifications (60-second countdown) Job Offer Notification (Modal/Bottom Sheet) Job details preview 60-second countdown timer Accept button (green, prominent) Reject button Auto-expire when time runs out My Jobs Tabs: Active, Completed Active jobs: Status badges Navigate to job details Completed jobs: Earnings displayed Review client button Job Details (Dispatcher view) Job info Client info Status action buttons: "En Route" → Updates status, starts location tracking "I've Arrived" → Updates status "Start Job" → Updates status, starts timer "Complete Job" → Navigate to completion flow Live tracking map Chat button Cancel/Dispute buttons Complete Job Screen Upload completion photos (min 4: front, back, left, right) Optional: Upload video walkthrough GPS location verification Submit completion Auto-payment processing notification Review Client Star rating Comment Service categories checkboxes Submit Dispatcher Profile Profile photo Bio Rating + review count Vehicle info Verification status Bank details (for payouts) Edit button Dispatcher Verification Step 1: Identity Verification Upload passport/national ID Upload driver's license Step 2: Vehicle Documentation Vehicle details form Upload registration Upload insurance Upload vehicle photos Step 3: Background Check Consent form Submit for review Verification status tracking Verification Status Overall status Step-by-step status (Identity, Vehicle, Background Check) Approval/Rejection reasons Resubmit button if rejected Earnings Total earnings Pending payments (24-48h hold) Completed payments Filter by date Payment history list Withdrawal/payout options Public Dispatcher Profile (viewable by clients) Profile photo Name Bio Rating + reviews Total jobs completed Reviews list Messages/Chat (same as client) Notifications (same as client) Notification Settings (same as client) Support (same as client) My Disputes (same as client) Raise Dispute (same as client) Admin Screens (10+ Screens) Admin Analytics Dashboard KPI cards: Total Users, Active Jobs, Revenue, Disputes Charts: Jobs over time, Revenue over time, User growth Recent activity feed User Management Tabs: All Users, Clients, Dispatchers, Admins Search/filter User cards with: Name, email, type Account status Actions: View, Edit, Shadow Ban, Suspend, Ban User Details (Admin view) Full profile info Activity log Jobs history Reviews received Actions: Shadow Ban, Suspend, Reset Password, Delete Dispatcher Verification Review Pending verifications list Review documents (enlarge images) Approve/Reject per step Add verification notes Final approve/reject Fraud Alerts Alert cards with severity badges Filter by severity, status, type Alert details: User info Alert details Related jobs Investigation notes Actions: Investigate, Resolve, Mark False Positive Dispute Management Disputes list Filter by status, priority Dispute details: All evidence Comments from both parties Resolution options Refund processing Close dispute Support Tickets Tickets list (only with live_agent_requested = true) Filter by status, priority, category Ticket details: Chat interface Assign to admin Change status Add internal notes Resolve/close ticket Rewards Management Rewards list Create/Edit reward: Title, description Points required Discount type/amount Tier required Active toggle Expiry days Delete reward Pricing Rules Rules list Create/Edit rule: Rule name, type Multiplier/fixed amount Time/demand conditions Priority Active toggle Applies to scheduled jobs toggle Delete rule File Management Upload files (images, PDFs) View uploaded files Delete files Generate shareable URLs 🔑 Key Features & Business Logic 1. Dynamic Pricing System Base Price: €33.00 (configurable) Multipliers: Urgency: 1.5x if urgent toggle enabled Location: 1.3x if high-demand area (downtown, airport, business district) Time of Day: Based on PricingRules (e.g., 1.2x during peak hours 5-7 PM) Day of Week: Based on PricingRules (e.g., 1.15x on weekends) Demand Surge: Based on active requests vs. available dispatchers ratio Scheduled Discount: 0.85x for scheduled jobs (15% savings) Calculation: finalPrice = basePrice × urgencyMultiplier × locationMultiplier × timeMultiplier × dayMultiplier × demandMultiplier Price Breakdown Display: Base Price: €33.00 + Urgency (50%): +€16.50 + Location Premium (30%): +€9.90 + Peak Hours (20%): +€6.60 ────────────────────── Subtotal: €66.00 - Reward Discount: -€10.00 ────────────────────── Final Price: €56.00 2. Auto-Dispatch System Triggered When: New job created (pending status) or scheduled job becomes available Assignment Algorithm: Calculate Assignment Score for each verified, online dispatcher: score = (ratingWeight × dispatcherRating) - (distanceWeight × distanceKm) + (availabilityBonus if dispatcher has no active jobs) + (priorityBonus if high-priority job) Rank Dispatchers by score (highest first) Send Job Offer to top dispatcher (60-second timer) Create JobOffer document Send push notification Display in-app notification with countdown If Accepted: Update ServiceRequest: status = "accepted", dispatcher_id, accepted_at Cancel all other pending offers for this job Send notification to client If Rejected/Expired: Mark offer as rejected/expired Send offer to next dispatcher in queue Repeat until job is accepted or all dispatchers exhausted If No Dispatchers Available: Job remains in "pending" status Retry dispatch every 2 minutes Notify client of delay 3. Job Status Workflow Client Initiates: scheduled → Job created for future date/time Becomes available 24 hours before scheduled time Status changes to pending when available pending → Awaiting dispatcher acceptance Dispatcher Actions: 3. accepted → Dispatcher accepted job Client receives notification Chat enabled en_route → Dispatcher traveling to location Real-time GPS tracking starts Client sees live map with ETA arrived → Dispatcher at location Client receives notification Verify location (distance < 100m) in_progress → Job actively being performed Timer started Client can track duration completed → Job finished, completion uploaded Dispatcher uploads photos/video GPS location verified Payment placed on hold (24-48h) Client can review or auto-approve after 48h cancelled → Client or dispatcher cancelled Refund processed (if applicable) 4. Real-Time Location Tracking Implementation: Use Flutter location package or FlutterFlow location widget Update dispatcher location every 10 seconds when status = en_route or arrived Store in ServiceRequest: dispatcher_current_lat, dispatcher_current_lng, dispatcher_location_updated_at Display on client's map with: Dispatcher's current position (blue marker) Job location (red marker) Route polyline ETA calculation Location Verification: When dispatcher marks "arrived", calculate distance between current location and job location If > 100 meters, show warning: "You're not at the job location. Please navigate to the correct address." When completing job, verify completion location matches job location (< 100m) Flag suspicious patterns (fraud monitoring) 5. In-App Chat System Per Job: Messages scoped to request_id Real-time updates using Firestore listeners Support text and image messages Typing indicators Read receipts Unread count badges Chat UI: Message bubbles (left for received, right for sent) Timestamps Sender name/avatar Image gallery lightbox Send button + camera/gallery picker 6. Review System Delayed Application: Reviews submitted immediately but applied = false apply_date = tomorrow's date Background job runs daily at midnight to apply pending reviews where apply_date <= today Recalculate average rating and review count Update DispatcherProfile or ClientProfile Why Delayed?: Prevents instant retaliation reviews Gives time for dispute resolution More fair and balanced system Client Review Categories: Communication Punctuality Car Accuracy Friendliness Payment 7. Loyalty & Rewards System Points Earning: €1 spent = 10 loyalty points Referral bonus: 500 points First job: 200 points Tiers: Bronze: 0-999 points Silver: 1000-2999 points Gold: 3000-5999 points Platinum: 6000+ points Rewards Redemption: Client browses rewards (filtered by current tier) Redeem reward → deduct points, create RewardRedemption with unique discount code Set expiry (e.g., 30 days) When creating request, display active rewards Client selects reward → calculate discount, apply to final price On request creation, link reward_redemption_id, mark redemption as used Reward Types: Percentage discount (e.g., 20% off) Fixed discount (e.g., €5 off) Free service (€33 discount) Priority booking (dispatched first) Special perks (free wax, etc.) 8. Payment Processing Hold Period: 24-48 hours after job completion Auto-Approval: If client doesn't review/dispute within 48 hours, payment auto-approved Update JobCompletion: auto_approved = true, payment_status = completed Release funds to dispatcher Manual Approval: Client reviews job → payment released immediately Update: client_reviewed = true, payment_status = completed Disputes: Payment held indefinitely until dispute resolved Admin decides: full refund, partial refund, release to dispatcher Implementation: Use Stripe, PayPal, or in-app payment provider Store payment methods in ClientProfile (tokenized) Process payment on job completion Handle webhooks for payment status updates 9. Fraud Monitoring Automated Checks: High Volume Short Jobs: If dispatcher completes > 10 jobs in < 2 hours → flag Likely not actually performing service Rapid Earnings Increase: If earnings increase > 200% week-over-week → flag Location Mismatch: If completion location > 500m from job location → flag Fake GPS: Check for GPS spoofing indicators Verify location timestamp consistency Multiple Disputes: If user has > 3 disputes in 30 days → flag Suspicious Completion Pattern: Same completion photos for multiple jobs → flag Same completion time for all jobs (e.g., exactly 30 min) → flag Actions: Create FraudAlert document Notify admins Admin investigates, can: Shadow ban (user sees no jobs, but doesn't know they're banned) Suspend account Permanent ban 10. Dispute Management Raising Dispute: Either client or dispatcher can raise Select reason from predefined list Add detailed description Upload evidence (photos, videos) Creates Dispute document with status "open" Dispute Resolution: Admin reviews evidence Can request additional info (status: awaiting_client_response / awaiting_dispatcher_response) Admin decides resolution: Full refund to client Partial refund No refund, payment released to dispatcher Account warning/suspension Update Dispute status to resolved Process refund/payment release Notify both parties Auto-Escalation: If no admin response within 72 hours, status = "escalated" High-priority alerts sent to admins 11. Verification System (Dispatchers) 3-Step Process: Step 1: Identity Verification Upload passport or national ID (front + back) Upload driver's license Admin reviews documents Checks for: Valid, non-expired documents Name matches account Photo matches selfie (optional: use facial recognition API) Approve/Reject with notes Step 2: Vehicle Verification Enter vehicle details (make, model, year, color, plate) Upload registration document Upload insurance proof (must be current) Upload vehicle photos (4 sides) Admin reviews Checks for: Valid registration and insurance Vehicle matches description No damage/unsafe conditions Approve/Reject with notes Step 3: Background Check Dispatcher gives consent Integrate with background check API (e.g., Checkr, Onfido) Check for: Criminal record Driving violations Sex offender registry Auto-approve if clean, manual review if flags Approve/Reject with notes Final Verification: All 3 steps approved → verification_status = "verified" Dispatcher can now accept jobs If any step rejected → verification_status = "rejected" Dispatcher can resubmit corrected documents 12. Scheduled Jobs Client Scheduling: Toggle "Schedule for Later" Select date (today or future, up to 30 days) Select time (7 AM - 9 PM, 30-min slots) Price shows scheduled discount (15% off) Availability Logic: scheduled_datetime = selected date/time becomes_available_at = scheduled_datetime - 24 hours Status = "scheduled" until becomes_available_at At becomes_available_at: Background job checks for scheduled jobs Status changes to "pending" Auto-dispatch triggered Dispatcher View: Scheduled jobs shown in "Scheduled" tab with future date/time Higher priority in feed as scheduled time approaches Can accept up to 24 hours before scheduled time 13. AI-Powered Support Implementation: Integrate AI API (OpenAI GPT, Claude, or custom trained model) AI handles common questions: "How do I cancel a job?" "Where's my payment?" "How to change my car details?" "What if dispatcher doesn't show?" AI Chat Flow: User creates support ticket, selects category AI responds immediately with relevant help Conversation continues with AI If AI can't resolve (low confidence or user requests human): "Request Live Agent" button appears User clicks → live_agent_requested = true Ticket appears in admin panel Admin joins chat and takes over AI Confidence Scoring: AI returns confidence score (0-1) with each response If confidence < 0.6, set requires_human = true Proactively offer live agent 14. Notification System Types: In-app notifications (Firebase Firestore listeners) Push notifications (Firebase Cloud Messaging) Email notifications (optional, via SendGrid/Mailgun) Notification Events: For Clients: Job accepted Dispatcher en route Dispatcher arrived Job started Job completed (with review reminder) New message Review received Dispute update Rewards earned For Dispatchers: New job offer (60-second timer) Job cancelled by client New message Review received Verification status update Payment processed Fraud alert Notification Preferences: User can toggle each notification type Enable/disable push, email Quiet hours (e.g., 10 PM - 8 AM, no notifications) Do Not Disturb mode (mute all temporarily) Implementation: Store preferences in NotificationPreferences collection Check preferences before sending notification Use Firebase Cloud Functions to send push notifications Display in-app using NotificationListener widget 15. Shadow Banning Purpose: Stealth ban for suspected fraud without alerting user How It Works: Admin sets account_status = shadow_banned User can still login and use app BUT: Dispatchers: See no available jobs (empty feed) Clients: Requests receive no offers, eventually timeout User doesn't know they're banned Use Cases: Suspected fraud, pending investigation Multiple fraud alerts Pattern of poor behavior not severe enough for full ban Admin Actions: View shadow banned users Add shadow ban reason (internal note) Lift shadow ban or escalate to suspension/ban 🎨 UI/UX Design Guidelines Color Scheme Primary Navy: #0B132B Primary Purple: #6C63FF Accent Cyan: #4ECDC4 Accent Lilac: #B8A4FF Accent Blue: #5DADE2 Background Dark: #0B132B to #1a1f3a gradient Card Background: rgba(255,255,255,0.05) with blur Text Primary: #FFFFFF Text Secondary: #B0B8D4 Success: #10B981 Warning: #F59E0B Error: #EF4444 Typography Font: Inter (or system default: Roboto/SF Pro) Headings: Bold, 24-32px Body: Regular, 14-16px Small: 12px Components Glass Card: Background: rgba(255,255,255,0.05) Backdrop blur: 20px Border: 1px rgba(255,255,255,0.1) Border radius: 24px Hover: slight scale up, shadow Buttons: Primary: Gradient (Purple to Lilac), rounded 16px, shadow Secondary: Outline, white/10 border Icon buttons: Circular, 48px, glassmorphic Input Fields: Background: rgba(255,255,255,0.05) Border: 1px rgba(255,255,255,0.1) Rounded: 16px Focus: border color to Accent Cyan Status Badges: Pending: Yellow Accepted: Blue En Route: Purple In Progress: Purple Completed: Green Cancelled: Red Navigation: Bottom tab bar (client/dispatcher) Sidebar (admin) Icons from Lucide or Material Icons Animations Fade in on screen load Slide up for cards Smooth transitions between screens Skeleton loaders while fetching data Pull-to-refresh on lists Responsive Design Mobile-first (iOS & Android) Support tablet layouts (side-by-side panels) Landscape mode support Adaptive text sizes 🔌 Backend/API Requirements Firebase Setup Authentication: Email/Password, Phone Auth (SMS) Firestore Database: All collections listed above Cloud Storage: For images, videos, documents Cloud Functions: Background tasks (auto-dispatch, review application, scheduled job activation, fraud monitoring, cleanup) Cloud Messaging: Push notifications Cloud Functions (Node.js/TypeScript) 1. Auto-Dispatch Function exports.autoDispatchJob = functions.firestore .document('ServiceRequests/{requestId}') .onCreate(async (snap, context) => { const job = snap.data(); if (job.status === 'pending') { await dispatchJobToDispatchers(job); } }); 2. Apply Reviews (Daily Cron) exports.applyPendingReviews = functions.pubsub .schedule('every day 00:00') .onRun(async (context) => { const today = new Date().toISOString().split('T')[0]; const reviews = await getReviewsToApply(today); for (const review of reviews) { await applyReviewToProfile(review); } }); 3. Scheduled Job Activator (Runs every 5 minutes) exports.activateScheduledJobs = functions.pubsub .schedule('every 5 minutes') .onRun(async (context) => { const now = new Date(); const jobs = await getScheduledJobsDue(now); for (const job of jobs) { await updateJobStatus(job.id, 'pending'); await dispatchJobToDispatchers(job); } }); 4. Auto-Approve Completions (Runs hourly) exports.autoApproveCompletions = functions.pubsub .schedule('every 1 hours') .onRun(async (context) => { const now = new Date(); const completions = await getCompletionsDueForApproval(now); for (const completion of completions) { await approveCompletion(completion.id); await releasePayment(completion); } }); 5. Fraud Monitoring (Runs every hour) exports.monitorFraud = functions.pubsub .schedule('every 1 hours') .onRun(async (context) => { await checkHighVolumeShortJobs(); await checkLocationMismatches(); await checkSuspiciousPatterns(); }); 6. Support Ticket Cleanup (Daily) exports.cleanupExpiredTickets = functions.pubsub .schedule('every day 00:00') .onRun(async (context) => { const now = new Date(); const expired = await getExpiredTickets(now); for (const ticket of expired) { await deleteTicket(ticket.id); await deleteRelatedMessages(ticket.id); } }); 7. Send Notifications exports.sendNotification = functions.firestore .document('JobNotifications/{notificationId}') .onCreate(async (snap, context) => { const notification = snap.data(); const user = await getUser(notification.user_id); const prefs = await getNotificationPrefs(user.id); if (shouldSendNotification(notification, prefs)) { await sendPushNotification(user.fcm_token, notification); if (prefs.email_notifications) { await sendEmailNotification(user.email, notification); } } }); External APIs 1. Google Maps API: Places Autocomplete (address input) Geocoding (lat/lng from address) Directions (route polyline, ETA) Distance Matrix (calculate distance between points) 2. Payment Gateway (Stripe recommended): Setup: Create Stripe account, get API keys Add payment method (tokenized) Charge on job completion Refund for disputes Payout to dispatcher bank accounts 3. SMS Provider (Twilio): Send verification codes for phone numbers SMS notifications (optional) 4. Email Provider (SendGrid/Mailgun): Send verification emails Notification emails Password reset emails 5. Background Check API (Checkr/Onfido): Dispatcher verification Criminal record check Driving history 6. AI API (OpenAI/Claude): Support chat responses Content moderation (review comments) 7. Image Optimization (Cloudinary/imgix): Compress uploaded images Generate thumbnails Lazy loading 📋 Development Checklist Phase 1: Core Setup (Week 1-2) Firebase project setup (Auth, Firestore, Storage, Functions, Messaging) FlutterFlow project creation Define all Firestore collections with security rules Setup authentication flows (email, phone) Design system: colors, typography, components Phase 2: Authentication & Onboarding (Week 3-4) Login/Signup screens Email verification flow Phone number setup + SMS verification Welcome tutorial (swipeable intro) Onboarding tutorial (service flow) User type selection Client profile setup Dispatcher profile setup (basic info) Phase 3: Client Features (Week 5-7) Client dashboard Create request screen (map, photos, pricing) Dynamic pricing logic My requests list Job details screen (client view) Chat/messaging Review dispatcher Client profile management Rewards & redemption Job history Phase 4: Dispatcher Features (Week 8-10) Dispatcher verification flow (3 steps) Admin verification review panel Dispatcher dashboard Available jobs feed with filters Job offer notifications (60s timer) My jobs list Job details screen (dispatcher view) Job status updates (en route, arrived, started) Live location tracking Complete job (photos, video, GPS) Review client Dispatcher profile Earnings tracking Phase 5: Auto-Dispatch & Scheduling (Week 11) Auto-dispatch Cloud Function Assignment algorithm JobOffer creation and expiry Scheduled jobs logic Scheduled job activation (cron) Notification system integration Phase 6: Payments (Week 12) Stripe integration Add payment method Charge on job completion Payment hold period (24-48h) Auto-approval after 48h Manual approval on review Refund processing Dispatcher payouts Phase 7: Admin Panel (Week 13-14) Admin analytics dashboard User management (list, view, edit, ban) Fraud alerts management Dispute management & resolution Support tickets (live agent) Rewards management (CRUD) Pricing rules management (CRUD) File management Phase 8: Disputes & Support (Week 15) Raise dispute flow (both sides) Dispute details & comments AI-powered support chat Live agent handoff Support ticket lifecycle Auto-cleanup expired tickets Phase 9: Reviews & Ratings (Week 16) Review submission (delayed application) Apply pending reviews (daily cron) Rating recalculation Public dispatcher profiles with reviews Client reviews from dispatchers Phase 10: Fraud & Security (Week 17) Fraud monitoring Cloud Function Location verification Shadow banning logic Fraud alert creation Admin investigation tools Phase 11: Notifications (Week 18) Push notification setup (FCM) In-app notifications Email notifications Notification preferences screen Quiet hours & Do Not Disturb Phase 12: Polish & Testing (Week 19-20) UI/UX refinements Animations & transitions Error handling & validation Loading states & skeleton loaders Empty states Integration testing User acceptance testing Performance optimization Security audit Phase 13: Launch (Week 21) App Store submission (iOS) Google Play submission (Android) Marketing website Terms of Service & Privacy Policy Customer support setup Monitoring & analytics (Firebase Analytics, Crashlytics) Soft launch (beta testers) Full public launch 🚀 Post-Launch Roadmap Version 1.1 (Month 2-3) Referral program In-app wallet (prepaid credits) Multiple payment methods Service packages (monthly subscriptions) Push notification improvements Performance monitoring dashboard Version 1.2 (Month 4-5) Dispatcher teams (multiple dispatchers per job) Advanced scheduling (recurring jobs) Service add-ons (wax, interior cleaning, etc.) Dynamic service area maps Dispatcher earnings insights Client spending insights Version 2.0 (Month 6-8) Corporate accounts (businesses with fleets) API for third-party integrations White-label solution Multi-language support Multi-currency support International expansion 🔒 Security Considerations Data Encryption: All data in transit: HTTPS/TLS Sensitive data at rest: Firestore encryption Payment data: Never store raw card details, use tokenization Authentication: Firebase Auth with email/password Phone verification via SMS (Twilio) Email verification for account activation Session management with secure tokens Authorization: Firestore Security Rules for all collections User can only access their own data Admin role checking for admin panels Read-only vs. write permissions Input Validation: Sanitize all user inputs Validate email, phone formats Image upload restrictions (file type, size) XSS prevention Privacy: GDPR compliance (data export, deletion) Terms of Service & Privacy Policy User consent for data collection Anonymize analytics data Fraud Prevention: Location verification (GPS spoofing detection) Automated fraud monitoring Manual admin review for suspicious activity Rate limiting (API calls, job creation) 📊 Key Metrics to Track User Metrics: Total users (clients, dispatchers) Active users (DAU, MAU) User retention rate Churn rate Job Metrics: Total jobs created Jobs completed Average job completion time Job acceptance rate Job cancellation rate Financial Metrics: Total revenue Average job price Payment success rate Refund rate Dispatcher earnings Quality Metrics: Average client rating Average dispatcher rating Dispute rate Fraud alert rate Response time (support, disputes) Engagement Metrics: App opens per user Session duration Feature usage (chat, rewards, scheduling)"> (URLs)", "phone_number": "string", "profile_image_url": "string", "payment_method": "string", "card_last_four": "string", "billing_address": "string", "client_rating": "double (default: 5.0, range: 1-5)", "total_requests": "int (default: 0)", "client_reviews_count": "int (default: 0)", "loyalty_points": "int (default: 0)", "loyalty_tier": "enum (bronze, silver, gold, platinum)", "total_points_earned": "int (default: 0)", "created_date": "timestamp", "updated_date": "timestamp" } DispatcherProfiles Collection { "id": "string (auto)", "user_id": "string (ref: Users)", "phone_number": "string", "profile_image_url": "string", "passport_verified": "bool (default: false)", "passport_image_url": "string", "drivers_license_url": "string", "verification_status": "enum (pending, under_review, verified, rejected)", "identity_verification_status": "enum (pending, approved, rejected)", "vehicle_verification_status": "enum (pending, approved, rejected)", "background_check_status": "enum (pending, approved, rejected)", "vehicle_make_model": "string", "vehicle_year": "string", "vehicle_color": "string", "vehicle_license_plate": "string", "vehicle_registration_url": "string", "vehicle_insurance_url": "string", "vehicle_images": "array", "background_check_consent": "bool", "background_check_consent_date": "timestamp", "verification_notes": "string (admin only)", "verification_submitted_date": "timestamp", "verification_completed_date": "timestamp", "rejection_reason": "string", "rating": "double (default: 5.0)", "total_jobs": "int (default: 0)", "total_reviews": "int (default: 0)", "bank_details": "string (encrypted)", "bio": "string", "created_date": "timestamp", "updated_date": "timestamp" } ServiceRequests Collection { "id": "string (auto)", "client_id": "string (ref: Users)", "client_name": "string", "client_rating": "double", "car_model": "string", "license_plate": "string", "location_address": "string", "location_lat": "double", "location_lng": "double", "car_location_images": "array", "status": "enum (scheduled, pending, accepted, en_route, arrived, in_progress, completed, cancelled)", "is_scheduled": "bool (default: false)", "scheduled_date": "string (YYYY-MM-DD)", "scheduled_time": "string (HH:MM)", "scheduled_datetime": "timestamp", "becomes_available_at": "timestamp (24h before scheduled)", "dispatcher_id": "string (ref: Users)", "dispatcher_name": "string", "dispatcher_current_lat": "double", "dispatcher_current_lng": "double", "dispatcher_location_updated_at": "timestamp", "accepted_at": "timestamp", "en_route_at": "timestamp", "arrived_at": "timestamp", "started_at": "timestamp", "completed_at": "timestamp", "estimated_arrival_time": "timestamp", "estimated_duration_minutes": "int (default: 30)", "base_price": "double (default: 33.00 EUR)", "price": "double", "reward_applied": "bool", "reward_redemption_id": "string", "reward_discount": "double", "final_price": "double", "is_urgent": "bool", "urgency_multiplier": "double (1.0 - 1.5)", "location_multiplier": "double (1.0 - 1.3)", "priority_score": "double (calculated)", "notes": "string", "client_notified_accepted": "bool", "client_notified_en_route": "bool", "client_notified_arrived": "bool", "client_notified_started": "bool", "client_notified_completed": "bool", "created_date": "timestamp", "updated_date": "timestamp" } JobCompletions Collection { "id": "string (auto)", "request_id": "string (ref: ServiceRequests)", "dispatcher_id": "string", "client_id": "string", "completion_images": "array (4+ photos required)", "completion_video_url": "string", "completed_at": "timestamp", "completion_location_lat": "double", "completion_location_lng": "double", "location_verified": "bool", "location_distance_meters": "double", "payment_status": "enum (pending_review, processing, completed, disputed)", "payment_release_time": "timestamp", "auto_approve_at": "timestamp (48h after completion)", "client_reviewed": "bool", "client_reviewed_at": "timestamp", "auto_approved": "bool", "amount": "double", "created_date": "timestamp" } Reviews Collection (Dispatcher Reviews) { "id": "string (auto)", "request_id": "string", "reviewer_id": "string (client)", "reviewee_id": "string (dispatcher)", "reviewer_type": "enum (client, dispatcher)", "rating": "int (1-5)", "comment": "string", "applied": "bool (default: false)", "apply_date": "date (next day)", "created_date": "timestamp" } ClientReviews Collection (Client Reviews) { "id": "string (auto)", "request_id": "string", "reviewer_id": "string (dispatcher)", "reviewee_id": "string (client)", "reviewer_name": "string", "rating": "int (1-5)", "comment": "string", "applied": "bool", "apply_date": "date", "verified_service": "bool (default: true)", "service_categories": "array (communication, punctuality, etc.)", "created_date": "timestamp" } Messages Collection { "id": "string (auto)", "request_id": "string", "sender_id": "string", "sender_name": "string", "sender_type": "enum (client, dispatcher)", "message": "string", "message_type": "enum (text, image)", "image_url": "string", "read": "bool", "read_at": "timestamp", "delivered": "bool", "delivered_at": "timestamp", "created_date": "timestamp" } JobOffers Collection { "id": "string (auto)", "request_id": "string", "dispatcher_id": "string", "dispatcher_name": "string", "offer_status": "enum (pending, accepted, rejected, expired)", "offered_at": "timestamp", "expires_at": "timestamp (60 seconds)", "responded_at": "timestamp", "assignment_score": "double", "distance_km": "double", "job_details": "map (cached job info)", "rejection_reason": "string" } Rewards Collection { "id": "string (auto)", "title": "string", "description": "string", "points_required": "int", "discount_percentage": "double", "discount_amount": "double", "reward_type": "enum (percentage_discount, fixed_discount, free_service, priority_booking, special_perk)", "tier_required": "enum (bronze, silver, gold, platinum)", "is_active": "bool", "icon": "string", "expiry_days": "int (default: 30)" } RewardRedemptions Collection { "id": "string (auto)", "client_id": "string", "reward_id": "string", "reward_title": "string", "points_spent": "int", "discount_code": "string (unique)", "status": "enum (active, used, expired)", "expires_at": "timestamp", "used_at": "timestamp", "used_on_request_id": "string", "discount_amount": "double", "created_date": "timestamp" } Disputes Collection { "id": "string (auto)", "request_id": "string", "job_completion_id": "string", "client_id": "string", "dispatcher_id": "string", "raised_by_user_id": "string", "raised_by_name": "string", "raised_by_type": "enum (client, dispatcher)", "dispute_reason": "enum (service_quality, did_not_arrive, damage_claim, payment_issue, miscommunication, incomplete_service, pricing_dispute, behavior_issue, other)", "description": "string", "evidence_urls": "array", "status": "enum (open, under_review, awaiting_client_response, awaiting_dispatcher_response, resolved_client_favor, resolved_dispatcher_favor, resolved_mutual, escalated, closed)", "priority": "enum (low, medium, high, critical)", "opened_at": "timestamp", "resolved_at": "timestamp", "resolved_by_user_id": "string", "resolved_by_name": "string", "resolution_details": "string", "resolution_action": "enum (full_refund, partial_refund, no_refund, payment_released, payment_held, account_warning, account_suspended, other)", "refund_amount": "double", "admin_notes": "string", "last_activity_at": "timestamp" } DisputeComments Collection { "id": "string (auto)", "dispute_id": "string", "user_id": "string", "user_name": "string", "user_type": "enum (client, dispatcher, admin)", "comment": "string", "attachments": "array", "is_internal": "bool (admin notes)", "created_date": "timestamp" } FraudAlerts Collection { "id": "string (auto)", "user_id": "string", "user_type": "enum (client, dispatcher)", "alert_type": "enum (high_volume_short_jobs, rapid_earnings_increase, location_mismatch, multiple_disputes, suspicious_completion_pattern, rapid_cancellations, fake_gps)", "severity": "enum (low, medium, high, critical)", "alert_details": "map", "status": "enum (active, investigating, resolved, false_positive)", "reviewed_by": "string", "resolution_notes": "string", "related_jobs": "array", "created_date": "timestamp" } PricingRules Collection { "id": "string (auto)", "rule_name": "string", "rule_type": "enum (time_of_day, day_of_week, demand_surge, dispatcher_availability, location_premium, service_type)", "is_active": "bool", "multiplier": "double", "fixed_amount": "double", "time_conditions": "map", "demand_conditions": "map", "priority": "int", "description": "string", "applies_to_scheduled": "bool" } SupportTickets Collection { "id": "string (auto)", "user_id": "string", "user_name": "string", "user_email": "string", "user_type": "enum (client, dispatcher, both)", "subject": "string", "category": "enum (technical_issue, payment_issue, account_issue, service_quality, feature_request, other)", "priority": "enum (low, medium, high, urgent)", "status": "enum (open, in_progress, waiting_user, waiting_admin, resolved, closed)", "live_agent_requested": "bool", "assigned_to": "string", "assigned_to_name": "string", "last_message_at": "timestamp", "resolved_at": "timestamp", "closed_at": "timestamp", "expires_at": "timestamp (10 days after close)", "ai_handled": "bool", "satisfaction_rating": "int (1-5)", "tags": "array", "created_date": "timestamp" } SupportMessages Collection { "id": "string (auto)", "ticket_id": "string", "sender_id": "string", "sender_name": "string", "sender_type": "enum (user, admin, ai)", "message": "string", "message_type": "enum (text, image, file)", "attachment_url": "string", "read": "bool", "read_at": "timestamp", "ai_generated": "bool", "ai_confidence": "double", "requires_human": "bool", "created_date": "timestamp" } NotificationPreferences Collection { "id": "string (user_id)", "user_id": "string", "job_accepted": "bool (default: true)", "dispatcher_en_route": "bool (default: true)", "dispatcher_arrived": "bool (default: true)", "job_started": "bool (default: true)", "job_completed": "bool (default: true)", "new_job_offer": "bool (default: true)", "new_message": "bool (default: true)", "support_reply": "bool (default: true)", "dispute_update": "bool (default: true)", "dispute_resolved": "bool (default: true)", "verification_update": "bool (default: true)", "payment_processed": "bool (default: true)", "review_received": "bool (default: true)", "fraud_alert": "bool (default: true)", "rewards_earned": "bool (default: true)", "scheduled_job_reminder": "bool (default: true)", "email_notifications": "bool (default: false)", "push_notifications": "bool (default: true)", "sound_enabled": "bool (default: true)", "do_not_disturb": "bool (default: false)", "quiet_hours_enabled": "bool (default: false)", "quiet_hours_start": "string (HH:MM)", "quiet_hours_end": "string (HH:MM)" } 📱 User Flow & Pages Authentication & Onboarding Flow Splash/Loading Screen → Check authentication status Login/Signup → Firebase Auth (email/password) Email Verification → Send verification code, verify Phone Number Setup → Country picker, phone input, SMS verification Welcome Tutorial → Swipeable intro screens (3-4 slides) Onboarding Tutorial → Service flow explanation User Type Selection → Choose Client, Dispatcher, or Both Profile Setup: Client: Car details, photos, license plate Dispatcher: Vehicle info, documents upload, background check consent Dashboard → Navigate to appropriate dashboard Client Screens (20+ Screens) Main Navigation: Client Dashboard Stats cards: Scheduled, Pending, Active, Completed jobs Loyalty points widget Recent requests list "New Request" FAB button Create Request Car info (pre-filled from profile) Interactive map with pin location Address input with autocomplete Upload car location photos (min 1, max 4) Urgent toggle (1.5x price multiplier) Schedule for later toggle Date picker Time picker (7 AM - 9 PM, 30-min intervals) Notes/special instructions Apply reward (if available) Dynamic price display with breakdown Submit button My Requests Tabs: All, Active, Completed, Needs Review Request cards with: Car model, license plate Location Status badge Price Dispatcher (if assigned) Actions: View Details, Review, Cancel Job Details (Client view) Service info Status timeline Live tracking map (when dispatcher en route/arrived) Chat button Dispatcher info (when assigned) Cancel button (if pending) Raise dispute button (if needed) Review button (if completed) Review Dispatcher Star rating (1-5) Comment field Submit review Skip option Client Profile Profile photo Personal info (name, email, phone) Car details (editable) Car photos Payment methods Edit button Messages/Chat List of active conversations Unread badge Navigate to ChatBox per job Rewards Loyalty points balance Current tier (Bronze/Silver/Gold/Platinum) Available rewards grid Redeem button → generates discount code My redeemed rewards list (Active/Used/Expired) Job History Completed jobs list Filter by date range Total spent stats My Disputes List of disputes Status filters Open dispute details Notifications List of all notifications Mark as read Navigate to related screens Notification Settings Toggle preferences for each notification type Quiet hours configuration Do Not Disturb mode Support AI-powered chat interface Category selection Upload attachments Request live agent button Raise Dispute Select reason Description Upload evidence (photos/videos) Submit Dispute Details Dispute info Status Comments thread Add comment with attachments Dispatcher Screens (20+ Screens) Main Navigation: Dispatcher Dashboard Stats: Rating, Active Jobs, Completed Jobs, Total Earnings Verification status banner Quick actions: Browse Jobs, View Earnings AI Assistant button Available Jobs Tabs: Priority, Scheduled, Highest Pay, Most Recent Job count badges Job cards with: Car model/plate Client name + online status indicator Location Price Urgent/Scheduled/Priority badges Distance from dispatcher Accept button Real-time updates (every 5 seconds) Job offer notifications (60-second countdown) Job Offer Notification (Modal/Bottom Sheet) Job details preview 60-second countdown timer Accept button (green, prominent) Reject button Auto-expire when time runs out My Jobs Tabs: Active, Completed Active jobs: Status badges Navigate to job details Completed jobs: Earnings displayed Review client button Job Details (Dispatcher view) Job info Client info Status action buttons: "En Route" → Updates status, starts location tracking "I've Arrived" → Updates status "Start Job" → Updates status, starts timer "Complete Job" → Navigate to completion flow Live tracking map Chat button Cancel/Dispute buttons Complete Job Screen Upload completion photos (min 4: front, back, left, right) Optional: Upload video walkthrough GPS location verification Submit completion Auto-payment processing notification Review Client Star rating Comment Service categories checkboxes Submit Dispatcher Profile Profile photo Bio Rating + review count Vehicle info Verification status Bank details (for payouts) Edit button Dispatcher Verification Step 1: Identity Verification Upload passport/national ID Upload driver's license Step 2: Vehicle Documentation Vehicle details form Upload registration Upload insurance Upload vehicle photos Step 3: Background Check Consent form Submit for review Verification status tracking Verification Status Overall status Step-by-step status (Identity, Vehicle, Background Check) Approval/Rejection reasons Resubmit button if rejected Earnings Total earnings Pending payments (24-48h hold) Completed payments Filter by date Payment history list Withdrawal/payout options Public Dispatcher Profile (viewable by clients) Profile photo Name Bio Rating + reviews Total jobs completed Reviews list Messages/Chat (same as client) Notifications (same as client) Notification Settings (same as client) Support (same as client) My Disputes (same as client) Raise Dispute (same as client) Admin Screens (10+ Screens) Admin Analytics Dashboard KPI cards: Total Users, Active Jobs, Revenue, Disputes Charts: Jobs over time, Revenue over time, User growth Recent activity feed User Management Tabs: All Users, Clients, Dispatchers, Admins Search/filter User cards with: Name, email, type Account status Actions: View, Edit, Shadow Ban, Suspend, Ban User Details (Admin view) Full profile info Activity log Jobs history Reviews received Actions: Shadow Ban, Suspend, Reset Password, Delete Dispatcher Verification Review Pending verifications list Review documents (enlarge images) Approve/Reject per step Add verification notes Final approve/reject Fraud Alerts Alert cards with severity badges Filter by severity, status, type Alert details: User info Alert details Related jobs Investigation notes Actions: Investigate, Resolve, Mark False Positive Dispute Management Disputes list Filter by status, priority Dispute details: All evidence Comments from both parties Resolution options Refund processing Close dispute Support Tickets Tickets list (only with live_agent_requested = true) Filter by status, priority, category Ticket details: Chat interface Assign to admin Change status Add internal notes Resolve/close ticket Rewards Management Rewards list Create/Edit reward: Title, description Points required Discount type/amount Tier required Active toggle Expiry days Delete reward Pricing Rules Rules list Create/Edit rule: Rule name, type Multiplier/fixed amount Time/demand conditions Priority Active toggle Applies to scheduled jobs toggle Delete rule File Management Upload files (images, PDFs) View uploaded files Delete files Generate shareable URLs 🔑 Key Features & Business Logic 1. Dynamic Pricing System Base Price: €33.00 (configurable) Multipliers: Urgency: 1.5x if urgent toggle enabled Location: 1.3x if high-demand area (downtown, airport, business district) Time of Day: Based on PricingRules (e.g., 1.2x during peak hours 5-7 PM) Day of Week: Based on PricingRules (e.g., 1.15x on weekends) Demand Surge: Based on active requests vs. available dispatchers ratio Scheduled Discount: 0.85x for scheduled jobs (15% savings) Calculation: finalPrice = basePrice × urgencyMultiplier × locationMultiplier × timeMultiplier × dayMultiplier × demandMultiplier Price Breakdown Display: Base Price: €33.00 + Urgency (50%): +€16.50 + Location Premium (30%): +€9.90 + Peak Hours (20%): +€6.60 ────────────────────── Subtotal: €66.00 - Reward Discount: -€10.00 ────────────────────── Final Price: €56.00 2. Auto-Dispatch System Triggered When: New job created (pending status) or scheduled job becomes available Assignment Algorithm: Calculate Assignment Score for each verified, online dispatcher: score = (ratingWeight × dispatcherRating) - (distanceWeight × distanceKm) + (availabilityBonus if dispatcher has no active jobs) + (priorityBonus if high-priority job) Rank Dispatchers by score (highest first) Send Job Offer to top dispatcher (60-second timer) Create JobOffer document Send push notification Display in-app notification with countdown If Accepted: Update ServiceRequest: status = "accepted", dispatcher_id, accepted_at Cancel all other pending offers for this job Send notification to client If Rejected/Expired: Mark offer as rejected/expired Send offer to next dispatcher in queue Repeat until job is accepted or all dispatchers exhausted If No Dispatchers Available: Job remains in "pending" status Retry dispatch every 2 minutes Notify client of delay 3. Job Status Workflow Client Initiates: scheduled → Job created for future date/time Becomes available 24 hours before scheduled time Status changes to pending when available pending → Awaiting dispatcher acceptance Dispatcher Actions: 3. accepted → Dispatcher accepted job Client receives notification Chat enabled en_route → Dispatcher traveling to location Real-time GPS tracking starts Client sees live map with ETA arrived → Dispatcher at location Client receives notification Verify location (distance < 100m) in_progress → Job actively being performed Timer started Client can track duration completed → Job finished, completion uploaded Dispatcher uploads photos/video GPS location verified Payment placed on hold (24-48h) Client can review or auto-approve after 48h cancelled → Client or dispatcher cancelled Refund processed (if applicable) 4. Real-Time Location Tracking Implementation: Use Flutter location package or FlutterFlow location widget Update dispatcher location every 10 seconds when status = en_route or arrived Store in ServiceRequest: dispatcher_current_lat, dispatcher_current_lng, dispatcher_location_updated_at Display on client's map with: Dispatcher's current position (blue marker) Job location (red marker) Route polyline ETA calculation Location Verification: When dispatcher marks "arrived", calculate distance between current location and job location If > 100 meters, show warning: "You're not at the job location. Please navigate to the correct address." When completing job, verify completion location matches job location (< 100m) Flag suspicious patterns (fraud monitoring) 5. In-App Chat System Per Job: Messages scoped to request_id Real-time updates using Firestore listeners Support text and image messages Typing indicators Read receipts Unread count badges Chat UI: Message bubbles (left for received, right for sent) Timestamps Sender name/avatar Image gallery lightbox Send button + camera/gallery picker 6. Review System Delayed Application: Reviews submitted immediately but applied = false apply_date = tomorrow's date Background job runs daily at midnight to apply pending reviews where apply_date <= today Recalculate average rating and review count Update DispatcherProfile or ClientProfile Why Delayed?: Prevents instant retaliation reviews Gives time for dispute resolution More fair and balanced system Client Review Categories: Communication Punctuality Car Accuracy Friendliness Payment 7. Loyalty & Rewards System Points Earning: €1 spent = 10 loyalty points Referral bonus: 500 points First job: 200 points Tiers: Bronze: 0-999 points Silver: 1000-2999 points Gold: 3000-5999 points Platinum: 6000+ points Rewards Redemption: Client browses rewards (filtered by current tier) Redeem reward → deduct points, create RewardRedemption with unique discount code Set expiry (e.g., 30 days) When creating request, display active rewards Client selects reward → calculate discount, apply to final price On request creation, link reward_redemption_id, mark redemption as used Reward Types: Percentage discount (e.g., 20% off) Fixed discount (e.g., €5 off) Free service (€33 discount) Priority booking (dispatched first) Special perks (free wax, etc.) 8. Payment Processing Hold Period: 24-48 hours after job completion Auto-Approval: If client doesn't review/dispute within 48 hours, payment auto-approved Update JobCompletion: auto_approved = true, payment_status = completed Release funds to dispatcher Manual Approval: Client reviews job → payment released immediately Update: client_reviewed = true, payment_status = completed Disputes: Payment held indefinitely until dispute resolved Admin decides: full refund, partial refund, release to dispatcher Implementation: Use Stripe, PayPal, or in-app payment provider Store payment methods in ClientProfile (tokenized) Process payment on job completion Handle webhooks for payment status updates 9. Fraud Monitoring Automated Checks: High Volume Short Jobs: If dispatcher completes > 10 jobs in < 2 hours → flag Likely not actually performing service Rapid Earnings Increase: If earnings increase > 200% week-over-week → flag Location Mismatch: If completion location > 500m from job location → flag Fake GPS: Check for GPS spoofing indicators Verify location timestamp consistency Multiple Disputes: If user has > 3 disputes in 30 days → flag Suspicious Completion Pattern: Same completion photos for multiple jobs → flag Same completion time for all jobs (e.g., exactly 30 min) → flag Actions: Create FraudAlert document Notify admins Admin investigates, can: Shadow ban (user sees no jobs, but doesn't know they're banned) Suspend account Permanent ban 10. Dispute Management Raising Dispute: Either client or dispatcher can raise Select reason from predefined list Add detailed description Upload evidence (photos, videos) Creates Dispute document with status "open" Dispute Resolution: Admin reviews evidence Can request additional info (status: awaiting_client_response / awaiting_dispatcher_response) Admin decides resolution: Full refund to client Partial refund No refund, payment released to dispatcher Account warning/suspension Update Dispute status to resolved Process refund/payment release Notify both parties Auto-Escalation: If no admin response within 72 hours, status = "escalated" High-priority alerts sent to admins 11. Verification System (Dispatchers) 3-Step Process: Step 1: Identity Verification Upload passport or national ID (front + back) Upload driver's license Admin reviews documents Checks for: Valid, non-expired documents Name matches account Photo matches selfie (optional: use facial recognition API) Approve/Reject with notes Step 2: Vehicle Verification Enter vehicle details (make, model, year, color, plate) Upload registration document Upload insurance proof (must be current) Upload vehicle photos (4 sides) Admin reviews Checks for: Valid registration and insurance Vehicle matches description No damage/unsafe conditions Approve/Reject with notes Step 3: Background Check Dispatcher gives consent Integrate with background check API (e.g., Checkr, Onfido) Check for: Criminal record Driving violations Sex offender registry Auto-approve if clean, manual review if flags Approve/Reject with notes Final Verification: All 3 steps approved → verification_status = "verified" Dispatcher can now accept jobs If any step rejected → verification_status = "rejected" Dispatcher can resubmit corrected documents 12. Scheduled Jobs Client Scheduling: Toggle "Schedule for Later" Select date (today or future, up to 30 days) Select time (7 AM - 9 PM, 30-min slots) Price shows scheduled discount (15% off) Availability Logic: scheduled_datetime = selected date/time becomes_available_at = scheduled_datetime - 24 hours Status = "scheduled" until becomes_available_at At becomes_available_at: Background job checks for scheduled jobs Status changes to "pending" Auto-dispatch triggered Dispatcher View: Scheduled jobs shown in "Scheduled" tab with future date/time Higher priority in feed as scheduled time approaches Can accept up to 24 hours before scheduled time 13. AI-Powered Support Implementation: Integrate AI API (OpenAI GPT, Claude, or custom trained model) AI handles common questions: "How do I cancel a job?" "Where's my payment?" "How to change my car details?" "What if dispatcher doesn't show?" AI Chat Flow: User creates support ticket, selects category AI responds immediately with relevant help Conversation continues with AI If AI can't resolve (low confidence or user requests human): "Request Live Agent" button appears User clicks → live_agent_requested = true Ticket appears in admin panel Admin joins chat and takes over AI Confidence Scoring: AI returns confidence score (0-1) with each response If confidence < 0.6, set requires_human = true Proactively offer live agent 14. Notification System Types: In-app notifications (Firebase Firestore listeners) Push notifications (Firebase Cloud Messaging) Email notifications (optional, via SendGrid/Mailgun) Notification Events: For Clients: Job accepted Dispatcher en route Dispatcher arrived Job started Job completed (with review reminder) New message Review received Dispute update Rewards earned For Dispatchers: New job offer (60-second timer) Job cancelled by client New message Review received Verification status update Payment processed Fraud alert Notification Preferences: User can toggle each notification type Enable/disable push, email Quiet hours (e.g., 10 PM - 8 AM, no notifications) Do Not Disturb mode (mute all temporarily) Implementation: Store preferences in NotificationPreferences collection Check preferences before sending notification Use Firebase Cloud Functions to send push notifications Display in-app using NotificationListener widget 15. Shadow Banning Purpose: Stealth ban for suspected fraud without alerting user How It Works: Admin sets account_status = shadow_banned User can still login and use app BUT: Dispatchers: See no available jobs (empty feed) Clients: Requests receive no offers, eventually timeout User doesn't know they're banned Use Cases: Suspected fraud, pending investigation Multiple fraud alerts Pattern of poor behavior not severe enough for full ban Admin Actions: View shadow banned users Add shadow ban reason (internal note) Lift shadow ban or escalate to suspension/ban 🎨 UI/UX Design Guidelines Color Scheme Primary Navy: #0B132B Primary Purple: #6C63FF Accent Cyan: #4ECDC4 Accent Lilac: #B8A4FF Accent Blue: #5DADE2 Background Dark: #0B132B to #1a1f3a gradient Card Background: rgba(255,255,255,0.05) with blur Text Primary: #FFFFFF Text Secondary: #B0B8D4 Success: #10B981 Warning: #F59E0B Error: #EF4444 Typography Font: Inter (or system default: Roboto/SF Pro) Headings: Bold, 24-32px Body: Regular, 14-16px Small: 12px Components Glass Card: Background: rgba(255,255,255,0.05) Backdrop blur: 20px Border: 1px rgba(255,255,255,0.1) Border radius: 24px Hover: slight scale up, shadow Buttons: Primary: Gradient (Purple to Lilac), rounded 16px, shadow Secondary: Outline, white/10 border Icon buttons: Circular, 48px, glassmorphic Input Fields: Background: rgba(255,255,255,0.05) Border: 1px rgba(255,255,255,0.1) Rounded: 16px Focus: border color to Accent Cyan Status Badges: Pending: Yellow Accepted: Blue En Route: Purple In Progress: Purple Completed: Green Cancelled: Red Navigation: Bottom tab bar (client/dispatcher) Sidebar (admin) Icons from Lucide or Material Icons Animations Fade in on screen load Slide up for cards Smooth transitions between screens Skeleton loaders while fetching data Pull-to-refresh on lists Responsive Design Mobile-first (iOS & Android) Support tablet layouts (side-by-side panels) Landscape mode support Adaptive text sizes 🔌 Backend/API Requirements Firebase Setup Authentication: Email/Password, Phone Auth (SMS) Firestore Database: All collections listed above Cloud Storage: For images, videos, documents Cloud Functions: Background tasks (auto-dispatch, review application, scheduled job activation, fraud monitoring, cleanup) Cloud Messaging: Push notifications Cloud Functions (Node.js/TypeScript) 1. Auto-Dispatch Function exports.autoDispatchJob = functions.firestore .document('ServiceRequests/{requestId}') .onCreate(async (snap, context) => { const job = snap.data(); if (job.status === 'pending') { await dispatchJobToDispatchers(job); } }); 2. Apply Reviews (Daily Cron) exports.applyPendingReviews = functions.pubsub .schedule('every day 00:00') .onRun(async (context) => { const today = new Date().toISOString().split('T')[0]; const reviews = await getReviewsToApply(today); for (const review of reviews) { await applyReviewToProfile(review); } }); 3. Scheduled Job Activator (Runs every 5 minutes) exports.activateScheduledJobs = functions.pubsub .schedule('every 5 minutes') .onRun(async (context) => { const now = new Date(); const jobs = await getScheduledJobsDue(now); for (const job of jobs) { await updateJobStatus(job.id, 'pending'); await dispatchJobToDispatchers(job); } }); 4. Auto-Approve Completions (Runs hourly) exports.autoApproveCompletions = functions.pubsub .schedule('every 1 hours') .onRun(async (context) => { const now = new Date(); const completions = await getCompletionsDueForApproval(now); for (const completion of completions) { await approveCompletion(completion.id); await releasePayment(completion); } }); 5. Fraud Monitoring (Runs every hour) exports.monitorFraud = functions.pubsub .schedule('every 1 hours') .onRun(async (context) => { await checkHighVolumeShortJobs(); await checkLocationMismatches(); await checkSuspiciousPatterns(); }); 6. Support Ticket Cleanup (Daily) exports.cleanupExpiredTickets = functions.pubsub .schedule('every day 00:00') .onRun(async (context) => { const now = new Date(); const expired = await getExpiredTickets(now); for (const ticket of expired) { await deleteTicket(ticket.id); await deleteRelatedMessages(ticket.id); } }); 7. Send Notifications exports.sendNotification = functions.firestore .document('JobNotifications/{notificationId}') .onCreate(async (snap, context) => { const notification = snap.data(); const user = await getUser(notification.user_id); const prefs = await getNotificationPrefs(user.id); if (shouldSendNotification(notification, prefs)) { await sendPushNotification(user.fcm_token, notification); if (prefs.email_notifications) { await sendEmailNotification(user.email, notification); } } }); External APIs 1. Google Maps API: Places Autocomplete (address input) Geocoding (lat/lng from address) Directions (route polyline, ETA) Distance Matrix (calculate distance between points) 2. Payment Gateway (Stripe recommended): Setup: Create Stripe account, get API keys Add payment method (tokenized) Charge on job completion Refund for disputes Payout to dispatcher bank accounts 3. SMS Provider (Twilio): Send verification codes for phone numbers SMS notifications (optional) 4. Email Provider (SendGrid/Mailgun): Send verification emails Notification emails Password reset emails 5. Background Check API (Checkr/Onfido): Dispatcher verification Criminal record check Driving history 6. AI API (OpenAI/Claude): Support chat responses Content moderation (review comments) 7. Image Optimization (Cloudinary/imgix): Compress uploaded images Generate thumbnails Lazy loading 📋 Development Checklist Phase 1: Core Setup (Week 1-2) Firebase project setup (Auth, Firestore, Storage, Functions, Messaging) FlutterFlow project creation Define all Firestore collections with security rules Setup authentication flows (email, phone) Design system: colors, typography, components Phase 2: Authentication & Onboarding (Week 3-4) Login/Signup screens Email verification flow Phone number setup + SMS verification Welcome tutorial (swipeable intro) Onboarding tutorial (service flow) User type selection Client profile setup Dispatcher profile setup (basic info) Phase 3: Client Features (Week 5-7) Client dashboard Create request screen (map, photos, pricing) Dynamic pricing logic My requests list Job details screen (client view) Chat/messaging Review dispatcher Client profile management Rewards & redemption Job history Phase 4: Dispatcher Features (Week 8-10) Dispatcher verification flow (3 steps) Admin verification review panel Dispatcher dashboard Available jobs feed with filters Job offer notifications (60s timer) My jobs list Job details screen (dispatcher view) Job status updates (en route, arrived, started) Live location tracking Complete job (photos, video, GPS) Review client Dispatcher profile Earnings tracking Phase 5: Auto-Dispatch & Scheduling (Week 11) Auto-dispatch Cloud Function Assignment algorithm JobOffer creation and expiry Scheduled jobs logic Scheduled job activation (cron) Notification system integration Phase 6: Payments (Week 12) Stripe integration Add payment method Charge on job completion Payment hold period (24-48h) Auto-approval after 48h Manual approval on review Refund processing Dispatcher payouts Phase 7: Admin Panel (Week 13-14) Admin analytics dashboard User management (list, view, edit, ban) Fraud alerts management Dispute management & resolution Support tickets (live agent) Rewards management (CRUD) Pricing rules management (CRUD) File management Phase 8: Disputes & Support (Week 15) Raise dispute flow (both sides) Dispute details & comments AI-powered support chat Live agent handoff Support ticket lifecycle Auto-cleanup expired tickets Phase 9: Reviews & Ratings (Week 16) Review submission (delayed application) Apply pending reviews (daily cron) Rating recalculation Public dispatcher profiles with reviews Client reviews from dispatchers Phase 10: Fraud & Security (Week 17) Fraud monitoring Cloud Function Location verification Shadow banning logic Fraud alert creation Admin investigation tools Phase 11: Notifications (Week 18) Push notification setup (FCM) In-app notifications Email notifications Notification preferences screen Quiet hours & Do Not Disturb Phase 12: Polish & Testing (Week 19-20) UI/UX refinements Animations & transitions Error handling & validation Loading states & skeleton loaders Empty states Integration testing User acceptance testing Performance optimization Security audit Phase 13: Launch (Week 21) App Store submission (iOS) Google Play submission (Android) Marketing website Terms of Service & Privacy Policy Customer support setup Monitoring & analytics (Firebase Analytics, Crashlytics) Soft launch (beta testers) Full public launch 🚀 Post-Launch Roadmap Version 1.1 (Month 2-3) Referral program In-app wallet (prepaid credits) Multiple payment methods Service packages (monthly subscriptions) Push notification improvements Performance monitoring dashboard Version 1.2 (Month 4-5) Dispatcher teams (multiple dispatchers per job) Advanced scheduling (recurring jobs) Service add-ons (wax, interior cleaning, etc.) Dynamic service area maps Dispatcher earnings insights Client spending insights Version 2.0 (Month 6-8) Corporate accounts (businesses with fleets) API for third-party integrations White-label solution Multi-language support Multi-currency support International expansion 🔒 Security Considerations Data Encryption: All data in transit: HTTPS/TLS Sensitive data at rest: Firestore encryption Payment data: Never store raw card details, use tokenization Authentication: Firebase Auth with email/password Phone verification via SMS (Twilio) Email verification for account activation Session management with secure tokens Authorization: Firestore Security Rules for all collections User can only access their own data Admin role checking for admin panels Read-only vs. write permissions Input Validation: Sanitize all user inputs Validate email, phone formats Image upload restrictions (file type, size) XSS prevention Privacy: GDPR compliance (data export, deletion) Terms of Service & Privacy Policy User consent for data collection Anonymize analytics data Fraud Prevention: Location verification (GPS spoofing detection) Automated fraud monitoring Manual admin review for suspicious activity Rate limiting (API calls, job creation) 📊 Key Metrics to Track User Metrics: Total users (clients, dispatchers) Active users (DAU, MAU) User retention rate Churn rate Job Metrics: Total jobs created Jobs completed Average job completion time Job acceptance rate Job cancellation rate Financial Metrics: Total revenue Average job price Payment success rate Refund rate Dispatcher earnings Quality Metrics: Average client rating Average dispatcher rating Dispute rate Fraud alert rate Response time (support, disputes) Engagement Metrics: App opens per user Session duration Feature usage (chat, rewards, scheduling)">
🔍 Developer Tools
JustCopy.ai Clone with JustCopy