Skip to content

Tejas-Dherange/Agri_Connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AgriConnect

AgriConnect Logo

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.

Features

πŸ” Agricultural Product Identification

  • 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 Management

  • 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

πŸ’° Financial Management

  • Expense tracking and management dashboard
  • Income forecasting based on yield predictions
  • ROI calculators for different crops and farming techniques
  • Financial report generation

πŸ›’ Marketplace

  • Bulk ordering of farm supplies at discounted rates
  • Direct connection with suppliers, eliminating middlemen
  • Product comparisons and reviews
  • Order tracking and history

πŸ‘¨β€πŸ”¬ Expert Support

  • Schedule consultations with agricultural experts
  • Village-level awareness sessions
  • Knowledge base with best practices
  • Personalized recommendations

🌧️ Real-time Information

  • Weather forecasts and alerts
  • Market price integration for crops
  • Government scheme notifications
  • Pest outbreak warnings

πŸ‘₯ Community Features

  • Farmer forums and discussion boards
  • Success story sharing
  • Local farming group creation
  • Question and answer platform

Technology Stack

Frontend

  • 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

Backend

  • Next.js API Routes - Serverless functions for API endpoints
  • Express (v4.18+) - For dedicated API servers
  • Node.js (v18+) - JavaScript runtime

Database

  • MongoDB Atlas - Cloud-hosted MongoDB service
  • Mongoose (v7+) - MongoDB object modeling

Authentication

  • Auth.js (v4+) - Authentication for Next.js
  • JWT - Token-based authentication

Machine Learning & AI

  • 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

Text-to-Speech

  • Web Speech API - Browser-based TTS
  • Google Translate TTS API - For regional language support

Cloud & DevOps

  • Vercel - Frontend and Next.js API hosting
  • Railway or Render - Backend service hosting
  • GitHub Actions - CI/CD pipeline

APIs & Integration

  • OpenWeather API - Weather data
  • Government APIs - Market prices and agricultural schemes
  • WhatsApp Cloud API - Farmer notifications and alerts

Setup Guide

Prerequisites

  • 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

Environment Variables

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

Installation Steps

  1. Clone the repository

    git clone https://github.com/yourusername/agriconnect.git
    cd agriconnect
  2. Install frontend dependencies

    npm install
    # or
    yarn install
  3. Run the development server

    npm run dev
    # or
    yarn dev
  4. Open http://localhost:3000 with your browser to see the result.

Setting up ML services (optional)

  1. Create a Python virtual environment

    cd ml-services
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  2. Install required Python packages

    pip install -r requirements.txt
  3. Start the ML service

    python app.py

Project Structure

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

API Endpoints

Product Identification

  • POST /api/product-identification - Identify agricultural products from images

Crop Management

  • POST /api/crop/predict-yield - Predict crop yield based on parameters
  • GET /api/soil-reports/:id - Get soil testing reports
  • POST /api/irrigation/recommend - Get irrigation recommendations

Marketplace

  • GET /api/marketplace/products - List available products
  • POST /api/marketplace/orders - Create a new order
  • GET /api/marketplace/orders/:id - Get order details

Expert Support

  • POST /api/experts/schedule - Schedule an expert consultation
  • GET /api/experts/sessions - List upcoming awareness sessions

Weather & Market Data

  • GET /api/weather/:location - Get weather forecast
  • GET /api/market-prices/:crop - Get current market prices

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors