A web-first platform connecting small-scale farmers with better market opportunities through real-time pricing data, buyer matching, and transparent agricultural commerce.
- πΈ Video Demo
- πΉ Canva Pitch Deck Link
- π Live Mobile App
- πΈοΈ Web App
- π Prompts Full Documentation
- π Market Match Feature Full Documentation
- π AI Disease Detection Feature Full Documentation
- π Problem Statement
- π‘Solution
- π Prompts & AI Guidance
- π§° Tech Stack
- πΌ Screenshots
- π Getting Started
- π User Access & Flow
- ποΈ Project Structure
- π Roadmap
- βοΈ Technical Implementation of Features
- π Security & Testing
- π€ Contributing
- π License
- π€ Contributors
Small-scale farmers often lack access to:
- Real-time market pricing information
- Direct connections to buyers
- Transparent pricing mechanisms
- Efficient distribution channels
- Low-quality produce
This leads to financial losses, market inefficiencies, and limited growth opportunities.
Bazaar provides a comprehensive web platform that:
- Live Market Prices: Real-time crop pricing across different markets
- Buyer Matching: Algorithm-driven connections between farmers and buyers
- Crop Disease Detection: Enables real-time analysis of crop health
- Price Alerts: Notifications for optimal selling opportunities
- Trend Analysis: Historical data and market predictions
- Direct Communication: In-app messaging or WhatsApp integration
Bazaar leverages advanced prompt engineering and AI tools (Lovable, Copilot, Claude AI, Rork) to accelerate development and ensure a robust, user-focused platform.
We use carefully crafted prompts for both web and mobile app planning, debugging, and feature ideationβincluding AI-powered crop disease detection and market matching.
- Lovable & Claude AI: For web-first and mobile-first project planning, tech stack selection, UI/UX guidelines, and database design.
- Copilot: For TypeScript and code debugging prompts.
- Rork: For mobile app architecture, API, and feature prompts.
- v0: For refining the web architecture and crafting a readable README.
- AI Feature Prompts: For integrating crop disease detection, analytics, and dashboard extensions.
π View the full prompts documentation on Notion
| Frontend | Backend | Auth | UI & Styling | Dev Tools |
|---|---|---|---|---|
| React + TypeScript | Supabase (PostgreSQL) | Clerk | Shadcn/ui, Tailwind CSS | Vite, Lovable.dev+Supabase |
| React Native + Expo | Supabase Realtime | Magic Links | Lucide React, Recharts | GitHub, Rork.app, v0 |
- Node.js 18+ and npm
- Clerk account
- Supabase project
-
Clone the repository
git clone https://github.com/veranyagaka/Bazaar.git cd bazaar # **Install dependencies npm install**
-
Set up Clerk Authentication
- Create a Clerk application at https://go.clerk.com/lovable
- Copy your publishable key
- Replace the demo key in
src/main.tsx
-
Set up Supabase
- Connect your Lovable project to Supabase using the green button
- Run the SQL schema from
SUPABASE_SETUP.md - Configure Row Level Security policies
-
Start development server
npm run dev
- Landing Page β Hero section with value proposition
- Sign Up β Choose role (Farmer / Buyer)
- Onboarding β Complete profile and set preferences
- Dashboard β Role-specific features
| Role | Key Actions |
|---|---|
| πΎ Farmers | Add crops, set prices/quality, view buyer matches, receive alerts, track sales |
| πͺ Buyers | Post needs, browse produce, set alerts, connect with farmers, manage procurement |
| π¨βπΌ Admins | Manage market data, verify users, analytics, moderation |
public/ # Static Files i.e images
server/ # Backend for AI assistant
src/
βββ components/ # Reusable UI components
β βββ Navigation.tsx # Main navigation bar
β βββ Hero.tsx # Landing page hero section
β βββ MarketFeed.tsx # Live market prices display
β βββ ChatWidget.tsx
β βββ RoleOnboarding.tsx
β βββ FarmerDashboard.tsx
β βββ BuyerDashboard.tsx
β βββ Footer.tsx
βββ pages/ # Page components
β βββ AdminDashbord.tsx
β βββ Alerts.tsx
β βββ Buyers.tsx
β βββ DiseaseDetection.tsx
β βββ Markets.tsx
β βββ Index.tsx # Main landing/dashboard page
β βββ NotFound.tsx # 404 error page
βββ types/ # TypeScript type definitions
β βββ index.ts # Core data models
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
β βββ supabaseClient.tsx
βββ styles/ # Global styles and themes
- User authentication and profiles
- Basic farmer and buyer dashboards
- Market price display
- Responsive design implementation
- Advanced matching algorithm
- Real-time price data integration
- Full mobile app development
- Payment integration
- AI-powered price predictions
- Multi-language support
The Market Matching System intelligently connects farmers with potential buyers using a sophisticated algorithm that analyzes location, crop type, quantity, price preferences, and delivery requirements.
- Smart Matching Algorithm: Weighted scoring system (Location 30%, Price 25%, Quantity 20%, Delivery 15%, Recency 10%)
- Real-time Results: Instant matching with buyers based on farmer preferences
- Advanced Filtering: Filter by match score, distance, price range, and delivery dates
- Market Insights: Analytics showing average match scores, best prices, and market demand
- Secure Communication: Protected contact system with Clerk authentication
| Component | Purpose |
|---|---|
| MarketMatch | Main interface for crop input and preferences |
| MatchResults | Displays matched buyers with scores and details |
| MatchFilters | Advanced filtering and sorting options |
| Frontend | Backend | AI/ML | Data Warehouse | Analytics |
|---|---|---|---|---|
| React + TypeScript | Supabase Edge Functions | OpenAI GPT-4o Vision | Azure Synapse / AWS Redshift / Google BigQuery | Real-time Dashboards |
| Tailwind CSS | PostgreSQL with RLS | Custom Agricultural Prompts | ETL Pipelines | Predictive Modeling |
- 17+ Supported Crops: Comprehensive crop type coverage
- 30% Minimum Match Score: Quality threshold for displayed results
- Multi-factor Scoring: Location, price, quantity, delivery, and recency
- Real-time Updates: Live market data integration
- Navigate to
/market-match(authentication required) - Input crop details and preferences
- Review matched buyers sorted by compatibility score
- Connect with buyers using built-in communication tools
π View Complete Technical Documentation
The full documentation includes detailed architecture diagrams, database schemas, API specifications, security considerations, testing strategies, and deployment guidelines.
An intelligent system that uses OpenAI Vision API (GPT-4o) to detect crop diseases in real-time, integrated with comprehensive data warehousing for agricultural analytics and market intelligence.
- AI-Powered Detection: Real-time crop disease identification using advanced computer vision
- High Accuracy Analysis: Confidence scoring, severity assessment, and treatment recommendations
- Data Warehousing: ETL pipelines for agricultural analytics and market intelligence
- Predictive Analytics: Yield forecasting, outbreak prediction, and economic impact modeling
- Real-time Dashboards: Live disease monitoring, market intelligence, and alert systems
| Component | Purpose |
|---|---|
| OpenAI Vision Integration | Real-time disease detection and analysis |
| Edge Functions | Image processing and API orchestration |
| Data Warehouse Sync | Analytics aggregation and insights |
| Predictive Models | Yield forecasting and risk assessment |
Frontend (React) β Supabase Edge Functions β OpenAI Vision API
β
Supabase Database
β
Data Warehouse (Azure/AWS/GCP)
- 17+ Crop Types: Comprehensive coverage of Kenyan agricultural crops
- Disease Identification: Automated pathogen detection and classification
- Severity Assessment: Mild, moderate, severe, and critical classifications
- Treatment Recommendations: Actionable intervention strategies
- Economic Impact: Yield loss estimation and market impact analysis
| Frontend | Backend | AI/ML | Data Warehouse | Analytics |
|---|---|---|---|---|
| React + TypeScript | Supabase Edge Functions | OpenAI GPT-4o Vision | Azure Synapse / AWS Redshift / Google BigQuery | Real-time Dashboards |
| Tailwind CSS | PostgreSQL with RLS | Custom Agricultural Prompts | ETL Pipelines | Predictive Modeling |
- 89% Average Confidence: High-accuracy disease detection
- Real-time Processing: Instant analysis and recommendations
- Multi-cloud Support: Azure, AWS, and GCP integration options
- Comprehensive Analytics: Disease patterns, market correlations, yield predictions
- Upload crop image through the web interface
- AI analyzes image and identifies potential diseases
- Receive detailed assessment with treatment recommendations
- Access analytics dashboard for broader insights
- Monitor disease patterns and market impacts
π View Complete Technical Documentation
The full documentation includes detailed system architecture, API specifications, database schemas, setup instructions for multiple cloud providers, security considerations, cost optimization strategies, and implementation roadmaps.
- β Authentication: Clerk handles secure user authentication
- β Authorization: Role-based access control (RBAC)
- β Data Protection: Row Level Security in Supabase
- β API Security: Protected endpoints and rate limiting
- β Input Validation: Client and server-side validation
- β Manual testing of flows (signup β match β chat)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
-
Vera Nyagaka β nyagakavera@gmail.com
-
Osborn Nyakaru - osbornnyakaru44@gmail.com
Built for the Vibe Coding Hackathon by PLP, 2025.
Made with β€οΈ for farmers and sustainable agriculture
Empowering small-scale farmers through technology and transparent markets.











