How nareshchandu17/floravia works
Floravia is a plant-care SPA with authenticated gardeners as its primary users. The central journey is account access, image-based identification or diagnosis, then saving plants and managing care over time; parallel workflows provide Sage AI guidance, localized weather, community exchange, and reminders. The graph combines sampled call sites with README-documented capabilities. Several App and service excerpts are partial, so uncertain internal wiring is omitted rather than inferred.
Main entry points: App.tsx App router · firebase.ts Firebase client · gemini.ts Gemini AI · server.ts Reminder dispatcher
Components 26
App and access
- App router
src/App.tsx - Sign-in
src/components/AuthModal.tsx - Auth state
src/hooks/useAuth.ts
Plant intelligence
- Plant identification
src/components/PlantAnalysis.tsx - Disease diagnosis
src/components/DiseaseAnalysis.tsx - Image input
src/components/ImageUploader.tsx - Gemini AI
src/services/gemini.ts - Sage chat
src/components/ChatBot.tsx - Chat orchestration
src/hooks/useChatBot.ts - Voice interface
src/hooks/useVoice.ts
Garden and care
- Garden view
src/components/MyGarden.tsx - Garden state
src/hooks/useGarden.ts - Care calendar
src/components/CareCalendar.tsx - Weather advice
src/components/WeatherWidget.tsx - Weather service
src/services/weather.ts
Community
- Community forum
src/components/forum/CommunityForum.tsx - Forum state
src/hooks/useForum.ts - Forum service
src/services/forum.ts - Community tips
src/services/communityTips.ts
Services and delivery
- Firebase client
src/services/firebase.ts - Cloud Firestore
- Reminder dispatcher
server.ts - Firebase Admin
src/services/firebase-admin.ts - Web push
public/firebase-messaging-sw.js
Other components
- Gardener
- OpenWeatherMap
Connections 31
- Gardener → App router: uses
- App router → Sign-in: opens auth
- Sign-in → Firebase client: authenticates
- Auth state → Firebase client: tracks auth
- App router → Image input: accepts image
- App router → Plant identification: shows analysis
- App router → Disease diagnosis: shows diagnosis
- Plant identification → Gemini AI: analyzes image
- Disease diagnosis → Gemini AI: diagnoses image
- App router → Firebase client: saves plants
- Garden view → Garden state: manages garden
- Garden state → Firebase client: reads and writes
- App router → Care calendar: opens care
- Care calendar → Firebase client: manages reminders
- Weather advice → Weather service: requests forecast
- Weather service → OpenWeatherMap: fetches conditions
- Gardener → Sage chat: asks Sage
- Sage chat → Chat orchestration: sends prompt
- Chat orchestration → Gemini AI: generates reply
- Chat orchestration → Firebase client: loads context and saves chats
- Sage chat → Voice interface: uses voice
- Voice interface → Gemini AI: transcribes and speaks
- App router → Community forum: opens community
- Community forum → Forum state: browses and posts
- Forum state → Forum service: runs forum actions
- Forum service → Firebase client: reads and writes
- App router → Community tips: loads care tips
- Reminder dispatcher → Firebase Admin: uses admin client
- Reminder dispatcher → Cloud Firestore: queries due reminders
- Reminder dispatcher → Web push: sends due alerts
- Firebase client → Cloud Firestore: reads and writes