A self-hosted, AI-powered botanical intelligence platform with plant disease diagnostics, multi-agent reasoning, conversational AI, and a comprehensive botanical encyclopedia.
See all features
|
|
|
|
git clone https://github.com/yuvanvishnupandi/phytonexus.git
cd phytonexusConfigure your MongoDB database and environment variables, then start the FastAPI backend and Vite frontend (see Local Setup below).
|
React |
Vite |
Python |
FastAPI |
|
MongoDB |
Gemini AI |
Tailwind CSS |
JWT |
|
Vercel |
Render |
Git |
GitHub |
|
Postman |
Motor |
GBIF API |
Wikipedia API |
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]
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
- User uploads a plant image or searches the encyclopedia.
- The React frontend forwards the request to the FastAPI backend.
- The Vision Agent extracts visual symptoms and health indicators.
- The Debate Engine cross-references findings and agrees on the disease.
- The processed diagnosis is stored in MongoDB.
- The user receives a comprehensive, formatted treatment plan.
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.
- Node.js 18 or later
- Python 3.9 or later
- MongoDB Atlas account
git clone https://github.com/yuvanvishnupandi/phytonexus.git
cd phytonexusBackend setup
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reloadFrontend setup
cd frontend
npm install
npm run devFull reference
Template based on the services in use β confirm exact variable names against your
.env.examplefiles 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 |
- Database β MongoDB Atlas
- Uploads β Plant images processed securely
- Hosting β frontend on Vercel, backend on Render
PhytoNexus is MIT licensed.







