How mwakidenis/smart-farmer works
AI Crop Doctor is a farmer-facing plant-health platform. Its central workflow is to upload a plant image, receive an AI-assisted disease assessment and treatment guidance, and review scan history; the README also describes expert consultations, community discussion, disease reference, learning videos, timeline tracking, and agricultural intelligence. The sampled router and scan page show the application entry and scan UI; unsampled feature internals are represented by their exact tree paths, with uncertain implementation links omitted or marked unverified.
Main entry points: App.tsx App routing · Index.tsx Scan workflow · AuthProvider.tsx Authentication state · SpecialistChat.tsx Specialist consultations
Components 24
Application access
- App routing
src/App.tsx - Landing experience
src/pages/Landing.tsx
Plant diagnosis
- Scan workflow
src/pages/Index.tsx - Image upload
src/components/scan/ImageUpload.tsx - AI analysis
src/services/enhancedAIService.ts - Diagnosis results
src/components/scan/DiagnosisResult.tsx - Scan history
src/components/history/ScanHistoryList.tsx
Expertise and learning
- Specialist consultations
src/pages/SpecialistChat.tsx - Consultation interface
src/components/chat/ChatInterface.tsx - Community forum
src/pages/CommunityForum.tsx - Forum data access
src/hooks/use-forum.tsx - Disease encyclopedia
src/pages/DiseaseLibrary.tsx - Disease reference data
src/data/diseases.ts - Educational videos
src/pages/VideoLibrary.tsx
Crop intelligence
- Plant health timeline
src/pages/PlantTimeline.tsx - Pest prediction
src/pages/PestPrediction.tsx - Agricultural analytics
src/components/analytics/AdvancedAnalytics.tsx - Weather service
src/services/weatherService.ts
Identity and services
- Sign in and registration
src/pages/Auth.tsx - Authentication state
src/components/AuthProvider.tsx - Supabase backend
src/integrations/supabase/client.ts - Mock data fallback
src/services/mockDataService.ts - M-Pesa payments
src/services/mpesaService.ts
Other components
- Grower
Connections 26
- Grower → App routing: opens app
README.md - App routing → Landing experience: routes to
src/App.tsx - App routing → Sign in and registration: routes to
src/App.tsx - App routing → Scan workflow: routes to
src/App.tsx - App routing → Specialist consultations: routes to
src/App.tsx - App routing → Community forum: routes to
src/App.tsx - App routing → Disease encyclopedia: routes to
src/App.tsx - App routing → Educational videos: routes to
src/App.tsx - App routing → Plant health timeline: routes to
src/App.tsx - Sign in and registration → Authentication state: uses auth
src/pages/Auth.tsx - Authentication state → Supabase backend: checks session
src/components/AuthProvider.tsx - Authentication state → Mock data fallback: falls back to
src/components/AuthProvider.tsx - Scan workflow → Image upload: renders
src/pages/Index.tsx - Scan workflow → AI analysis: analyzes image
src/pages/Index.tsx - Scan workflow → Diagnosis results: shows assessment
src/pages/Index.tsx - Scan workflow → Scan history: shows history
src/pages/Index.tsx - Specialist consultations → Consultation interface: uses interface
- Community forum → Forum data access: uses data hook
- Forum data access → Supabase backend: queries backend
src/hooks/use-forum.tsx - Disease encyclopedia → Disease reference data: uses reference
- Grower → Plant health timeline: tracks health
README.md - Grower → Pest prediction: checks predictions
README.md - Grower → Educational videos: learns from
README.md - Grower → Specialist consultations: consults experts
README.md - Grower → Community forum: shares knowledge
README.md - Grower → Disease encyclopedia: looks up diseases
README.md