How veerapeetha7/test-ai-image-read works
FloraGuide AI is a React gardening assistant with two user workflows: identify a plant from an uploaded photo and receive care guidance, or ask a botanist chatbot gardening questions. The app shell selects and renders these workflows; both call a Gemini service that formats requests and returns responses. The typed data contracts are a small internal layer. Edges reflect the shown component calls and rendering; no persistence layer is present.
Main entry points: geminiService.ts Gemini service · App.tsx Mode shell · PlantAnalyzer.tsx Plant analyzer · ChatBot.tsx Garden chat
Components 9
User interface
- React mount
index.tsx - Mode shell
App.tsx - Mode navigation
components/Header.tsx - Plant analyzer
components/PlantAnalyzer.tsx - Garden chat
components/ChatBot.tsx
AI services
- Gemini service
services/geminiService.ts - Gemini API
Domain contracts
- Typed contracts
types.ts
Other components
- Gardener
Connections 16
- Gardener → React mount: uses app
- React mount → Mode shell: renders
index.tsx - Mode shell → Mode navigation: renders
App.tsx - Mode navigation → Mode shell: sets mode
App.tsx - Mode shell → Plant analyzer: renders identify
App.tsx - Mode shell → Garden chat: renders chat
App.tsx - Plant analyzer → Gemini service: requests analysis
components/PlantAnalyzer.tsx - Gemini service → Gemini API: generates content
services/geminiService.ts - Gemini service → Plant analyzer: returns care data
components/PlantAnalyzer.tsx - Garden chat → Gemini service: sends chat
components/ChatBot.tsx - Gemini service → Gemini API: generates reply
services/geminiService.ts - Gemini service → Garden chat: returns reply
components/ChatBot.tsx - Plant analyzer → Typed contracts: uses care type
components/PlantAnalyzer.tsx - Garden chat → Typed contracts: uses message type
components/ChatBot.tsx - Mode shell → Typed contracts: uses mode type
App.tsx - Gemini service → Typed contracts: returns care type
services/geminiService.ts