# 🌾 Smart Mandi Intelligence System
A complete web application for farmers to compare crop prices across different mandis (markets), predict price trends, and get smart selling recommendations.
## ✨ Features
### For Farmers
- 📍 **Mandi Comparison** - Compare prices across all nearby mandis with transport cost calculation
- 🔮 **Price Prediction** - AI-powered 7-day price forecast using moving average algorithm
- 🏆 **Best Price Finder** - Automatically finds the mandi offering highest net profit
- 💡 **Smart Insights** - Get recommendations like "Sell now" or "Wait 2 days"
- 🔔 **Alert System** - Notifications when prices rise or high demand is detected
- 🌾 **My Crops** - Track crops you want to sell
### Technical
- 🔐 Secure login/signup system
- 📱 Fully mobile responsive
- 🗣️ Hindi/English bilingual support
- 📊 Interactive charts (Chart.js)
- 🗄️ MySQL database
## 🏗️ Tech Stack
| Layer | Technology |
|-------|------------|
| Frontend | HTML, CSS, JavaScript, Chart.js |
| Backend | PHP 7.4+ |
| Database | MySQL 5.7+ |
| Server | Apache (XAMPP) |
## 📁 Project Structure
```
mandi/
├── api/ # API endpoints
│ ├── auth.php # Login/Register APIs
│ ├── mandi.php # Mandi data & prediction APIs
│ └── crop-entry.php # Crop management APIs
├── assets/
│ └── css/
│ └── style.css # Main stylesheet
├── config/
│ └── database.php # Database connection
├── database/
│ └── schema.sql # Database schema (optional)
├── index.php # Homepage
├── login.php # Login page
├── signup.php # Registration page
├── dashboard.php # Main dashboard
├── setup.php # Database setup script
├── logout.php # Logout handler
└── README.md # This file
```
## 🚀 Installation Steps
### Prerequisites
- XAMPP installed (Apache + MySQL)
- PHP 7.4 or higher
- MySQL 5.7 or higher
### Step 1: Place Files in XAMPP
Copy this entire `mandi` folder to:
` …