Skip to content

Repository files navigation

KisanMitra App 🌾

A comprehensive agricultural management platform built with Next.js, designed to empower farmers with modern tools and resources for better farming practices.

πŸš€ Features

Core Modules

  • AI Chat Assistant - Intelligent chatbot for farming queries and guidance
  • Photo Analysis - AI-powered crop and pest detection using image analysis
  • FarmerScope - Real-time farm advisories from kisanmitra.net
  • PestScope - Latest pest alerts and management strategies
  • Guides - Comprehensive farming guides and best practices
  • Community - Connect with other farmers and share knowledge
  • Calendar - Crop planning and seasonal activity management
  • Suppliers - Find and connect with agricultural suppliers
  • Tracking - Monitor crop growth and farm activities
  • Dashboard - Overview of all farm operations and analytics
  • Plan - Strategic crop planning and resource management
  • Grow - Growth tracking and optimization tools
  • Sell - Marketplace features for selling produce

Technical Features

  • 🌍 Multi-language support (i18n)
  • πŸ“± Responsive mobile-first design
  • 🎨 Modern UI with Tailwind CSS
  • πŸ”„ Real-time data fetching with Next.js API routes
  • 🌐 Web scraping integration for live agricultural advisories
  • ⚑ Optimized performance with React 19

πŸ“¦ Dependencies

Production Dependencies

{
  "cheerio": "^1.1.2",           // Web scraping for farm advisories
  "lucide-react": "^0.548.0",    // Modern icon library
  "next": "^16.0.2",             // React framework
  "prettier": "^3.6.2",          // Code formatting
  "react": "19.2.0",             // UI library
  "react-dom": "19.2.0"          // React DOM renderer
}

Development Dependencies

{
  "@types/node": "^20",          // Node.js type definitions
  "@types/react": "^19",         // React type definitions
  "@types/react-dom": "^19",     // React DOM type definitions
  "autoprefixer": "^10.4.21",    // PostCSS plugin for CSS prefixing
  "eslint": "^9",                // JavaScript linter
  "eslint-config-next": "^16.0.2", // Next.js ESLint configuration
  "postcss": "^8.5.6",           // CSS transformer
  "tailwindcss": "^3.4.14",      // Utility-first CSS framework
  "tailwindcss-animate": "^1.0.7", // Animation utilities for Tailwind
  "typescript": "^5"             // TypeScript compiler
}

πŸ› οΈ Installation

  1. Clone the repository
git clone https://github.com/Agriworks/kisanmitra_app.git
cd kisanmitra_app
  1. Install dependencies
npm install
# or
yarn install
# or
pnpm install

πŸš€ Getting Started

Development Server

Run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the application.

Available Scripts

npm run dev      # Start development server
npm run build    # Build for production
npm run start    # Start production server
npm run lint     # Run ESLint
npm run format   # Format code with Prettier

πŸ“ Project Structure

kisanmitra_app/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/                    # API routes
β”‚   β”‚   β”œβ”€β”€ farmer-scope/       # Farm advisory scraping API
β”‚   β”‚   └── pest-scope/         # Pest alert scraping API
β”‚   β”œβ”€β”€ components/             # React components
β”‚   β”‚   β”œβ”€β”€ CalendarView.tsx
β”‚   β”‚   β”œβ”€β”€ ChartBot.tsx
β”‚   β”‚   β”œβ”€β”€ Community.tsx
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx
β”‚   β”‚   β”œβ”€β”€ FarmerScope.tsx
β”‚   β”‚   β”œβ”€β”€ FeaturesComing.tsx
β”‚   β”‚   β”œβ”€β”€ Grow.tsx
β”‚   β”‚   β”œβ”€β”€ Guides.tsx
β”‚   β”‚   β”œβ”€β”€ LanguageSelection.tsx
β”‚   β”‚   β”œβ”€β”€ PestScope.tsx
β”‚   β”‚   β”œβ”€β”€ PhotoAnalysis.tsx
β”‚   β”‚   β”œβ”€β”€ Plan.tsx
β”‚   β”‚   β”œβ”€β”€ Sell.tsx
β”‚   β”‚   β”œβ”€β”€ SplashScreen.tsx
β”‚   β”‚   β”œβ”€β”€ Suppliers.tsx
β”‚   β”‚   └── Tracking.tsx
β”‚   β”œβ”€β”€ globals.css             # Global styles
β”‚   β”œβ”€β”€ i18n.tsx                # Internationalization setup
β”‚   β”œβ”€β”€ layout.tsx              # Root layout
β”‚   β”œβ”€β”€ page.tsx                # Main page
β”‚   └── providers.tsx           # Context providers
β”œβ”€β”€ public/                     # Static assets
β”œβ”€β”€ eslint.config.mjs           # ESLint configuration
β”œβ”€β”€ next.config.ts              # Next.js configuration
β”œβ”€β”€ package.json                # Project dependencies
β”œβ”€β”€ postcss.config.js           # PostCSS configuration
β”œβ”€β”€ tailwind.config.js          # Tailwind CSS configuration
└── tsconfig.json               # TypeScript configuration

🎨 Styling

This project uses:

  • Tailwind CSS - Utility-first CSS framework
  • tailwindcss-animate - Pre-built animations
  • Lucide React - Beautiful, consistent icons
  • PostCSS - CSS transformations

🌐 API Routes

FarmerScope API (/api/farmer-scope)

  • Scrapes live farm advisories from kisanmitra.net
  • Returns categorized farming advice and updates
  • Provides latest agricultural news and recommendations

PestScope API (/api/pest-scope)

  • Fetches real-time pest alerts
  • Returns pest management strategies
  • Provides preventive measures and treatments

πŸ”§ Configuration

TypeScript

The project is fully typed with TypeScript for better developer experience and code quality.

ESLint

Configured with Next.js recommended rules for consistent code style.

Prettier

Automatic code formatting on save for clean and consistent code.

🌍 Internationalization

The app supports multiple languages through the i18n system in app/i18n.tsx. Language selection is available through the LanguageSelection component.

πŸ“± Responsive Design

Built mobile-first with responsive breakpoints:

  • Mobile: < 768px
  • Tablet: 768px - 1024px
  • Desktop: > 1024px

πŸš€ Deployment

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform.

Deploy with Vercel

Build for Production

npm run build
npm run start

πŸ“š Learn More

To learn more about the technologies used:

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is private and proprietary.

πŸ‘₯ Team

Developed by Agriworks


KisanMitra - Empowering farmers through technology 🌾

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages