How jeevan-shah/plant-mind works
PlantMind is an explainable, per-plant care decision-support app. Users manage plant profiles and care history, submit an image and optional symptom text, then receive a personalized analysis with evidence, recommendations and limitations; they can also review history, explore the knowledge graph and ask the chat assistant questions. The documented analysis pipeline fuses image signals and plant context, retrieves graph and document evidence, applies optional LLM or deterministic reasoning, and persists the result. Connections for unsampled subsystems are included only where the README documents the capability; source excerpts and index establish the implementation links.
Main entry points: api.ts Typed API client · App.tsx App router · analysis_service.py Analysis orchestration · chat_service.py Chat reasoning
Components 25
PlantMind UI
- App router
frontend/src/App.tsx - Plant profiles
frontend/src/pages/Plants.tsx - Analysis submission
frontend/src/pages/AnalyzePage.tsx - Analysis report
frontend/src/components/AnalysisReport.tsx - Analysis history
frontend/src/pages/HistoryPage.tsx - Knowledge explorer
frontend/src/pages/KnowledgeExplorer.tsx - Care chat
frontend/src/components/ChatAssistant.tsx - Typed API client
frontend/src/lib/api.ts
Application API
- Plant endpoints
backend/app/api/routes_plants.py - Analysis endpoints
backend/app/api/routes_analyses.py - Knowledge endpoints
backend/app/api/routes_knowledge.py - Chat endpoint
backend/app/api/routes_chat.py - Dashboard and health
backend/app/api/routes_meta.py - Plant serialization
backend/app/services/plant_service.py
Plant Analysis
- Analysis orchestration
backend/app/services/analysis_service.py - Demo vision
backend/app/services/vision_service.py - Plant state fusion
backend/app/services/plant_state_service.py
Knowledge And Reasoning
- GraphRAG retrieval
backend/app/services/graphrag_service.py - Knowledge graph access
backend/app/services/knowledge_service.py - Deterministic reasoning
backend/app/services/reasoning_engine.py - Optional LLM
backend/app/services/llm_service.py - Chat reasoning
backend/app/services/chat_service.py
Persistence
- Database session
backend/app/database.py - Plant and graph records
backend/app/models.py
Other components
- Plant caregiver
Connections 36
- Plant caregiver → App router: uses
README.md - App router → Plant profiles: routes to
frontend/src/App.tsx - App router → Analysis submission: routes to
frontend/src/App.tsx - App router → Analysis history: routes to
frontend/src/App.tsx - App router → Knowledge explorer: routes to
frontend/src/App.tsx - Analysis submission → Typed API client: submits through
frontend/src/pages/AnalyzePage.tsx - Plant profiles → Typed API client: requests through
frontend/src/pages/Plants.tsx - Analysis history → Typed API client: requests through
- Knowledge explorer → Typed API client: searches through
frontend/src/pages/KnowledgeExplorer.tsx - Analysis report → Care chat: renders
frontend/src/components/AnalysisReport.tsx - Care chat → Typed API client: sends questions
frontend/src/components/ChatAssistant.tsx - Typed API client → Plant endpoints: calls REST
README.md - Typed API client → Knowledge endpoints: calls REST
README.md - Typed API client → Chat endpoint: calls REST
- Plant endpoints → Analysis orchestration: invokes
backend/app/api/routes_plants.py - Plant endpoints → Plant serialization: serializes with
backend/app/api/routes_plants.py - Analysis endpoints → Plant serialization: serializes with
backend/app/api/routes_analyses.py - Chat endpoint → Chat reasoning: delegates to
backend/app/api/routes_chat.py - Knowledge endpoints → Knowledge graph access: queries
backend/app/api/routes_knowledge.py - Analysis orchestration → Demo vision: analyzes image
README.md - Analysis orchestration → Plant state fusion: builds state
README.md - Analysis orchestration → GraphRAG retrieval: retrieves evidence
README.md - GraphRAG retrieval → Knowledge graph access: expands graph
backend/app/services/graphrag_service.py - GraphRAG retrieval → Deterministic reasoning: falls back to
README.md - GraphRAG retrieval → Optional LLM: uses optionally
README.md - Chat reasoning → GraphRAG retrieval: retrieves evidence
backend/app/services/chat_service.py - Chat reasoning → Knowledge graph access: queries
backend/app/services/chat_service.py - Chat reasoning → Optional LLM: uses optionally
backend/app/services/chat_service.py - Chat reasoning → Plant serialization: formats plant context
backend/app/services/chat_service.py - Plant endpoints → Database session: uses session
backend/app/api/routes_plants.py - Knowledge endpoints → Database session: uses session
backend/app/api/routes_knowledge.py - Chat endpoint → Database session: uses session
backend/app/api/routes_chat.py - Database session → Plant and graph records: defines ORM base
backend/app/database.py - Dashboard and health → Plant serialization: computes health
backend/app/api/routes_meta.py - Dashboard and health → Database session: uses session
backend/app/api/routes_meta.py - Analysis orchestration → Plant and graph records: uses analysis records
backend/app/services/analysis_service.py