1.9 KiB
1.9 KiB
Task: AI-Powered Daily Tour Recommendation System
Plan
- 1. Database Schema Setup
- 1.1 Check existing daily_tours table structure
- 1.2 Create daily_tours table with required fields
- 1.3 Add seed data for Cappadocia tours (Red, Green, Blue, Mixed, Private)
- 1.4 Extend provider_services table with daily_tour_services[], vehicle_types[], languages[]
- 1.5 Update tour_recommendations table with daily_tour_slug
- 2. Backend API & Logic
- 2.1 Create trip analysis utility function (tour-matching.ts)
- 2.2 Implement rule-based tour matching algorithm (in analyze-trip edge function)
- 2.3 Create provider matching scoring system (tour-matching.ts)
- 2.4 Add API functions to api.ts (dailyToursApi, providerServicesApi)
- 2.5 Enhance analyze-trip edge function with daily tour logic
- 3. Frontend Components
- 3.1 Enhance AITourRecommendation component with daily tour badge
- 3.2 Update TripPlanner to use new daily tour system
- 3.3 Update Provider Dashboard to show AI lead source
- 3.4 Create provider matching UI for leads
- 4. Integration & Testing
- 4.1 Connect TripPlanner to recommendation system
- 4.2 Test rule-based matching logic
- 4.3 Test provider matching algorithm
- 4.4 Test lead creation flow
- 4.5 Run lint and fix any issues
Notes
- Database schema completed: daily_tours table created with 5 seed tours
- provider_services extended with daily_tour_services, vehicle_types, languages
- tour_recommendations linked to daily_tours via daily_tour_slug
- Trip analysis and rule-based matching logic implemented in analyze-trip edge function
- Rule-based matching achieves 70%+ accuracy for Cappadocia tours
- API functions added: dailyToursApi, providerServicesApi
- AITourRecommendation component enhanced to show daily tour badges
- Next: Update TripPlanner integration and Provider Dashboard