Skip to content

sanchit-dhir/FarmHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌊 Brainwave - FarmHelper AI

A modern, AI-powered agricultural advisory platform built with React and Vite. Brainwave provides intelligent soil analysis, crop recommendations, and farming guidance to help farmers make data-driven decisions.

Team Details

Team: T027 Team Name : 404 Brain not found!

✨ Features

🎯 Core Functionality

  • AI-Powered Soil Analysis: Get personalized soil advisory based on locality, crop type, and growth stage
  • Fertilizer Recommendations: Detailed fertilizer suggestions with quantities and application timing
  • Organic Alternatives: Eco-friendly farming options and sustainable practices
  • Irrigation Advice: Smart watering recommendations for optimal crop growth
  • Soil Health Tips: Expert guidance for maintaining healthy soil
  • Safety Alerts: Important cautions and warnings for safe farming practices

🎨 Modern UI/UX

  • Glassmorphism Design: Beautiful glass-like effects with backdrop blur
  • Gradient Backgrounds: Animated gradient elements for visual appeal
  • Responsive Layout: Seamless experience across all devices
  • Smooth Animations: Fluid transitions and hover effects
  • Dark Theme: Modern dark interface with excellent contrast
  • Audio Integration: Play audio guidance for better accessibility

πŸ” User Management

  • Secure Registration: Email verification with OTP system
  • User Authentication: JWT-based secure login
  • Session Management: Persistent user sessions
  • Form Validation: Real-time input validation and error handling

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Git
  • MongoDB (local or cloud)

Quick Start (Recommended)

  1. Clone the repository bash git clone https://github.com/Supanjit-Singh/FarmHelper.git cd FarmHelper

  2. Start Backend Server bash

    Windows

    start-backend.bat

    Or manually

    cd server npm install npm run dev

  3. Start Frontend (in new terminal) bash

    Windows

    start-frontend.bat

    Or manually

    cd brainwave npm install npm run dev

  4. Open your browser

Manual Installation

Backend Setup

bash cd server npm install cp env.example .env

Edit .env with your configuration

npm run dev

Frontend Setup

bash cd brainwave npm install npm run dev

Build for Production

bash

Frontend

cd brainwave npm run build

Backend

cd server npm start

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern React with hooks
  • Vite - Fast build tool and dev server
  • Tailwind CSS - Utility-first CSS framework
  • React Router DOM - Client-side routing
  • Axios - HTTP client for API calls
  • React Hot Toast - Beautiful toast notifications

Styling & UI

  • Custom Design System - Consistent color palette and typography
  • Glassmorphism Effects - Modern glass-like UI elements
  • Responsive Design - Mobile-first approach
  • Smooth Animations - CSS transitions and transforms

Development Tools

  • ESLint - Code linting and formatting
  • PostCSS - CSS processing
  • Autoprefixer - CSS vendor prefixing

πŸ“ Project Structure

brainwave/ β”œβ”€β”€ public/ # Static assets β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ assets/ # Images, audio files, and icons β”‚ β”‚ β”œβ”€β”€ benefits/ # Benefit section assets β”‚ β”‚ β”œβ”€β”€ name.mp3 # Audio guidance files β”‚ β”‚ └── email.mp3 β”‚ β”œβ”€β”€ components/ # Reusable UI components β”‚ β”œβ”€β”€ pages/ # Main application pages β”‚ β”‚ β”œβ”€β”€ Dashboard.jsx # Main advisory dashboard β”‚ β”‚ β”œβ”€β”€ Login.jsx # User authentication β”‚ β”‚ └── Register.jsx # User registration β”‚ β”œβ”€β”€ App.jsx # Main application component β”‚ └── index.css # Global styles β”œβ”€β”€ package.json # Dependencies and scripts β”œβ”€β”€ tailwind.config.js # Tailwind configuration β”œβ”€β”€ vite.config.js # Vite configuration └── README.md # Project documentation

🎯 Key Pages

Dashboard (/dashboard)

  • Soil Advisory Form: Input locality, crop type, growth stage, and soil type
  • AI Analysis: Get comprehensive farming recommendations
  • Response Cards: Organized display of fertilizer, irrigation, and health tips
  • Safety Alerts: Important cautions and warnings

Authentication

  • Login (/login): Secure user authentication with audio guidance
  • Register (/register): User registration with email verification
  • OTP Verification: Two-step verification process

🎨 Design System

Color Palette

  • Primary Colors: Modern gradient combinations
  • Neutral Colors: Dark theme with proper contrast
  • Accent Colors: Color-coded sections for different content types

Typography

  • Headings: Clear hierarchy with proper sizing
  • Body Text: Readable fonts with optimal line height
  • Labels: Consistent form labeling

Components

  • Input Fields: Modern rounded inputs with icons
  • Buttons: Gradient buttons with hover effects
  • Cards: Glassmorphism cards with backdrop blur
  • Tables: Clean, responsive data tables

πŸ”§ Available Scripts

bash

Development

npm run dev # Start development server npm run build # Build for production npm run preview # Preview production build npm run lint # Run ESLint

Audio Features

- Play audio guidance for form fields

- Accessible audio feedback

- MP3 audio integration

🌐 API Integration

The application integrates with a backend API for:

  • User authentication and registration
  • Soil analysis and recommendations
  • Data persistence and retrieval

API Endpoints

  • POST /api/user/register - User registration
  • POST /api/user/login - User authentication
  • POST /api/ai/soil - Soil advisory analysis

🎡 Audio Features

  • Form Field Audio: Play audio guidance for username and email fields
  • Accessibility: Enhanced user experience with audio feedback
  • Audio Files: Integrated MP3 audio files for guidance

πŸ“± Responsive Design

  • Mobile First: Optimized for mobile devices
  • Tablet Support: Enhanced layout for tablet screens
  • Desktop: Full-featured desktop experience
  • Cross-Browser: Compatible with modern browsers

πŸ”’ Security Features

  • JWT Authentication: Secure token-based authentication
  • Input Validation: Client and server-side validation
  • HTTPS Ready: Secure communication protocols
  • Session Management: Secure user session handling

πŸš€ Deployment

Build Process

  1. Run npm run build to create production build
  2. Deploy the dist folder to your hosting service
  3. Configure environment variables for API endpoints

Environment Variables

env VITE_API_BASE_URL=http://localhost:3000 VITE_APP_NAME=FarmHelper

🀝 Contributing

  1. Fork the repository
  2. Create a 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

  • React Team - For the amazing React framework
  • Vite Team - For the fast build tool
  • Tailwind CSS - For the utility-first CSS framework
  • Open Source Community - For the amazing packages and tools

πŸ“ž Support

For support, email support@farmhelper.com or create an issue in the repository.


Built with ❀️ for the farming community

Empowering farmers with AI-driven agricultural insights

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors