# 🌾 AI-Driven Smart Agriculture Marketplace (Digital Mandi)
A scalable full-stack web application that connects farmers and traders directly, eliminating middlemen and improving price transparency using AI-powered insights.
---
## 🚀 Overview
Digital Mandi is an intelligent agriculture marketplace that enables farmers to sell crops directly while allowing traders to bid in real-time. The platform integrates AI for crop quality grading and price prediction, ensuring fair and data-driven trade decisions.
---
## ✨ Key Features
### 🧑🌾 Farmer Features
* Direct crop listing to marketplace
* AI-based crop quality grading (image analysis)
* Smart price prediction based on crop & quality
* Real-time bid management (accept/reject)
* Secure deal closure with controlled data sharing
### 💼 Trader Features
* Browse AI-verified crop listings
* Place bids in real-time
* Track bids (pending, accepted, rejected)
* Access seller details only after bid acceptance
---
## 🛠️ Tech Stack
### Frontend
* React.js (Vite)
* Tailwind CSS
* Framer Motion
* Axios
### Backend
* Node.js
* Express.js
* MongoDB (Mongoose)
* JWT Authentication & Bcrypt
* MVC Architecture
### AI Integration
* Google Gemini API (for crop grading & pricing logic)
* ImageKit (cloud image storage)
---
## 🧠 Key Highlights
* Implemented **role-based authentication (RBAC)** for secure access
* Designed **RESTful APIs** for scalable backend architecture
* Integrated **AI-driven decision-making** for crop grading and pricing
* Ensured **data privacy** by restricting sensitive information access
* Optimized database queries for better performance
---
## ⚙️ Installation & Setup
### Prerequisites
* Node.js
* MongoDB (Local / Atlas)
* Python (for AI services)
---
### Clone Repository
```bash
git clone
github.com
cd digital-mandi
```
---
### Backend Setup
```bash
cd backend
npm install
```
Create `.env` file:
```env
PORT=5000
MONGODB_URI=your_mongodb_uri
JWT_SECR …