Overview
The Market Matching System is a comprehensive feature that connects farmers with potential buyers based on intelligent matching algorithms. It analyzes multiple factors including location, crop type, quantity, price preferences, and delivery requirements to provide optimal matches.
Architecture Flow
1. Data Input Layer
User Input → Validation → Database Query → Matching Algorithm → Results Display
2. Core Components
2.1 MarketMatch Component (src/components/MarketMatch.tsx)
- Purpose: Main interface for farmers to input their crop details and preferences
- Key Features:
- Crop type selection (17+ supported crops)
- Quantity and unit specification
- Location and county selection
- Price range configuration
- Delivery date preferences
- Quality grade specification
2.2 MatchResults Component (src/components/MatchResults.tsx)
- Purpose: Displays matched buyers with detailed information and interaction options
- Key Features:
- Match score visualization (0-100%)
- Buyer contact information
- Market insights and analytics
- Connection and communication tools
2.3 MatchFilters Component (src/components/MatchFilters.tsx)
- Purpose: Provides advanced filtering options for search results
- Key Features:
- Match score filtering
- Distance-based filtering
- Price range refinement
- Sorting options
3. Matching Algorithm
3.1 Scoring System
The system uses a weighted scoring algorithm with the following factors:
Total Score = Location Score (30%) + Price Score (25%) + Quantity Score (20%) +
Delivery Score (15%) + Recency Score (10%)
3.2 Scoring Breakdown