Inspiration

The Problem: As a Doctor of Agricultural Sciences, I know that farmers, agronomists, as well as agricultural scientists, often lack real-time access to field assessment digital tools. A farmer might spend hours for manual inspection of crops or traveling to get expert advice, only to receive generic recommendations that don't account for their specific crop type, local weather features, or other environmental conditions. Meanwhile, commercial precision agriculture platforms are expensive and as a result small farmers and scientists cannot afford subscription. Besides, many of them demand constant internet connectivity, which is also problematic in remote areas with weak cell network and absence of 4G/LTE connection. The Insight: Modern smartphones have powerful cameras and CPUs. What if I could turn a single field photo into actionable, science-backed guidance in seconds - entirely on the device, with zero data transmission? Solution: I built PocketRescue - a Progressive Web Application that transforms field photos into personalized Field Action Cards in a few moments. Here's what makes it unique:

  • Client-side image processing: All computation happens locally using Canvas 2D API. Your photos never leave your device - only geolocation is sent to a weather API if you choose to provide it.
  • Vegetation health analysis: Computing two indices (ExG and NDVI-proxy) from RGB pixel data, PocketRescue creates a visual heatmap of the field image so that farmers can see exactly where their field is struggling.
  • Weather-informed risk assessment: Through Open-Meteo API the application fetches a 3-day forecast and combines it with vegetation health to identify drought, flood, or stress risks specific to the field's conditions.
  • Crop-specific interventions: Based on crop type (all major crops like wheat, maize, potato, etc. are included), vegetation health estimated from the indices, and weather risks, the app recommends 3 prioritized actions: irrigation timing, pest management, nutrient application, all based on scientific reasoning provided by FAO, USDA, and modern scientific research.
  • Shareable, offline-capable: User can generate printable PDFs or PNGs of the estimation, share via URL-encoded state (no server storage) or QR-code, or work completely offline with cached sample data.

What it does

PocketRescue takes a field photo (or you can fetch a previously captured photo from your gallery or hard drive) and your crop type, then instantly delivers a Field Action Card with three key outputs:

  1. a vegetation health score with visual heatmap showing problem areas,
  2. a risk assessment (low/medium/high) based on crop condition and 3-day weather forecast,
  3. three prioritized, science-backed interventions tailored to your specific crop and conditions. Everything runs locally on your phone - no backend, no file uploads on external servers, no waiting. You can download the card as a PDF or PNG file, share it via QR code or URL, or use it offline with sample data.

How we built it

Built with JavaScript, React, Vite, TailwindCSS, and property-based testing (fast-check) to ensure the science is bulletproof. Deployed through netlify.

Challenges we ran into

  1. Tailoring the logic for vegetation health assessment and risk assessment based on the vegetation score.
  2. Caching issues with repetitive calculations.
  3. Correct export of the estimation results to the PDF and PNG files (faced numerous issues with visualizations and QR code generation).

Accomplishments that we're proud of

I built a self-sufficient zero-backend precision agriculture tool that locally processes field photos with no need in external server. I implemented a robust science-backed vegetation indices calculation and risk assessment grounded on peer-reviewed scientific research, achieved sub-400KB bundle size for offline use, and backed everything with property-based testing to catch edge cases. The result: a shareable, privacy-first PWA that works on slow connections and older phones making expert-level field guidance accessible to farmers anywhere with no need for prolonged manual field work, traveling to get expertise and unreasonable expenses on inefficient plant care operations.

What we learned

  1. Surprisingly, RGB-only vegetation indices are quite effective for crop state assessment - there is no need in expensive multispectral cameras.
  2. It was revealed that bundle size and offline capability matter more than feature richness when targeting farmers on slow connections.
  3. I gained new knowledge on handling browser caching properly, as well as best practices for correct exporting results to PDF/PNG files.

What's next for PocketRescue

I don't know to be honest. The most probable, I will share the app with my colleagues at the Institute and farmers, collect their feedback and make required corrections based on the suggestions provided. Also, I think that I will enlarge the scope of crops, and add more robust logic to handle soil types and conditions alongside weather. Besides, native mobile application for iOS/Android could be created based on the demand from farmers and scientists.

Built With

Share this project:

Updates