Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PhytoNexus

A self-hosted, AI-powered botanical intelligence platform with plant disease diagnostics, multi-agent reasoning, conversational AI, and a comprehensive botanical encyclopedia.


Live Demo MIT License React FastAPI MongoDB Gemini



What you get

PhytoNexus β€” overview
See all features

πŸ€– Multi-Agent AI Diagnostics

  • Vision Analysis β€” Upload any plant photo for instant, high-accuracy disease and health diagnosis.
  • Agentic Debate Engine β€” Multiple LLM agents debate the symptoms in real-time on your screen to reach an absolute consensus.
  • Treatment Synthesis β€” Generates an actionable recovery plan for your specific plant.
  • Real-Time Terminal β€” Watch the AI agents think, process, and debate live.

🌿 Botanical Encyclopedia

  • Global Database β€” Access millions of records securely hooked into GBIF and Wikipedia.
  • Robust Searching β€” Search by common name or scientific name.
  • Rich Media β€” Instantly pulls massive high-res image galleries.
  • Taxonomy β€” View exact Kingdom, Phylum, Order, Family, Genus, and Species metadata.

πŸ’¬ FloraAI Chatbot

  • Context-Aware β€” A dedicated chatbot that remembers your diagnostic history and provides tailored advice.
  • Streaming Responses β€” Instant, token-by-token streaming for a snappy, native feel.
  • Markdown & Code β€” Fully supports rendering tables, lists, and formatted treatment regimens.

πŸ” Secure & Modern Platform

  • JWT Authentication β€” Fast, secure login and registration system.
  • Responsive PWA Design β€” Looks stunning on Desktop, Tablet, and Mobile with zero scrollbar cutoffs.
  • Beautiful UI β€” Designed with a premium, organic color palette, smooth gradients, and micro-animations.

Get started

git clone https://github.com/yuvanvishnupandi/phytonexus.git
cd phytonexus

Configure your MongoDB database and environment variables, then start the FastAPI backend and Vite frontend (see Local Setup below).


πŸ› οΈ Tech Stack



React


Vite


Python


FastAPI


MongoDB


Gemini AI


Tailwind CSS


JWT


Vercel


Render


Git


GitHub


Postman


Motor


GBIF API


Wikipedia API




πŸ›οΈ Overall system architecture

The application follows a modern decoupled architecture consisting of the React presentation layer, FastAPI backend, LLM services, and MongoDB database. Each component operates independently and communicates through REST APIs.

graph TD

subgraph Client["Client Layer"]
WebApp[React Web App]
end

subgraph Server["Application Layer"]
API[FastAPI Server]
AUTH[JWT Authentication]
end

subgraph AI["AI Service Engine"]
ORCH[Multi-Agent Orchestrator]
VISION[Vision Agent]
DEBATE[Debate Engine]
FLORA[FloraAI Chatbot]
end

subgraph Database["Database Layer"]
MYSQL[(MongoDB Atlas)]
end

WebApp --> API

API --> AUTH
API --> MYSQL
API --> ORCH

ORCH --> VISION
ORCH --> DEBATE
ORCH --> FLORA

VISION --> GeminiAPI[Gemini API]
DEBATE --> LLM_APIs[Gemini / External APIs]
Loading

Diagnostic processing workflow

The following sequence diagram illustrates how a plant image is processed from submission to full diagnosis.

sequenceDiagram

actor User
participant Frontend
participant Backend
participant AI
participant Database

User->>Frontend: Upload plant photo
Frontend->>Backend: Send image data
Backend->>AI: Trigger diagnostics pipeline
AI->>AI: Vision Agent analyzes symptoms
AI->>AI: Debate Agents discuss findings
AI->>AI: Reach diagnostic consensus
AI-->>Backend: Return treatment plan
Backend->>Database: Save diagnosis history
Backend-->>Frontend: Stream results to UI
Frontend-->>User: Display plant health report
Loading

Core data flow

  1. User uploads a plant image or searches the encyclopedia.
  2. The React frontend forwards the request to the FastAPI backend.
  3. The Vision Agent extracts visual symptoms and health indicators.
  4. The Debate Engine cross-references findings and agrees on the disease.
  5. The processed diagnosis is stored in MongoDB.
  6. The user receives a comprehensive, formatted treatment plan.

🧠 Multi-agent AI engine

The AI service is designed as a collection of specialized agents. Each agent performs a dedicated task, allowing the system to process reports in a structured manner.

See all agents
  • Vision Agent

    • Extracts symptoms and plant species directly from uploaded photos.
  • Debate Engine

    • Multiple LLMs converse to eliminate false positives and finalize a diagnosis.
  • Treatment Synthesizer

    • Converts the debated consensus into a clear, step-by-step recovery guide.
  • FloraAI Assistant

    • Answers user queries regarding plant care and historical diagnostics.

πŸš€ Local setup

Prerequisites

  • Node.js 18 or later
  • Python 3.9 or later
  • MongoDB Atlas account

Clone repository

git clone https://github.com/yuvanvishnupandi/phytonexus.git
cd phytonexus
Backend setup
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload
Frontend setup
cd frontend
npm install
npm run dev

Environment variables

Full reference

Template based on the services in use β€” confirm exact variable names against your .env.example files before deploying.

Variable Description Where
MONGODB_URI MongoDB connection string backend/.env
GEMINI_API_KEY Google Gemini API key for the Vision Agent backend/.env
CORS_ORIGINS Allowed frontend origins (e.g. http://localhost:5173) backend/.env
VITE_API_BASE_URL Base URL the frontend uses to call the backend API frontend/.env

Data & storage

  • Database β€” MongoDB Atlas
  • Uploads β€” Plant images processed securely
  • Hosting β€” frontend on Vercel, backend on Render

License

PhytoNexus is MIT licensed.

About

PhytoNexus is an AI-powered botanical intelligence platform for plant disease diagnosis, multi-agent reasoning, conversational plant care, and comprehensive botanical knowledge.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages