A full-stack web application for farmers to access weather information, crop advisory, market prices, and government schemes.
- User Authentication (Register/Login)
- Weather Forecast (5-day)
- Crop Advisory
- Market Prices
- Government Schemes
- Farmer Forum
- Frontend: React + TailwindCSS (Vite)
- Backend: Node.js + Express
- Database: MongoDB
- Node.js (v14 or higher)
- MongoDB
- OpenWeatherMap API key
- Clone the repository:
git clone <repository-url>
cd agriconnect- Install backend dependencies:
cd backend
npm install- Create a
.envfile in the backend directory:
PORT=5000
MONGO_URI=mongodb://localhost:27017/agriconnect
JWT_SECRET=your_jwt_secret_key_here
OPENWEATHER_API_KEY=your_openweather_api_key_here
- Install frontend dependencies:
cd ../frontend
npm install- Start the backend server:
cd ../backend
npm run dev- Start the frontend development server:
cd ../frontend
npm run dev- Open your browser and navigate to
http://localhost:5173
- POST
/api/auth/register- Register a new user - POST
/api/auth/login- Login user
- GET
/api/weather/:location- Get 5-day weather forecast
- GET
/api/crops/:season- Get crops for a season - GET
/api/crops/:season/:crop- Get crop advisory
- GET
/api/market- Get all market prices - GET
/api/market/:crop- Get price for specific crop
- GET
/api/schemes- Get all government schemes - GET
/api/schemes/:id- Get scheme by ID
- GET
/api/forum- Get all forum posts - POST
/api/forum- Create new post - DELETE
/api/forum/:id- Delete post
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.