Skip to content

codinggita/kisanmitra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌾 Kisanmitra – Farmer Help & Support Platform

AgriConnect is a Full Stack Web Application designed to help farmers get support for farming-related problems. Farmers can post their issues, get solutions from other farmers or experts, and access useful agricultural information.

This platform aims to digitally connect farmers, share knowledge, and solve real-world agricultural problems.


πŸš€ Features

πŸ” Authentication

  • User Signup
  • User Login
  • Password validation
  • Protected routes
  • LocalStorage based authentication

πŸ“ Farmer Problem Posting

Farmers can share their farming problems such as:

  • Crop diseases
  • Soil issues
  • Irrigation problems
  • Pest attacks

Users can:

  • Create posts
  • Read posts
  • Update posts
  • Delete posts

πŸ” Search, Filter & Sort

  • Search problems by crop name or title
  • Filter by problem category
  • Sort by latest posts

πŸ“„ Pagination

Large datasets are handled with pagination using:

  • MongoDB limit
  • MongoDB skip

πŸŒ™ Theme Support

  • Light Mode
  • Dark Mode
  • Theme preference saved in LocalStorage

⚑ Debouncing

Search input uses debouncing to reduce unnecessary API calls.

πŸ“± Responsive UI

Built using Tailwind CSS to support:

  • Desktop
  • Tablet
  • Mobile devices

⚠ Error Handling

  • Backend API error responses
  • Frontend error messages
  • Try–catch blocks for API requests

πŸ›  Tech Stack

Frontend

  • React.js
  • Tailwind CSS
  • React Router
  • Context API

Backend

  • Node.js
  • Express.js

Database

  • MongoDB

🧠 React Hooks Used

  • useState – Manage component state
  • useEffect – Handle API calls
  • useRef – DOM access and search focus
  • useContext – Global state management

πŸ“‚ Project Structure

Frontend

client/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components
β”‚   β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ context
β”‚   β”œβ”€β”€ hooks
β”‚   β”œβ”€β”€ services
β”‚   β”œβ”€β”€ utils
β”‚   └── App.jsx

Backend

server/
β”‚
β”œβ”€β”€ controllers
β”œβ”€β”€ models
β”œβ”€β”€ routes
β”œβ”€β”€ middleware
β”œβ”€β”€ config
└── server.js

πŸ“Š Database Schema

Users Collection

{
  name: String,
  email: String,
  password: String,
  location: String,
  createdAt: Date
}

Problems Collection

{
  title: String,
  description: String,
  cropType: String,
  image: String,
  createdBy: ObjectId,
  createdAt: Date
}

Solutions Collection

{
  solutionText: String,
  problemId: ObjectId,
  postedBy: ObjectId,
  createdAt: Date
}

πŸ”— API Routes

Authentication

POST /api/auth/signup
POST /api/auth/login

Problems

GET /api/problems
GET /api/problems/:id
POST /api/problems
PUT /api/problems/:id
DELETE /api/problems/:id

Solutions

POST /api/solutions
GET /api/solutions/:problemId

βš™ Installation

1️⃣ Clone Repository

git clone https://github.com/yourusername/agriconnect.git

2️⃣ Install Dependencies

Backend

cd server
npm install

Frontend

cd client
npm install

3️⃣ Run Project

Backend

npm start

Frontend

npm run dev

🌍 Future Improvements

  • Weather API integration
  • Mandi price updates
  • Image upload for crop diseases
  • Farmer community discussion forum
  • Expert consultation system

Developed by Drup Patel

Full Stack Hackathon Project πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors