Skip to content

Repository files navigation

# 🌱 HarvestID

AI-Powered Digital Crop Passport & Smart Agriculture Platform

HarvestID β€” From Seed to Harvest, Every Crop Has an Identity.

HarvestID is a multilingual, AI-powered digital agriculture platform designed to give every registered crop a digital identity and traceable crop passport.

The platform enables farmers to register crops, record field activities, generate digital crop passports, scan and share crop information through QR codes, interact with an AI-powered Farmer Assistant, use voice-based interaction, automatically capture location information, and manage crop information through a farmer-friendly multilingual interface.

HarvestID combines Artificial Intelligence, Digital Crop Traceability, GPS, QR Technology, Voice Interaction, Multilingual Accessibility, and Modern Web Technologies into a single agriculture-focused ecosystem.


πŸš€ Project Overview

Agriculture involves multiple stages between planting and harvesting.

Important information such as:

  • Crop variety
  • Farm information
  • Planting date
  • Location
  • Area
  • Sowing activities
  • Irrigation
  • Fertilization
  • Pest monitoring
  • Crop health observations
  • Images
  • Notes
  • Harvest readiness

is often recorded manually or scattered across different systems.

HarvestID addresses this problem by creating a digital identity for every crop.

Each registered crop receives a centralized digital record that can be updated throughout its lifecycle.

The farmer can eventually share this information through a QR-based digital crop passport, making crop information easier to access, understand, and verify.


🎯 Objectives

HarvestID is designed to:

  • Digitize crop records
  • Create a unique identity for every crop
  • Maintain crop lifecycle information
  • Improve agricultural traceability
  • Simplify field activity recording
  • Provide AI-powered agricultural assistance
  • Support regional languages
  • Enable voice-based interaction
  • Automatically capture farm/crop location
  • Provide QR-based crop information sharing
  • Make agricultural data easier to access
  • Create a scalable foundation for future smart agriculture services

✨ Key Features

🌾 1. Digital Crop Registration

Farmers can register crops digitally instead of maintaining only physical records.

Crop information can include:

  • Crop name
  • Crop variety
  • Category
  • Farm name
  • GPS location
  • Cultivated area
  • Crop image
  • Notes
  • Crop score
  • Passport status

Each crop becomes a separate digital record.


πŸͺͺ 2. Digital Crop Passport

Every registered crop can receive a digital crop passport.

The passport acts as the crop's digital identity.

It can contain:

  • Crop information
  • Farm information
  • Crop image
  • Location
  • Crop score
  • Crop lifecycle information
  • Recorded field activities
  • Passport status
  • QR code

The passport can be accessed through a dedicated public URL.


πŸ“± 3. QR Code Crop Passport

HarvestID provides QR-based access to crop passport information.

Workflow

Register Crop ↓ Create Crop Record ↓ Generate Digital Passport ↓ Generate QR Code ↓ Scan QR Code ↓ Open Public Crop Passport

The QR code can be used to quickly access the corresponding crop's digital information. This can be useful for: Farmers Buyers Agricultural organizations Supply-chain participants Demonstration farms Future certification systems

πŸ“· 4. QR Scanner HarvestID includes a QR scanning interface that allows users to scan crop passport QR codes. The scanner can identify the corresponding crop passport and open its digital information. This creates a simple bridge between the physical crop/farm environment and the digital crop record.

🌱 5. Crop Lifecycle Activity Tracking Farmers can record important activities throughout the crop lifecycle. Examples include: 🌱 Sowing πŸ’§ Irrigation πŸ§ͺ Fertilization πŸ› Pest Monitoring 🌿 Crop Monitoring 🌾 Harvest πŸ“ General Field Notes

Each activity can contain: Activity type Date Crop association Notes Photos Audio AI enhancement information AI-generated summaries Confidence information This creates a chronological history of the crop.

πŸ“… 6. Crop Activity Timeline Every crop can have a chronological activity timeline.

Example: Day 1 🌱 Sowing ↓ Day 8 πŸ’§ Irrigation ↓ Day 15 πŸ§ͺ Fertilization ↓ Day 22 πŸ› Pest Monitoring ↓ Day 45 🌿 Crop Monitoring ↓ Harvest 🌾

This allows farmers to understand the crop's lifecycle at a glance.

πŸ€– 7. AI Farmer Assistant HarvestID includes an AI-powered Farmer Assistant. The assistant is designed to provide agricultural guidance using:

  • Farmer's selected language
  • Crop context
  • Crop information
  • Existing crop activities
  • Location information

Farmers can ask questions such as:

 "What fertilizer should I use?"

"Why are my tomato leaves turning yellow?"

"When should I irrigate this crop?"

"What pests commonly affect this crop?"

"How can I improve crop health?"

The AI assistant can provide practical agricultural guidance while considering available crop and location context.

