V3.0 Delta from V2.0
What's New: Multi-vendor marketplace, white-label platform, franchise management Timeline: Month 19-24 Migration Complexity: HIGH (new vendor model, marketplace architecture)
Executive Summary
V3.0 represents a fundamental business model transformation from a single-tenant platform to a global multi-vendor marketplace. While V2.0 enabled event management alongside villa rentals, V3.0 opens the platform to unlimited vendors, white-label resellers, and franchise partners.
Key Changes:
- Single operator → Multi-vendor marketplace
- Fixed branding → White-label capabilities
- Direct operation → Franchise/partner program
- Limited currencies/languages → Global multi-currency/multi-language
- Basic analytics → Enterprise BI tools
- Closed API → Full API platform
Migration Impact:
- Breaking: Revenue model changes (3-way splits)
- Breaking: Authentication model (vendor isolation)
- Breaking: Search architecture (cross-vendor)
- Additive: New vendor/storefront entities
- Additive: White-label configuration
- Additive: Partner management
What V2.0 Had (Baseline)
Business Model
- Single-tenant platform operated by TVL
- TVL manages all villas and events directly
- Standard TVL branding across all properties
- Limited to TVL's operational capacity
- Fixed commission structure
Technical Capabilities
- Villa rental management
- Events and experiences
- Package creation (villa + events)
- Basic multi-currency (3-5 currencies)
- Basic multi-language (2-3 languages)
- Single checkout flow
- Standard analytics dashboard
- Property manager portal
- Event organizer tools
Scale
- Up to 500 properties managed by TVL
- Up to 1,000 events managed by TVL
- Single region deployment
- Single brand identity
What V3.0 Adds (Delta)
1. MULTI-VENDOR MARKETPLACE
NEW Entities:
Vendor
├─ vendor_id (UUID)
├─ business_name
├─ vendor_type (property_manager | event_organizer | tour_operator)
├─ tier (basic | professional | enterprise)
├─ verification_status (pending | verified | suspended)
├─ commission_rate (%)
├─ created_at
└─ settings (JSON)
VendorVerification
├─ verification_id (UUID)
├─ vendor_id (FK)
├─ verification_type (identity | business | background | financial)
├─ status (pending | approved | rejected)
├─ documents (array)
├─ verified_by (admin_id)
└─ verified_at
VendorStorefront
├─ storefront_id (UUID)
├─ vendor_id (FK)
├─ slug (unique URL)
├─ display_name
├─ description
├─ logo_url
├─ banner_url
├─ theme_config (JSON)
├─ social_links (JSON)
└─ is_active
NEW Workflows:
Vendor Onboarding:
- Vendor submits registration application
- System validates business information
- KYC/background check initiated
- Document verification (business license, insurance)
- Banking/payout setup (Stripe Connect account)
- Vendor assigned tier (basic/professional/enterprise)
- Storefront created automatically
- Vendor onboarding complete → can list properties/events
Vendor Tier System:
| Tier | Properties | Events | Commission | Features | 
|---|---|---|---|---|
| Basic | 1-10 | 1-25 | 15% | Standard tools | 
| Professional | 11-100 | 26-100 | 12% | Advanced analytics, API access | 
| Enterprise | Unlimited | Unlimited | 8% | White-label, dedicated support, custom integrations | 
Cross-Vendor Search:
- Search spans all vendors' properties and events
- Filter by vendor rating, tier, location
- Vendor name displayed in search results
- Vendor storefront link from property/event pages
Vendor Performance Monitoring:
- Response time tracking
- Booking acceptance rate
- Cancellation rate
- Guest satisfaction score
- Review ratings
- Revenue generated
- Quality score (composite metric)
Vendor Ratings and Reviews:
- Guests rate vendors (separate from property/event ratings)
- Vendor response to reviews
- Aggregate vendor rating displayed on storefront
- Review moderation system
Impact on Existing Domains:
Supply Domain (Enhanced):
  Property
+ ├─ vendor_id (FK) ← NEW: property belongs to vendor
+ ├─ storefront_id (FK) ← NEW: displayed on storefront
  ├─ owner_id (FK) ← UNCHANGED
  └─ ... (existing fields)
