# ๐พ 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:
` โฆ