🌍 8. Multilingual Farmer Interface

HarvestID is designed for farmers who may not be comfortable using English-only applications.

The platform supports 13 languages.

Supported Languages Code Language

EN English HI Hindi KN Kannada TE Telugu TA Tamil ML Malayalam MR Marathi BN Bengali GU Gujarati PA Punjabi OR Odia AS Assamese UR Urdu

The selected language applies across the application.

This includes:

Dashboard Navigation Crop registration Crop details Activities Passport Settings AI Assistant Empty states Loading states Error messages Voice navigation

The language preference is persisted so it remains selected after refreshing or navigating between pages.

πŸ—£οΈ 9. Voice Interaction

HarvestID is designed to support voice-based interaction for farmers. Farmers can interact with the application using voice input.

The system supports:

Voice questions Voice navigation commands Multilingual speech recognition AI-generated voice responses Selected-language speech output

  • Voice workflow

Farmer speaks ↓ Speech recognition ↓ Selected language detected/used ↓ Question sent to AI ↓ AI generates response ↓ Response displayed as text ↓ Response spoken through voice

This reduces dependence on typing and improves accessibility for users who prefer speaking.

πŸ“ 10. GPS & Location Awareness

HarvestID can capture the crop's location using the device GPS.

The system uses:

GPS Location ↓ Latitude / Longitude ↓ Reverse Geocoding ↓ Readable Location ↓ Stored with Crop

The location can then be used as part of the crop record and passed into the AI assistant context. This allows the AI assistant to provide more location-aware agricultural guidance.

🧠 11. Location-Aware AI

The Farmer Assistant can consider available location context when answering agricultural questions.

For example, agricultural advice can take into account:

Crop Farm location Crop activities Existing crop information Farmer's selected language

This creates a more contextual farming assistant instead of a completely generic chatbot.

πŸ–ΌοΈ 12. Dynamic Crop Image System

HarvestID includes a centralized crop-image resolution system.

Instead of displaying a small fixed set of images, crop names are dynamically mapped to appropriate crop images.

The system supports:

Crops Fruits Vegetables Grains Pulses Commercial crops Regional crop names Singular/plural names Common aliases

Examples: Tomato Tomatoes Cherry Tomato Desi Tomato

can resolve to the appropriate tomato image. Similarly: Brinjal Eggplant Baingan Aubergine

can resolve to the same crop identity. The system also supports many Indian/regional crop names.

πŸ“Έ 13. Farmer Crop Image Upload

Farmers can upload their own crop images during crop registration. The uploaded image takes priority over the default crop catalog image.

Priority Farmer Uploaded Image ↓ YES ↓ Display Upload ↓ NO ↓ Crop Image Catalog ↓ Found? /
YES NO ↓ ↓ Crop Image Honest Placeholder

This prevents the application from showing an incorrect crop image for an unknown crop.

🎨 14. Premium Agricultural UI

HarvestID uses a modern agriculture-inspired interface.

The UI includes: Agricultural visual identity Responsive layouts Animated elements Floating agricultural elements Interactive cards Animated assistant interface Modern navigation Light and dark theme compatibility Mobile-friendly layouts Smooth transitions Reduced-motion accessibility support

The visual design is intended to feel like a modern agricultural technology platform rather than a traditional farm management application.

πŸŒ“ 15. Responsive Design

HarvestID is designed for: πŸ“± Mobile phones πŸ“± Tablets πŸ’» Laptops πŸ–₯️ Desktop systems The interface adapts navigation, branding, cards, dashboards and controls according to screen size.

🏷️ 16. HarvestID Branding

HarvestID uses a centralized official logo system. The logo is implemented through a reusable component so that branding remains consistent across: Sidebar Dashboard Mobile header Desktop header Passport Farmer Assistant Footer Empty states Browser favicon This avoids maintaining multiple independent versions of the logo.

πŸ—οΈ System Architecture

                             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                             β”‚      FARMER          β”‚
                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
                             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                             β”‚   HarvestID Frontend β”‚
                             β”‚   Web Application    β”‚
                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚                     β”‚                      β”‚
                  β–Ό                     β–Ό                      β–Ό
             Crop System          AI Assistant          QR Passport
                  β”‚                     β”‚                      β”‚
                  β–Ό                     β–Ό                      β–Ό
              Activities          Gemini AI              Public URL
                  β”‚                     β”‚                      β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
                             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                             β”‚     Express API      β”‚
                             β”‚   Node.js Backend    β”‚
                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
                             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                             β”‚      Supabase        β”‚
                             β”‚ Database + Storage   β”‚
                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”„ Crop Passport Workflow

            Farmer
              β”‚
              β–Ό
            Register Crop
              β”‚
              β”œβ”€β”€ Crop Information
              β”œβ”€β”€ Variety
              β”œβ”€β”€ Farm
              β”œβ”€β”€ Area
              β”œβ”€β”€ GPS
              β”œβ”€β”€ Image
              └── Notes
              β”‚
              β–Ό
            Crop Stored in Database
              β”‚
              β–Ό
            Record Field Activities
              β”‚
              β”œβ”€β”€ Sowing
              β”œβ”€β”€ Irrigation
              β”œβ”€β”€ Fertilization
              β”œβ”€β”€ Pest Monitoring
              └── Harvest
              β”‚
              β–Ό
            Generate Crop Passport
              β”‚
              β–Ό
            Generate QR Code
              β”‚
              β–Ό
            Share / Scan
              β”‚
              β–Ό
            Public Digital Crop Passport

