AgriConnect is a comprehensive farming platform designed to empower farmers with modern technology solutions. The platform provides a suite of tools for agricultural management, product identification, yield prediction, and community support.
- Upload images of fertilizers, pesticides, herbicides, and more
- AI-powered identification of agricultural products
- Provides usage instructions, dosage information, and safety details
- Support for multiple languages (English, Hindi, Marathi, and more)
- Voice-based information playback in regional languages
- Crop yield prediction using machine learning models
- Smart irrigation recommendations based on soil type, crop, and weather
- Soil testing reports with nutrient recommendations
- Crop rotation and planning tools
- Expense tracking and management dashboard
- Income forecasting based on yield predictions
- ROI calculators for different crops and farming techniques
- Financial report generation
- Bulk ordering of farm supplies at discounted rates
- Direct connection with suppliers, eliminating middlemen
- Product comparisons and reviews
- Order tracking and history
- Schedule consultations with agricultural experts
- Village-level awareness sessions
- Knowledge base with best practices
- Personalized recommendations
- Weather forecasts and alerts
- Market price integration for crops
- Government scheme notifications
- Pest outbreak warnings
- Farmer forums and discussion boards
- Success story sharing
- Local farming group creation
- Question and answer platform
- Next.js (v13.4+) - React framework for server-side rendering and static site generation
- Tailwind CSS (v3.3+) - Utility-first CSS framework
- React Native (v0.71+) - For mobile applications
- shadcn/ui - UI component library
- i18next - Internationalization framework
- Next.js API Routes - Serverless functions for API endpoints
- Express (v4.18+) - For dedicated API servers
- Node.js (v18+) - JavaScript runtime
- MongoDB Atlas - Cloud-hosted MongoDB service
- Mongoose (v7+) - MongoDB object modeling
- Auth.js (v4+) - Authentication for Next.js
- JWT - Token-based authentication
- Python (v3.9+) - For ML microservices
- Flask (v2.3+) - Lightweight web framework for Python
- TensorFlow (v2.12+) / PyTorch (v2.0+) - ML frameworks
- Cloudinary - Image analysis and processing
- Roboflow / Hugging Face - Pre-trained models and model hosting
- Web Speech API - Browser-based TTS
- Google Translate TTS API - For regional language support
- Vercel - Frontend and Next.js API hosting
- Railway or Render - Backend service hosting
- GitHub Actions - CI/CD pipeline
- OpenWeather API - Weather data
- Government APIs - Market prices and agricultural schemes
- WhatsApp Cloud API - Farmer notifications and alerts
- Node.js (v18.0.0 or higher)
- npm (v9.0.0 or higher) or yarn (v1.22.0 or higher)
- Python (v3.9 or higher) for ML services
- MongoDB account
- Cloudinary account
Create a .env.local file in the root directory with the following variables:
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# MongoDB
MONGODB_URI=your_mongodb_connection_string
# Authentication
NEXTAUTH_SECRET=your_random_string_here
NEXTAUTH_URL=http://localhost:3000
# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# OpenWeather
NEXT_PUBLIC_OPENWEATHER_API_KEY=your_openweather_api_key
# WhatsApp Cloud API (optional)
WHATSAPP_API_TOKEN=your_whatsapp_token
WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id
# Google Translate TTS (optional)
GOOGLE_TRANSLATE_API_KEY=your_google_api_key
-
Clone the repository
git clone https://github.com/yourusername/agriconnect.git cd agriconnect -
Install frontend dependencies
npm install # or yarn install -
Run the development server
npm run dev # or yarn dev -
Open http://localhost:3000 with your browser to see the result.
-
Create a Python virtual environment
cd ml-services python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install required Python packages
pip install -r requirements.txt
-
Start the ML service
python app.py
agriconnect/
βββ app/ # Next.js app directory
β βββ api/ # API routes
β βββ (auth)/ # Authentication pages
β βββ (dashboard)/ # Dashboard pages
β βββ marketplace/ # Marketplace pages
β βββ product-identifier/ # Product identification pages
βββ components/ # React components
β βββ ui/ # UI components (shadcn/ui)
β βββ forms/ # Form components
β βββ layout/ # Layout components
βββ lib/ # Utility functions and hooks
βββ public/ # Static assets
βββ styles/ # Global styles
βββ ml-services/ # Python ML services
β βββ crop_prediction/ # Crop yield prediction models
β βββ product_recognition/ # Product recognition models
βββ .env.local # Environment variables
βββ next.config.js # Next.js configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ package.json # Project dependencies
POST /api/product-identification- Identify agricultural products from images
POST /api/crop/predict-yield- Predict crop yield based on parametersGET /api/soil-reports/:id- Get soil testing reportsPOST /api/irrigation/recommend- Get irrigation recommendations
GET /api/marketplace/products- List available productsPOST /api/marketplace/orders- Create a new orderGET /api/marketplace/orders/:id- Get order details
POST /api/experts/schedule- Schedule an expert consultationGET /api/experts/sessions- List upcoming awareness sessions
GET /api/weather/:location- Get weather forecastGET /api/market-prices/:crop- Get current market prices
- 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 - see the LICENSE file for details.
- All the farmers who provided valuable feedback during testing
- Agricultural experts who contributed domain knowledge
- Open-source community for the tools and libraries used in this project