AgriHub is an AI-powered agricultural marketplace and credit platform designed to help farmers:
- Sell produce more efficiently
- Build verifiable transaction histories
- Access loans based on real economic activity
The platform combines:
- Marketplace (farmers ↔ buyers)
- Machine Learning (credit scoring)
- Payment integration (loan disbursement & repayment)
Millions of farmers:
- Sell products informally and struggle to find competitive buyers
- Lack financial records
- Cannot access loans
Traditional lenders require:
- Bank history
- Credit score
- Collateral
Most farmers do not have these.
AgriHub creates a digital financial identity for farmers using:
- Transaction activity
- Marketplace behavior
- Repayment patterns
It then uses machine learning to:
- Predict loan eligibility
- Recommend safe loan amounts
"Your farming activity becomes your credit score"
Frontend (Next.js)
↓
Backend Services
├── ML Credit Scoring API (FastAPI)
├── Payment Integration (Interswitch)
↓
Cloud Services (Firebase)
Farmers can:
- Create listings
- Upload produce images
- Set prices and quantities
Buyers can:
- Browse products
- View details
- Place orders
The system tracks:
- Completed sales
- Transaction values
- Frequency of activity
This data is used for credit scoring.
Planned flow:
- Buyers pay for produce
- Farmers receive funds
- Loan repayment processing
Supports:
- Direct payments
- integration with providers (e.g., Interswitch)
Separate repository:
https://github.com/Jaykay73/Agrihub-ML
This service:
- Receives farmer activity data
- Processes it using a trained model
- Returns:
{
"credit_score": 78,
"loan_eligible": true,
"probability_of_eligibility": 0.78
}- Total sales
- Number of transactions
- Average transaction value
- Activity frequency
- Repayment history
- High-value transactions
- Blockchain verification ratio
- Credit score (0–100)
- Loan eligibility
- Suggested loan amount
- Risk level
- Farmer builds transaction history
- ML model evaluates risk
- Loan is approved or rejected
If approved:
- Funds are disbursed via payment API
- Farmer repays over time
- Repayment updates future scores
- Lists produce
- Receives orders
- Builds credit history
- Applies for loans
- Browses marketplace
- Purchases produce
- Interacts with sellers
- Evaluates credit scores
- Approves loans
- Manages repayments
- Next.js
- React
- TypeScript
- Tailwind CSS
- Framer Motion
- FastAPI (ML API)
- Python (ML models)
- Firebase (data storage)
- scikit-learn
- pandas
- numpy
- React Query (data fetching)
AgriHub/
├── app/ # Next.js routes (buyer, farmer, auth)
├── features/ # Business logic modules
│ ├── marketplace/
│ ├── loans/
│ ├── payments/
│ ├── orders/
│ └── listings/
├── lib/ # Utilities (firebase, cloudinary, etc.)
├── shared/ # Shared components & types
├── ml-service/ # Local ML service copy
npm install
npm run devOpen: http://localhost:3000
cd agrihub-ml
pip install -r requirements.txt
uvicorn app:app --reloadOpen: http://127.0.0.1:8000/docs
Example:
fetch("/credit-score", {
method: "POST",
body: JSON.stringify(data)
});AgriHub aims to:
- Empower farmers financially
- Reduce loan risk using data
- Digitize agricultural trade
- Create fair access to credit
AgriHub does not just sell farm produce.
It turns economic activity into financial identity.
Built by: Aledare John Oluwaseun (ML Engineer) Onoja Possible (Fullstack Engineer)