πŸ€– AI Assistant Workflow

                      Farmer
                         β”‚
                         β–Ό
                      Text / Voice Question
                         β”‚
                         β–Ό
                      Language Selection
                         β”‚
                         β–Ό
                      Crop Context
                         β”‚
                         β”œβ”€β”€ Crop Name
                         β”œβ”€β”€ Activities
                         β”œβ”€β”€ Location
                         └── Other Available Data
                         β”‚
                         β–Ό
                      HarvestID Backend
                         β”‚
                         β–Ό
                      Google Gemini
                         β”‚
                         β–Ό
                      AI Response
                         β”‚
                         β”œβ”€β”€ Text Response
                         └── Voice Response
                         β”‚
                         β–Ό
                      Farmer

🌐 Production Architecture

HarvestID uses a separated frontend/backend architecture.

            GitHub
              β”‚
              β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί Vercel
              β”‚                  β”‚
              β”‚                  β–Ό
              β”‚             Frontend
              β”‚
              └──────────────► Render
                                 β”‚
                                 β–Ό
                             Node.js API
                                 β”‚
                                 β–Ό
                             Supabase
                                 β”‚
                                 β”œβ”€β”€ Database
                                 └── Data Services
            
                                 β”‚
                                 β–Ό
                             Google Gemini
                             AI Services

πŸ› οΈ Technology Stack

Frontend: React TypeScript TanStack Start Vite CSS Responsive UI Browser Web APIs

Backend: Node.js Express JavaScript REST APIs CORS Environment configuration

Database: Supabase PostgreSQL Row Level Security

AI: Google Gemini API Gemini Flash models Multilingual AI responses Context-aware agricultural assistance

Deployment: GitHub Vercel β€” Frontend Render β€” Backend Supabase β€” Database

Browser APIs: Geolocation API Web Speech API Camera/QR functionality Local Storage

πŸ“ Project Structure:

        harvest-id-passport/
        β”‚
        β”œβ”€β”€ backend/
        β”‚   β”œβ”€β”€ config/
        β”‚   β”œβ”€β”€ controllers/
        β”‚   β”œβ”€β”€ middleware/
        β”‚   β”œβ”€β”€ models/
        β”‚   β”œβ”€β”€ routes/
        β”‚   β”œβ”€β”€ services/
        β”‚   β”œβ”€β”€ utils/
        β”‚   β”œβ”€β”€ schema.sql
        β”‚   └── server.js
        β”‚
        β”œβ”€β”€ public/
        β”‚   └── logo/
        β”‚       └── harvestID logo.jpeg
        β”‚
        β”œβ”€β”€ src/
        β”‚   β”œβ”€β”€ components/
        β”‚   β”‚   β”œβ”€β”€ HarvestIDLogo.tsx
        β”‚   β”‚   β”œβ”€β”€ FarmerAssistant.tsx
        β”‚   β”‚   β”œβ”€β”€ CropCard.tsx
        β”‚   β”‚   β”œβ”€β”€ Timeline.tsx
        β”‚   β”‚   └── ...
        β”‚   β”‚
        β”‚   β”œβ”€β”€ i18n/
        β”‚   β”‚   └── ...
        β”‚   β”‚
        β”‚   β”œβ”€β”€ lib/
        β”‚   β”‚   β”œβ”€β”€ harvest-store.tsx
        β”‚   β”‚   β”œβ”€β”€ crop-images.ts
        β”‚   β”‚   β”œβ”€β”€ crop-l10n.ts
        β”‚   β”‚   └── ...
        β”‚   β”‚
        β”‚   β”œβ”€β”€ routes/
        β”‚   β”‚   β”œβ”€β”€ index.tsx
        β”‚   β”‚   β”œβ”€β”€ crops.new.tsx
        β”‚   β”‚   β”œβ”€β”€ crops.$cropId.tsx
        β”‚   β”‚   β”œβ”€β”€ passport.$cropId.tsx
        β”‚   β”‚   └── ...
        β”‚   β”‚
        β”‚   └── styles.css
        β”‚
        β”œβ”€β”€ .gitignore
        β”œβ”€β”€ package.json
        └── README.md

