GreenGrow is a comprehensive agricultural advisory platform that leverages artificial intelligence to help farmers make informed decisions about crop cultivation, disease management, weather patterns, and market prices. It's designed to bridge the gap between traditional farming knowledge and modern AI technology, making advanced agricultural insights accessible to farmers everywhere.
π― Click to explore the live experience of GreenGrow's user-friendly interface and advanced AI-powered features.
- Text-based queries: Ask questions about crop cultivation, pest management, soil health, and farming best practices
- Context-aware responses: AI understands your location and provides location-specific advice
- Multi-turn conversations: Maintain conversation context for better assistance
- Upload crop images for instant disease diagnosis
- Powered by TensorFlow deep learning model
- Detects 15+ plant diseases across Pepper, Potato, and Tomato crops
- Integration with Google Gemini Vision API for enhanced analysis
- Provides treatment recommendations and prevention tips
- Live voice interaction with AI farming advisor
- Voice command processing for hands-free operation
- Real-time context injection from multiple data sources
- Natural language understanding for farming queries
- Real-time weather forecasts for your location
- 7-day weather predictions
- Weather alerts and notifications
- Location-based weather data integration
- Interactive weather widgets
- Real-time agricultural commodity prices
- Multiple mandi (market) information
- Price trends and historical data
- Crop-specific market insights
- Help farmers make informed selling decisions
- Crop recommendations based on location and season
- Detailed crop information and growing guides
- Pest and disease management for specific crops
- Seasonal planting calendars
- Farm data tracking and management
- Information about available agricultural schemes
- Eligibility criteria and application processes
- Scheme benefits and requirements
- Location-based scheme recommendations
- Create and manage farm profiles
- Track farm statistics and metrics
- Store farm location and details
- View farm-specific recommendations
- Community forum for farmer discussions
- Help center with FAQs and guides
- Support system for technical assistance
- Knowledge sharing platform
- User profile management
- Notification preferences
- Location settings
- Theme and display preferences
- Secure user registration and login
- JWT-based authentication
- Protected routes and API endpoints
- User session management
- React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for modern, responsive UI
- React Router for navigation
- Lucide React for icons
- Axios for API calls
- VAPI AI for voice assistant integration
- Node.js with Express.js
- MongoDB with Mongoose for database
- JWT for authentication
- Multer for file uploads
- CORS enabled for cross-origin requests
- Morgan for HTTP request logging
- Google Gemini 2.0 Flash for chat and vision analysis
- TensorFlow/Keras for disease detection model
- Flask for Python ML backend
- Axicov for AI workflow management
- OpenWeatherMap API for weather data
- Government Mandi APIs for market prices
- News APIs for agricultural news
- Node.js (v18 or higher)
- Python 3.8+ (for Flask backend)
- MongoDB (local or cloud instance)
- Git
git clone https://github.com/your-username/GreenGrow.git
# Navigate to the project directory
cd GreenGrow# Navigate to server directory
cd server
# Install dependencies
npm install
# Create .env file (copy from .env.example if available)
# Add your environment variables:
# MONGODB_URI=your-mongodb-connection-string
# JWT_SECRET=your-jwt-secret-key
# GEMINI_API_KEY=your-google-gemini-api-key
# OPENWEATHER_API_KEY=your-openweather-api-key
# FLASK_API_URL=http://localhost:5001
# Start the backend server
npm run dev
# Or for production
npm startThe server will start on http://localhost:5000
# Navigate to backend directory
cd backend
# Create virtual environment (Windows)
python -m venv venv
venv\Scripts\activate
# Or on Linux/Mac
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Or use the setup script
# Windows: setup_venv.bat
# Linux/Mac: chmod +x setup_venv.sh && ./setup_venv.sh
# Start Flask server
python app.pyThe Flask server will start on http://localhost:5001
# Open a new terminal and navigate to Client directory
cd Client
# Install dependencies
npm install
# Create .env file if needed
# VITE_API_URL=http://localhost:5000/api
# Start the development server
npm run devThe frontend will start on http://localhost:5173 (or another port if 5173 is busy)
Create .env files in both server and Client directories:
server/.env:
MONGODB_URI=mongodb://localhost:27017/greengrow
JWT_SECRET=your-super-secret-jwt-key-here
GEMINI_API_KEY=your-google-gemini-api-key
OPENWEATHER_API_KEY=your-openweather-api-key
FLASK_API_URL=http://localhost:5001
AXICOV_API_KEY=your-axicov-api-key (optional)
AXICOV_API_BASE=https://api.axicov.com/v1 (optional)Client/.env:
VITE_API_URL=https://greengrow-n9g5.onrender.com/api- Start MongoDB (if running locally)
- Start Flask backend:
cd backend && python app.py - Start Node.js server:
cd server && npm run dev - Start React frontend:
cd Client && npm run dev - Open
http://localhost:5173in your browser
GreenGrow/
βββ backend/ # Flask backend for disease detection
β βββ app.py # Flask application
β βββ requirements.txt # Python dependencies
β βββ venv/ # Python virtual environment
βββ Client/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ context/ # React context providers
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility libraries
β βββ package.json
β βββ vite.config.ts
βββ server/ # Node.js backend
β βββ src/
β β βββ routes/ # API routes
β β βββ controllers/ # Route controllers
β β βββ models/ # Database models
β β βββ middleware/ # Express middleware
β β βββ services/ # Business logic services
β β βββ config/ # Configuration files
β βββ package.json
β βββ uploads/ # Uploaded files directory
βββ model/ # ML model files
β βββ disease_model/ # TensorFlow model
βββ Readme.md # Project documentation
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/me- Get current user
POST /api/chat/message- Send text message to AI assistantPOST /api/chat/image-analysis- Upload image for disease detectionPOST /api/chat/voice-command- Process voice commandsPOST /api/chat/live-voice- Live voice assistant session
GET /api/mandi- Get market pricesGET /api/news- Get agricultural news
GET /api/health- Node.js server healthGET /health- Flask server health (port 5001)
# Test backend API
cd server
npm test
# Test frontend
cd Client
npm testcd server
npm run build
npm startcd Client
npm run build
# Deploy the 'dist' folder to your hosting serviceThe Flask backend can be deployed using:
- Heroku
- AWS Elastic Beanstalk
- Google Cloud Run
- Railway
- Render
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- Google Gemini API for AI capabilities
- TensorFlow team for ML framework
- OpenWeatherMap for weather data
- All open-source contributors