AI-assisted crop planning and farm intelligence platform with weather-aware recommendations.
AgroIntel is a full-stack web application designed to help farmers and agri-focused users make better crop decisions using:
- user profile + land details,
- weather insights from OpenWeather,
- crop recommendation logic,
- crop timeline and planning views.
The application uses Node.js + Express + EJS on the server side and MySQL for persistent storage.
- 🔐 User authentication (signup/login/logout)
- 👤 User profile with land area and location
- 🌦️ Weather-aware dashboard using OpenWeather API
- 🌱 Crop recommendation and selection workflow
- 📅 Crop timeline and harvest-date estimation
- 🧪 Land check page with simulated soil + weather signals
Left: Dashboard View • Right: Crop Recommendation / Selection View
Agrointel/
├── config/
│ └── db.js
├── controllers/
│ ├── authController.js
│ └── userController.js
├── ml_models/
│ ├── Crop_recommendation.csv
│ └── ml_service.js
├── routes/
│ ├── auth.js
│ └── user.js
├── views/
├── database_schema.sql
├── server.js
└── package.json
git clone https://github.com/aaravshah1311/Agrointel.git
cd Agrointelnpm installUse the included SQL schema file:
mysql -u root -p < database_schema.sqlThis creates:
agrointel_dbdatabaseuserstableuser_cropstable
Make sure your MySQL server is running and accessible at the host/port you configure in .env.
Create a .env file in the project root:
DB_HOST=127.0.0.1
DB_USER=YOUR-MYSQL-USERNAME
DB_PASSWORD=YOUR-MYSQL-PASSWORD
DB_NAME=agrointel_db
SESSION_SECRET=RANDOME-SESSION-SECERET-STRING
OPENWEATHER_API_KEY=OPENWEATHER-API-KEYDB_USER/DB_PASSWORD: your MySQL credentialsSESSION_SECRET: any long random secret stringOPENWEATHER_API_KEY: your API key from OpenWeather
npm startServer will start at:
http://127.0.0.1:3000
- MySQL server is running
- Database imported from
database_schema.sql -
.envfile created with valid credentials - Dependencies installed with
npm install - OpenWeather API key added
- Backend: Node.js, Express.js
- Templating: EJS
- Database: MySQL (
mysql2) - Auth/Security:
bcryptjs,express-session,connect-flash - External API: OpenWeather API
- Database connection errors
- Double-check
DB_HOST,DB_USER,DB_PASSWORD,DB_NAMEin.env.
- Double-check
- Weather data shows N/A
- Confirm
OPENWEATHER_API_KEYis valid and active.
- Confirm
- Session/login issues
- Ensure
SESSION_SECRETis set and restart the server.
- Ensure
Aarav Shah
- GitHub: https://github.com/aaravshah1311/
- Portfolio: https://aaravshah1311.is-great.net

