Overview
The matching system consists of three main components:Compatibility Profiles
Detailed profiles capturing preferences for matching
Answer Storage
Flexible storage for questionnaire responses
Favorites System
Save preferred guides and tours for later
Compatibility Profiles
Compatibility profiles store structured data used for matching algorithms.Data Model
Key Features
- Role-Based: Separate profiles for
TOURISTandGUIDEroles - User Linkage: Connected to user accounts via
user_id - Contact Info: Email and international phone number support (E.164 format)
- Timestamps: Tracks creation and updates for data freshness
Users can have multiple compatibility profiles for different contexts (e.g., solo travel vs. family trips).
Compatibility Answers
The answer system provides flexible storage for questionnaire responses.Data Structure
Answer Storage Strategy
The system supports three value types:Text Values (valueText)
Text Values (valueText)
Used for:
- Short text responses
- Single-choice selections
- Simple string values
"adventure", "moderate", "group"Numeric Values (valueNumber)
Numeric Values (valueNumber)
Used for:
- Rating scales (1-5, 1-10)
- Budget ranges
- Age or duration values
4.5, 1000, 7JSON Values (valueJson)
JSON Values (valueJson)
Used for:
- Multiple selections
- Complex nested data
- Array of preferences
["hiking", "photography", "food"]Question Keys
Questions are identified by keys like:travel_styleactivity_levelbudget_rangeinterestsgroup_size_preferencepace_preferenceaccommodation_style
Matching Algorithm Factors
While the exact matching algorithm is implemented client-side or in a separate service, the data structure supports matching on:Tourist-Guide Compatibility
Travel Style Alignment
Matching tourist preferences with guide specialties
Activity Level Match
Pairing tourists with guides offering appropriate intensity
Interest Overlap
Finding guides with expertise in tourist interests
Communication
Matching based on shared languages
Scoring Factors
Compatibility scores can be calculated based on:- Profile Data: From
TouristProfileandGuideProfilemodels - Compatibility Answers: From the questionnaire responses
- Interest Overlap: Matching
TouristProfileInterestwithGuideProfileExpertise - Language Match: Common languages between tourist and guide
- Availability: Guide calendar availability matching tourist dates
- Ratings: Guide rating average and review count
- Location: Geographic proximity or location preferences
Favorites System
Users can save guides and tours they’re interested in.Favorite Guides
Favorite Tours
Favorites use composite keys to ensure a tourist can only favorite a guide or tour once, preventing duplicates.
API Reference
Compatibility Profiles
Compatibility Answers
Implementation Examples
Creating a Compatibility Profile
Storing Questionnaire Answers
How does the matching algorithm work?
How does the matching algorithm work?
The core matching logic compares compatibility answers, profile preferences, and other factors to generate compatibility scores. The backend provides the data; scoring algorithms can be implemented in the application layer or a dedicated matching service.
Can tourists see their compatibility score with guides?
Can tourists see their compatibility score with guides?
Yes, the compatibility score can be calculated client-side using the profile data and answers, then displayed to tourists when browsing guides.
How are favorite guides different from matched guides?
How are favorite guides different from matched guides?
Matched guides are algorithmically suggested based on compatibility. Favorite guides are manually saved by tourists for quick access, regardless of compatibility score.
Related Features
User Profiles
Learn about tourist and guide profile features
Bookings
See how matches lead to bookings