AgriSense.AI is a free, mobile-first web application that lets any South African farmer — urban or rural — diagnose problems with their crops, livestock, soil and irrigation by uploading a single photo. Every answer is engineered to put water first, in line with the country's deepening water crisis.
# AGRISENSE.AI – Project Documentation
### AI-powered diagnosis and water-first advice for South African agriculture
🌐 Live Website: AGRISENSE.AI
**Version:** 1.1 · May 2026
**Developed by:** Zizipo Malangeni
## Overview
AGRISENSE.AI is a mobile-first AI agriculture platform that helps South African farmers diagnose crop, livestock, soil, and irrigation problems using image analysis and AI-powered advisory tools. The system prioritizes water-saving recommendations to address South Africa’s growing water crisis.
## Core Features
* AI crop, livestock, soil, and irrigation diagnosis
* Water-first recommendations
* AI agricultural advisor chat
* One-tap sample image diagnosis
* Mobile-first responsive interface
* Markdown-based action plans
* South Africa-focused agricultural guidance
## Tech Stack
* **Frontend:** TanStack Start + React 19 + Vite 7
* **Styling:** Tailwind CSS v4
* **Backend:** Lovable Cloud + Supabase Edge Functions
* **AI Model:** Gemini 2.5 Flash via Lovable AI Gateway
* **Markdown Rendering:** react-markdown
* **Notifications:** sonner
## Application Routes
* `/` – Landing page and agriculture insights
* `/diagnose` – Image upload and AI diagnosis
* `/advisor` – AI-powered agriculture chat assistant
* `/insights` – System architecture and technical documentation
## System Architecture
AGRISENSE.AI uses a four-layer architecture:
1. **Client Layer**
* React-based frontend with file-based routing
* Mobile-first design for rural accessibility
2. **Edge Layer**
* Supabase Edge Function acts as a secure proxy
* Handles validation, CORS, and API protection
3. **AI Layer**
* Gemini 2.5 Flash multimodal AI model
* Supports image + text analysis
4. **Data Layer (Planned)**
* Supabase Postgres + Storage
* Diagnosis history and farm profiles
## Workflow
1. User uploads an image or selects a sample image
2. Image converts to Base64 format
3. Request sent to `agri-ai` edge function
4. AI generates diagnosis and water-saving recommendations …