Events Domain (Enhanced):
  Event
+ ├─ vendor_id (FK) ← NEW: event managed by vendor
+ ├─ storefront_id (FK) ← NEW: displayed on storefront
  ├─ organizer_id (FK) ← UNCHANGED
  └─ ... (existing fields)
Bookings Domain (Enhanced):
  Booking
+ ├─ vendor_id (FK) ← NEW: booking attributed to vendor
+ ├─ marketplace_commission (%) ← NEW: platform fee
+ ├─ vendor_commission (%) ← NEW: vendor's fee
  ├─ property_id (FK)
  └─ ... (existing fields)
2. WHITE-LABEL PLATFORM
NEW Entities:
WhiteLabelTenant
├─ tenant_id (UUID)
├─ vendor_id (FK) ← must be enterprise tier
├─ custom_domain (e.g., bookings.myagency.com)
├─ domain_verified (boolean)
├─ ssl_certificate_id
├─ branding (JSON)
│   ├─ logo_url
│   ├─ favicon_url
│   ├─ primary_color
│   ├─ secondary_color
│   ├─ font_family
│   ├─ custom_css_url (optional)
│   └─ terms_url
├─ email_templates (JSON)
│   ├─ booking_confirmation
│   ├─ pre_arrival
│   ├─ post_checkout
│   └─ password_reset
├─ booking_flow_config (JSON)
├─ feature_flags (JSON)
├─ is_active
└─ created_at
WhiteLabelDomain
├─ domain_id (UUID)
├─ tenant_id (FK)
├─ domain_name
├─ dns_records (array)
├─ verification_status (pending | verified | failed)
├─ ssl_status (pending | active | expired)
└─ verified_at
NEW Features:
Custom Domain Mapping:
- Enterprise vendors can use custom domains
- DNS configuration guide provided
- Automatic SSL certificate provisioning (Let's Encrypt)
- Domain verification (TXT record or file upload)
- Subdomain support (e.g., book.agency.com)
Branding Customization:
- Logo replacement (header, footer, emails)
- Favicon customization
- Color scheme (primary, secondary, accent)
- Font selection (from approved list)
- Custom CSS upload (enterprise only)
- White-labeled mobile web experience
Custom Email Templates:
- HTML email editor
- Variable substitution (guest name, booking details, etc.)
- Preview and testing tools
- Template versioning
- Sender name customization
- Reply-to address configuration
Custom Booking Flow:
- Configurable checkout steps
- Custom terms and conditions
- Optional guest registration
- Custom payment methods display
- Upsell/cross-sell configuration
- Custom confirmation page
Agency-Specific Features:
- Custom footer links
- Privacy policy URL
- Terms of service URL
- Contact information override
- Social media links
- Google Analytics integration
- Facebook Pixel integration
Reseller Program:
- Revenue share model (configurable)
- Marketing materials library
- Co-marketing opportunities
- Lead generation tools
- Referral tracking
Impact on Architecture:
Multi-Tenancy Architecture:
Request Flow:
1. Request arrives at bookings.agency.com
2. Load balancer routes to platform
3. Middleware identifies tenant by domain
4. Tenant context loaded (branding, config)
5. Response rendered with tenant branding
6. Email sent with tenant templates
Data Isolation:
- Tenant-specific configuration stored per vendor
- Shared infrastructure (properties, bookings)
- Tenant context in all requests
- Row-level security for tenant data
3. FRANCHISE/PARTNER PROGRAM
NEW Entities:
Partner
├─ partner_id (UUID)
├─ partner_name
├─ partner_type (franchise | affiliate | reseller)
├─ territory (array of regions/countries)
├─ commission_structure (JSON)
│   ├─ base_rate (%)
│   ├─ performance_tiers (array)
│   └─ payment_schedule (monthly | quarterly)
├─ contract_start_date
├─ contract_end_date
├─ status (active | suspended | terminated)
└─ onboarding_completed_at
PartnerCommission
├─ commission_id (UUID)
├─ partner_id (FK)
├─ booking_id (FK)
├─ commission_amount (decimal)
├─ commission_rate (%)
├─ booking_value (decimal)
├─ status (pending | approved | paid)
├─ paid_at
└─ payment_reference
PartnerOnboarding
├─ onboarding_id (UUID)
├─ partner_id (FK)
├─ step_name
├─ status (pending | completed | skipped)
├─ completed_at
└─ notes
MarketingMaterial
├─ material_id (UUID)
├─ title
├─ description
├─ material_type (brochure | video | image | presentation)
├─ file_url
├─ thumbnail_url
├─ partner_tier (all | franchise | enterprise)
├─ language (ISO code)
└─ created_at
NEW Workflows:
Partner Onboarding:
- Partner application submitted
- Territory review (exclusivity check)
- Contract negotiation
- Commission structure agreed
- Banking/payout setup
- Training session scheduled
- Marketing materials provided
- Partner portal access granted
- Go-live checklist completed
Commission Management:
- Automated commission calculation per booking
- Performance tier evaluation (monthly)
- Commission approval workflow
- Automated monthly payouts
- Commission statement generation
- Dispute resolution process
Partner Portal Features:
- Dashboard (revenue, bookings, commissions)
- Lead tracking
- Marketing material downloads
- Training video library
- Support ticket system
- Performance analytics
- Commission reports
- Territory management
Training Resources:
- Video tutorials (platform usage)
- Best practices guides
- Sales playbooks
- Technical documentation
- Certification program
- Webinar calendar
- Knowledge base
Support Ticketing:
- Partner-specific support queue
- Priority support for franchise partners
- SLA tracking (response time, resolution time)
- Escalation workflow
- Support analytics
4. GLOBAL FEATURES (Complete)
V2.0 Had (Limited):
- 3-5 currencies (USD, EUR, GBP)
- 2-3 languages (English, Spanish)
- Basic time zone handling
- No regional payment methods
V3.0 Adds (Complete Global Support):
Multi-Currency (20+ Currencies):
SupportedCurrency
├─ currency_code (ISO 4217: USD, EUR, GBP, JPY, etc.)
├─ symbol
├─ decimal_places
├─ exchange_rate (to base currency)
├─ is_active
└─ last_updated
CurrencyConversion
├─ conversion_id (UUID)
├─ from_currency
├─ to_currency
├─ rate
├─ source (API provider)
└─ timestamp
Supported Currencies:
- USD, EUR, GBP, CAD, AUD (V2.0 existing)
- JPY, CNY, INR, BRL, MXN (NEW)
- CHF, SEK, NOK, DKK, PLN (NEW)
- ZAR, AED, SGD, HKD, NZD (NEW)
Features:
- Real-time exchange rates (updated hourly)
- Display prices in guest's preferred currency
- Pay in local currency
- Automatic conversion at checkout
- Multi-currency financial reports
- Currency-specific rounding rules
Multi-Language (10+ Languages):
Translation
├─ translation_id (UUID)
├─ key (e.g., "booking.confirm_button")
├─ language (ISO 639-1: en, es, fr, de, etc.)
├─ text
├─ context
└─ last_updated
LocalizedContent
├─ content_id (UUID)
├─ entity_type (property | event | page)
├─ entity_id (FK)
├─ language
├─ title
├─ description
├─ metadata (JSON)
└─ is_approved
Supported Languages:
- English, Spanish, French (V2.0 existing)
- German, Italian, Portuguese (NEW)
- Japanese, Chinese (Simplified), Arabic (NEW)
- Russian, Korean (NEW)
Features:
- UI translation (all platform text)
- Content translation (property descriptions, event details)
- Professional translation service integration
- Machine translation (Google Translate API)
- Translation approval workflow
- Language-specific SEO metadata
- RTL support (Arabic, Hebrew)
Regional Payment Methods:
PaymentMethod
├─ method_id (UUID)
├─ method_name
├─ method_type (card | bank_transfer | wallet | local)
├─ provider (stripe | adyen | paypal | alipay | etc.)
├─ supported_currencies (array)
├─ supported_countries (array)
├─ is_active
└─ configuration (JSON)
Supported Payment Methods:
- Credit/Debit Cards: Visa, Mastercard, Amex (Global)
- Digital Wallets: Apple Pay, Google Pay, PayPal (Global)
- Regional: Alipay, WeChat Pay (China)
- Regional: iDEAL (Netherlands), Sofort (Germany)
- Regional: Boleto (Brazil), OXXO (Mexico)
- Regional: UPI (India), GrabPay (Singapore)
- Bank Transfer: SEPA (Europe), ACH (USA)
Local Tax Compliance:
TaxRule
├─ rule_id (UUID)
├─ country_code (ISO 3166)
├─ region (state/province, optional)
├─ tax_type (VAT | GST | sales_tax | occupancy_tax | etc.)
├─ tax_rate (%)
├─ applies_to (property | event | service_fee)
├─ effective_from
├─ effective_to
└─ authority_name
TaxReport
├─ report_id (UUID)
├─ country_code
├─ period_start
├─ period_end
├─ total_tax_collected (by type)
├─ transactions_count
├─ generated_at
└─ file_url (CSV/PDF)
Tax Compliance Features:
- VAT/GST calculation by country
- Occupancy tax (USA state/local)
- Tourist tax (Europe)
- Reverse charge mechanism (B2B EU)
- Tax exemption handling
- Automated tax report generation
- Tax authority filing integration (planned)
Time Zone Handling:
TimeZone
├─ property_id (FK)
├─ timezone_name (e.g., "America/Los_Angeles")
├─ utc_offset (minutes)
├─ observes_dst (boolean)
└─ default_for_region
BookingTimestamp
├─ booking_id (FK)
├─ created_at_utc (timestamp)
├─ created_at_local (timestamp)
├─ checkin_time_local (time)
├─ checkout_time_local (time)
└─ timezone_at_booking
Features:
- Property-specific time zones
- Automatic DST handling
- Display times in guest's time zone
- Display times in property's time zone
- Calendar sync with correct time zones
- Email timestamps in recipient's time zone
Regional Content:
- Region-specific property recommendations
- Local experience suggestions
- Regional blog content
- Localized customer support hours
- Regional pricing displays
- Country-specific legal notices
5. ENTERPRISE TOOLS
Advanced Analytics Dashboard:
AnalyticsDashboard
├─ dashboard_id (UUID)
├─ vendor_id (FK) ← enterprise vendors get custom dashboards
├─ dashboard_name
├─ widgets (array)
│   ├─ widget_type (chart | table | metric | map)
│   ├─ data_source (query)
│   ├─ refresh_interval (minutes)
│   └─ display_config (JSON)
├─ filters (array)
└─ is_shared
MetricDefinition
├─ metric_id (UUID)
├─ metric_name
├─ calculation_type (sum | avg | count | ratio | custom)
├─ formula (SQL or expression)
├─ dimensions (array)
├─ filters (array)
└─ cache_ttl (seconds)
Available Metrics:
- Revenue metrics (gross, net, by channel, by property)
- Occupancy rate (by property, by month, by season)
- Average daily rate (ADR)
- Revenue per available room (RevPAR)
- Booking lead time
- Length of stay average
- Cancellation rate
- Guest satisfaction score
- Channel performance
- Marketing ROI
- Vendor performance (marketplace)
Custom Report Builder:
- Drag-and-drop interface
- Pre-built templates
- Custom SQL queries (enterprise only)
- Scheduled reports (daily, weekly, monthly)
- Export formats (CSV, Excel, PDF)
- Email delivery
- Visualization options (charts, graphs, heatmaps)
- Data filters and pivots
Data Export (API):
API Endpoints (Enterprise Only):
GET /api/v3/analytics/bookings
GET /api/v3/analytics/revenue
GET /api/v3/analytics/properties
GET /api/v3/analytics/vendors
GET /api/v3/analytics/custom/{report_id}
Parameters:
- start_date, end_date
- vendor_id (optional, filter by vendor)
- property_id (optional)
- group_by (day | week | month | quarter | year)
- format (json | csv | excel)
Webhook Notifications:
Webhook
├─ webhook_id (UUID)
├─ vendor_id (FK)
├─ event_type (booking.created | booking.cancelled | payment.received | etc.)
├─ url (HTTPS endpoint)
├─ secret (for signature verification)
├─ is_active
├─ retry_policy (JSON)
└─ created_at
WebhookDelivery
├─ delivery_id (UUID)
├─ webhook_id (FK)
├─ payload (JSON)
├─ status (pending | success | failed)
├─ http_status_code
├─ attempts
├─ next_retry_at
└─ delivered_at
Supported Webhook Events:
- booking.created
- booking.confirmed
- booking.cancelled
- booking.modified
- payment.received
- payment.failed
- payout.processed
- review.submitted
- property.created
- property.updated
- availability.changed
SSO Integration (SAML):
SSOProvider
├─ provider_id (UUID)
├─ vendor_id (FK) ← enterprise only
├─ provider_type (saml | oauth2 | oidc)
├─ entity_id (SAML)
├─ sso_url
├─ certificate (X.509)
├─ attribute_mapping (JSON)
│   ├─ email
│   ├─ first_name
│   ├─ last_name
│   └─ roles
├─ is_active
└─ created_at
SSO Features:
- SAML 2.0 support
- OAuth 2.0 / OpenID Connect
- Azure AD integration
- Okta integration
- Google Workspace integration
- Automatic user provisioning
- Role mapping
- Just-in-time (JIT) provisioning
Dedicated Support:
- Dedicated account manager
- Priority support queue
- 24/7 phone support
- Slack/Teams integration
- Quarterly business reviews
- Custom training sessions
- Implementation assistance
6. MARKETPLACE OPERATIONS
Vendor Payouts (Split by Vendor):
MarketplacePayout
├─ payout_id (UUID)
├─ vendor_id (FK)
├─ period_start
├─ period_end
├─ total_bookings
├─ total_revenue (decimal)
├─ marketplace_commission (decimal)
├─ vendor_earnings (decimal)
├─ adjustments (decimal)
├─ net_payout (decimal)
├─ status (pending | processing | completed | failed)
├─ bank_account_id (FK)
├─ transfer_reference
└─ paid_at
PayoutLineItem
├─ line_item_id (UUID)
├─ payout_id (FK)
├─ booking_id (FK)
├─ booking_date
├─ guest_name
├─ property_name
├─ booking_value (decimal)
├─ commission_rate (%)
├─ commission_amount (decimal)
├─ net_to_vendor (decimal)
└─ status
Payout Schedule:
- Weekly payouts (standard)
- Bi-weekly payouts (option)
- Monthly payouts (option)
- Instant payout (enterprise, 1% fee)
- Minimum payout threshold: $50
Revenue Split Model:
Traditional Booking (V2.0):
Booking Value: $1,000
├─ Platform Fee (10%): $100
└─ Property Owner: $900
Marketplace Booking (V3.0):
Booking Value: $1,000
├─ Platform Fee (5%): $50
├─ Vendor Commission (10%): $100
└─ Property Owner: $850
White-Label Booking (V3.0):
Booking Value: $1,000
├─ Platform Fee (3%): $30
├─ White-Label Agency (12%): $120
└─ Property Owner: $850
Dispute Resolution:
Dispute
├─ dispute_id (UUID)
├─ booking_id (FK)
├─ raised_by (guest | vendor | platform)
├─ dispute_type (cancellation | refund | service_quality | payout | other)
├─ description
├─ evidence (array of files/links)
├─ status (open | under_review | resolved | escalated)
├─ assigned_to (admin_id)
├─ resolution_notes
├─ resolved_at
└─ created_at
DisputeMessage
├─ message_id (UUID)
├─ dispute_id (FK)
├─ sender_type (guest | vendor | admin)
├─ sender_id (FK)
├─ message
├─ attachments (array)
└─ sent_at
Dispute Types:
- Cancellation disputes
- Refund requests
- Service quality issues
- Property condition complaints
- Payout discrepancies
- Booking modifications
- No-show claims
Dispute Resolution Process:
- Dispute raised by guest/vendor
- Evidence collected from both parties
- Admin review and investigation
- Resolution proposed
- Parties notified
- Resolution implemented (refund, payout adjustment, etc.)
- Case closed or escalated
Quality Control:
QualityCheck
├─ check_id (UUID)
├─ entity_type (property | event | vendor)
├─ entity_id (FK)
├─ check_type (photos | description | pricing | availability)
├─ status (pending | passed | failed)
├─ issues_found (array)
├─ reviewer_id (admin FK)
├─ reviewed_at
└─ next_check_date
QualityStandard
├─ standard_id (UUID)
├─ standard_name
├─ entity_type (property | event)
├─ criteria (JSON)
│   ├─ min_photos (number)
│   ├─ min_description_length (number)
│   ├─ required_fields (array)
│   └─ quality_score_threshold (number)
└─ enforcement_level (warning | blocking)
Quality Standards:
- Minimum photo requirements (5+ high-res photos)
- Description completeness (200+ words)
- Accurate pricing (no bait-and-switch)
- Availability accuracy (calendar up-to-date)
- Response time standards (< 24 hours)
- Guest satisfaction threshold (4.0+ rating)
Fraud Detection:
FraudCheck
├─ check_id (UUID)
├─ entity_type (booking | vendor | payment)
├─ entity_id (FK)
├─ risk_score (0-100)
├─ risk_factors (array)
│   ├─ unusual_booking_pattern
│   ├─ high_value_transaction
│   ├─ new_vendor
│   ├─ suspicious_payment
│   └─ location_mismatch
├─ action_taken (none | manual_review | blocked)
├─ reviewed_by (admin_id)
└─ checked_at
FraudRule
├─ rule_id (UUID)
├─ rule_name
├─ condition (SQL or logic expression)
├─ risk_score_increase (number)
├─ auto_block (boolean)
├─ is_active
└─ created_at
Fraud Detection Rules:
- Multiple bookings from same IP in short time
- High-value bookings from new accounts
- Mismatched billing/shipping addresses
- Known fraudulent email patterns
- Suspicious payment method usage
- Velocity checks (too many transactions)
- Geolocation anomalies
Content Moderation:
ModerationQueue
├─ queue_id (UUID)
├─ content_type (property_description | event_description | review | photo)
├─ content_id (FK)
├─ vendor_id (FK)
├─ flagged_reason (inappropriate | spam | misleading | copyright)
├─ status (pending | approved | rejected | escalated)
├─ moderator_id (admin FK)
├─ moderated_at
└─ created_at
Moderation Types:
- Property descriptions (offensive language, false claims)
- Event descriptions (misleading information)
- Photos (inappropriate, copyrighted, misleading)
- Reviews (fake reviews, offensive language)
- Vendor profiles (impersonation, fraudulent)
Vendor Performance Monitoring:
VendorPerformanceMetric
├─ metric_id (UUID)
├─ vendor_id (FK)
├─ period_start
├─ period_end
├─ response_time_avg (hours)
├─ booking_acceptance_rate (%)
├─ cancellation_rate (%)
├─ guest_satisfaction (1-5)
├─ review_rating_avg (1-5)
├─ revenue_generated (decimal)
├─ quality_score (0-100)
└─ tier_eligible (basic | professional | enterprise)
Performance Thresholds:
| Metric | Basic | Professional | Enterprise | 
|---|---|---|---|
| Response Time | < 48h | < 24h | < 12h | 
| Acceptance Rate | > 70% | > 80% | > 90% | 
| Cancellation Rate | < 10% | < 5% | < 3% | 
| Guest Satisfaction | > 3.5 | > 4.0 | > 4.5 | 
| Quality Score | > 60 | > 75 | > 85 | 
Actions on Poor Performance:
- Warning notification
- Tier demotion
- Listing visibility reduction
- Account suspension (temporary)
- Account termination (repeated violations)
Breaking Changes (Migration Required)
1. Authentication & Authorization
V2.0 Model:
User → Role → Permissions
V3.0 Model:
User → Vendor → Role → Permissions
         ↓
    VendorContext (data isolation)
Migration:
- All existing users assigned to "TVL Master Vendor"
- New vendors get isolated context
- Row-level security policies applied
- Session now includes vendor_id
Code Changes Required:
-- Add vendor_id to all domain tables
ALTER TABLE properties ADD COLUMN vendor_id UUID REFERENCES vendors(vendor_id);
ALTER TABLE events ADD COLUMN vendor_id UUID REFERENCES vendors(vendor_id);
ALTER TABLE bookings ADD COLUMN vendor_id UUID REFERENCES vendors(vendor_id);
-- Update queries to filter by vendor
-- Before: SELECT * FROM properties WHERE owner_id = $1
-- After: SELECT * FROM properties WHERE owner_id = $1 AND vendor_id = $2
2. Revenue Model
V2.0:
Booking Value = Base Price + Taxes + Fees
Revenue Split = Platform Fee + Owner Payout
V3.0:
Booking Value = Base Price + Taxes + Fees
Revenue Split = Platform Fee + Vendor Commission + Owner Payout
Migration:
- Recalculate all active bookings with new split
- Update payout schedules
- Migrate financial reports
Schema Changes:
ALTER TABLE bookings ADD COLUMN marketplace_commission DECIMAL(10,2);
ALTER TABLE bookings ADD COLUMN vendor_commission DECIMAL(10,2);
ALTER TABLE bookings ADD COLUMN vendor_payout_status VARCHAR(50);
3. Search Architecture
V2.0:
- Single Elasticsearch index
- All properties managed by TVL
- Simple search queries
V3.0:
- Multi-vendor index with vendor_id facet
- Cross-vendor aggregations
- Vendor-specific boosting
Migration:
1. Reindex all properties with vendor_id
2. Update search queries to include vendor filters
3. Add vendor ranking to relevance scoring
4. Test cross-vendor search
Non-Breaking Changes (Additive)
New Tables
- vendors
- vendor_verifications
- vendor_storefronts
- white_label_tenants
- white_label_domains
- partners
- partner_commissions
- marketing_materials
- supported_currencies
- translations
- localized_content
- payment_methods
- tax_rules
- analytics_dashboards
- webhooks
- sso_providers
- marketplace_payouts
- disputes
- quality_checks
- fraud_checks
- moderation_queue
- vendor_performance_metrics
New API Endpoints
Vendor Management:
POST   /api/v3/vendors
GET    /api/v3/vendors/{id}
PUT    /api/v3/vendors/{id}
GET    /api/v3/vendors/{id}/storefront
PUT    /api/v3/vendors/{id}/storefront
White-Label:
POST   /api/v3/white-label/tenants
GET    /api/v3/white-label/tenants/{id}
PUT    /api/v3/white-label/tenants/{id}/branding
POST   /api/v3/white-label/domains
Partners:
POST   /api/v3/partners
GET    /api/v3/partners/{id}
GET    /api/v3/partners/{id}/commissions
Analytics:
GET    /api/v3/analytics/dashboard
POST   /api/v3/analytics/reports
GET    /api/v3/analytics/export
Webhooks:
POST   /api/v3/webhooks
GET    /api/v3/webhooks
DELETE /api/v3/webhooks/{id}
Marketplace:
GET    /api/v3/marketplace/payouts
GET    /api/v3/marketplace/disputes
POST   /api/v3/marketplace/disputes
Domain Changes Summary
| Domain | V2.0 Status | V3.0 Changes | 
|---|---|---|
| Identity & Tenancy | Complete | Enhanced: Multi-vendor tenancy, SSO | 
| Authorization | Complete | Enhanced: Vendor-level permissions | 
| Supply | Complete | Enhanced: vendor_id, storefront_id | 
| Availability | Complete | Enhanced: Cross-vendor sync | 
| Pricing | Complete | Enhanced: Multi-currency, vendor commissions | 
| Bookings | Complete | Enhanced: Marketplace revenue splits | 
| Payments | Complete | Enhanced: Regional payment methods, vendor payouts | 
| Content | Complete | Enhanced: Multi-language, vendor storefronts | 
| Channels | Complete | Unchanged | 
| Delegation | Complete | Unchanged | 
| Search | Complete | Enhanced: Cross-vendor search | 
| Analytics | Complete | Enhanced: Enterprise BI tools | 
| Events | Complete | Enhanced: vendor_id | 
| Vendors (NEW) | N/A | NEW: Full vendor management domain | 
| White-Label (NEW) | N/A | NEW: Branding and customization domain | 
| Partners (NEW) | N/A | NEW: Franchise/partner program domain | 
| Marketplace Ops (NEW) | N/A | NEW: Quality, fraud, disputes | 
Infrastructure Changes
Database
V2.0:
- Single PostgreSQL instance
- Regional deployment
V3.0:
- Multi-region PostgreSQL with replication
- Read replicas per region
- Connection pooling (PgBouncer)
- Partitioning for high-volume tables (bookings, payments)
Caching
V2.0:
- Redis for session storage
V3.0:
- Redis Cluster for high availability
- Regional cache nodes
- CDN caching (CloudFlare/Fastly)
- Multi-layer caching strategy
Search
V2.0:
- Single Elasticsearch cluster
V3.0:
- Multi-region Elasticsearch
- Cross-cluster search
- Dedicated indices per vendor type
- Real-time indexing pipeline
Deployment
V2.0:
- Single AWS region (us-east-1)
- Kubernetes cluster (3 nodes)
V3.0:
- Multi-region deployment (us-east-1, eu-west-1, ap-southeast-1)
- Auto-scaling Kubernetes (10-100 nodes)
- Global load balancing
- Regional failover
Migration Checklist
Phase 1: Foundation (Weeks 1-4)
- Create vendor management tables
- Migrate existing data to "TVL Master Vendor"
- Implement vendor authentication
- Add vendor_id to all domain tables
- Update application queries for vendor context
Phase 2: Marketplace (Weeks 5-8)
- Build vendor onboarding flow
- Implement vendor verification
- Create storefront functionality
- Update revenue split logic
- Implement marketplace payouts
Phase 3: White-Label (Weeks 9-12)
- Implement white-label tenant management
- Build custom domain mapping
- Create branding customization UI
- Implement custom email templates
- Test white-label flows
Phase 4: Global Features (Weeks 13-16)
- Add 20+ currencies
- Implement real-time exchange rates
- Add 10+ language support
- Integrate translation services
- Implement regional payment methods
- Build tax compliance features
Phase 5: Enterprise Tools (Weeks 17-20)
- Build advanced analytics dashboard
- Implement custom report builder
- Create webhook system
- Implement SSO (SAML)
- Set up dedicated support infrastructure
Phase 6: Operations (Weeks 21-24)
- Implement quality control system
- Build fraud detection
- Create content moderation tools
- Implement dispute resolution
- Build vendor performance monitoring
- Deploy multi-region infrastructure
Success Metrics
Business KPIs
- Vendors: 100+ active vendors by Month 24
- White-Label: 10+ white-label agencies by Month 24
- Properties: 10,000+ properties globally
- Booking Value: $50M+ annual GMV
- Countries: Presence in 20+ countries
- Revenue: 3x increase from marketplace commissions
Technical KPIs
- Uptime: 99.99% SLA
- Performance: <100ms page load (global CDN)
- Concurrency: Support 10,000+ concurrent users
- Throughput: Handle 100+ transactions/second
- Search: <200ms cross-vendor search response
- Data Replication: <5 second lag between regions
User Satisfaction
- Vendor NPS: >50
- Guest NPS: >60
- White-Label NPS: >70
- Support Response: <1 hour for enterprise
- Vendor Retention: >85% year-over-year
Risks & Mitigation
Technical Risks
| Risk | Impact | Mitigation | 
|---|---|---|
| Multi-region latency | High | Regional read replicas, CDN | 
| Cross-vendor search performance | Medium | Dedicated Elasticsearch cluster, caching | 
| Vendor data isolation bugs | High | Row-level security, extensive testing | 
| Payment routing complexity | High | Thorough Stripe Connect testing | 
Business Risks
| Risk | Impact | Mitigation | 
|---|---|---|
| Vendor quality issues | High | Rigorous verification, quality monitoring | 
| Fraudulent vendors | High | KYC checks, fraud detection systems | 
| White-label support complexity | Medium | Dedicated support team, documentation | 
| Commission disputes | Medium | Clear terms, dispute resolution process | 
Backward Compatibility
Fully Compatible:
- V2.0 APIs remain functional (deprecated)
- Existing bookings continue to work
- Current integrations unaffected
- Gradual migration path for clients
Deprecation Timeline:
- V2.0 APIs supported through Month 30
- V2.0 UI redirects to V3.0 after Month 24
- Data export tools provided for migration