πŸ” Security & Environment Variables

Sensitive environment variables are not committed to GitHub.

The project protects environment files through .gitignore.

Important production variables include:

Vercel: VITE_API_BASE_URL VITE_PUBLIC_SITE_URL

Render: SUPABASE_URL SUPABASE_ANON_KEY GOOGLE_API_KEY PORT

API keys remain server-side and are never intentionally exposed to the browser.

πŸ—„οΈ Database:

Supabase provides the primary backend data layer.

Important data includes:

Harvest Stores crop information. Example fields: id crop name variety category farm name gps area score passport image note

Activities:

Stores crop lifecycle activities. Example fields: id crop_id kind title note date media ai_enhanced ai_summary confidence photo audio created_at

πŸ”’ Row Level Security:

Supabase Row Level Security is enabled for relevant tables.

Policies are configured to allow the backend application to perform the required database operations using the configured Supabase credentials.

πŸ§ͺ Testing & Validation:

The production application has been validated through: TypeScript compilation Production build Backend syntax validation API endpoint testing Crop CRUD testing Activity CRUD testing Passport persistence testing QR/public passport testing Supabase schema migration testing AI API testing Multilingual AI testing GPS integration validation Crop image resolver testing SSR production rendering Production deployment verification

βœ… Production Health:

Current production architecture:

    Component        Platform                  Status
    
    Frontend          Vercel                 🟒 Live
    Backend API       Render                 🟒 Live
    Database          Supabase               🟒 Connected
    AI                Google Gemini          🟒 Connected
    Source Control    GitHub                 🟒 Active
    QR Passport       HarvestID              🟒 Active
    Multilingual UI   13 Languages           🟒 Active
    Voice Interaction Browser Speech APIs    🟒 Active
    GPS               Browser Geolocation    🟒 Active

🌍 Example Use Case:

Scenario

A farmer registers a tomato crop.

    Crop:
    Tomato
    
    Variety:
    Hybrid Tomato
    
    Farm:
    My Farm
    
    Area:
    2 Acres
    
    Location:
    GPS captured automatically

The farmer then records: 🌱 Sowing πŸ’§ Irrigation πŸ§ͺ Fertilization πŸ› Pest Monitoring 🌿 Crop Monitoring

The farmer can ask: "Why are the leaves of my tomato plants turning yellow?"

The AI assistant receives relevant crop context and available location information and provides guidance in the farmer's selected language. Later, the farmer generates a digital crop passport. The passport can be accessed using a QR code.

🎯 Target Users:

HarvestID is designed primarily for: πŸ‘¨β€πŸŒΎ Farmers πŸ‘©β€πŸŒΎ Agricultural workers 🌱 Farmer groups 🏒 Agricultural organizations πŸ§‘β€πŸ”¬ Agricultural researchers πŸ›’ Agricultural buyers 🚜 Agri-tech ecosystems 🌾 Future supply-chain participants

🌟 Why HarvestID? Traditional crop records can be: Paper-based Fragmented Difficult to update Difficult to share Difficult to trace

HarvestID transforms crop records into a structured digital identity.

Traditional

  Paper Records
       ↓
  Scattered Information
       ↓
  Difficult Tracking
       ↓
  Limited Accessibility

HarvestID

Digital Crop Identity
        ↓
Centralized Crop Data
        ↓
Lifecycle Tracking
        ↓
AI Assistance
        ↓
QR Passport
        ↓
Easy Sharing & Access

πŸ† Project Vision:

HarvestID aims to become a digital identity layer for agriculture. The long-term vision is: Seed ↓ Sowing ↓ Growth ↓ Irrigation ↓ Fertilization ↓ Crop Monitoring ↓ Harvest ↓ Processing ↓ Distribution ↓ Consumer with digital information connected throughout the crop lifecycle.

πŸ‘¨β€πŸ’» Development Philosophy:

HarvestID follows a modular architecture where major capabilities are separated into reusable components and services.

Core principles: Modular development Reusable components Centralized state management API-driven architecture Secure environment handling Responsive design Accessibility Multilingual support Production validation Scalable architecture

πŸ”— Links 🌐 Live Application: https://harvest-id-passport.vercel.app⁠�

πŸ’» GitHub Repository: https://github.com/03darshanpatil-code/harvest-id-passport⁠�

βš™οΈ Backend API: https://harvest-id-backend.onrender.com⁠�

🌱 HarvestID Give Every Crop a Digital Identity. From Seed to Harvest β€” Trace Every Step.

About

AI-powered digital crop traceability and smart farming platform that helps farmers register crops, track activities, generate digital crop passports, access multilingual AI assistance, and manage farm data.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages