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.
To run this project locally, follow these steps:
-
Install Dependencies:
npm install
-
Configure Environment:
- Create a
.envfile 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
- Create a
-
Run the App:
npm run dev
- 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.
- 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.
- 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.
- 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.