Skip to content

PorFerMat/CropSight

Repository files navigation

🌿 CropSight: The Pocket-Sized Agronomist

CropSight (also known as Plant Doctor) is an AI-powered Progressive Web App (PWA) designed to help farmers and gardening enthusiasts instantly diagnose plant diseases, identify species, and receive actionable treatment plans. By leveraging the multimodal capabilities of Google's Gemini API, CropSight acts as a field expert in your pocket.

💻 Getting Started

To run this project locally, follow these steps:

  1. Install Dependencies:

    npm install
  2. Configure Environment:

    • Create a .env file in the root directory.
    • Add your Google Gemini API key (ensure it is a paid tier key if using Veo video generation features):
      API_KEY=your_actual_api_key_here
  3. Run the App:

    npm run dev

📱 User Manual

1. Home Screen

  • Scan Plant: Tap the large camera button or the "Scan Plant" card to start a new diagnosis.
  • Daily Tip: View a quick agronomy tip powered by Gemini Flash Lite.
  • AI Demo: Watch a cinematic video of the app generated by Gemini Veo.
  • History: Quickly access your recent scans.

2. Capturing Images

  • Camera: The app opens your device camera. You can switch between front/back cameras.
  • Capture: Tap the shutter button to take a photo. You can take up to 3 photos for a comprehensive analysis (e.g., leaf close-up, whole plant, stem).
  • Upload: Alternatively, upload existing photos from your gallery.
  • Done: Tap the green checkmark to proceed to analysis.

3. Analysis Configuration

  • Mode Selection: Choose between Diagnose (for diseases) or Identify (for species).
  • Context:
    • Crop Type: Select the specific crop (Tomato, Corn, etc.).
    • Growth Stage: Select the current stage (Seedling, Vegetative, etc.).
    • IoT Data: Click "Connect Device" to simulate fetching real-time environmental data (Temp, Humidity) which helps the AI refine its diagnosis.
  • Notes: Type observations or use the Microphone button to record voice notes which are automatically transcribed.

4. Results & Treatment

  • Diagnosis: See the identified disease or plant name.
  • Confidence Score: A gauge showing how certain the AI is.
    • Exact Match: 95-100% (Found exact image online).
    • High: 85-95% (Unique image verified by 4+ trusted sources).
    • Medium/Low: <80% (Limited verification).
  • Ask the Agronomist: Tap the "Chat Now" button to ask follow-up questions specifically about the current diagnosis.
  • Treatment/Prevention: View step-by-step organic/chemical controls and prevention tips.
  • Sources: Click on verified links to read more from agricultural universities or government sites.

About

Your pocket-sized agronomist.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published