How sumanth015/agrigenie-your-smart-farming-partner works
AgriGenie is a farmer-facing agricultural advisory app. A farmer enters through the landing page, registers or logs in, then uses a dashboard for farm records, soil and crop advice, weather, market, sustainability, and crop-history information. Authentication and profile data use Supabase; crop suggestions have a sampled invocation of a Supabase Edge Function. Disease detection and soil scanning are also product capabilities, but their client-to-function wiring is not shown in the excerpts. The README is empty, so these limits are reflected in the graph.
Main entry points: Dashboard.tsx Farmer dashboard · client.ts Supabase client · Index.tsx View controller · FarmDataInput.tsx Farm data input
Components 32
App and access
- App shell
src/App.tsx - View controller
src/pages/Index.tsx - Landing page
src/components/LandingPage.tsx - Registration page
src/components/RegistrationPage.tsx - Login and signup
src/components/AuthPage.tsx - Auth state
src/hooks/useAuth.tsx
Farm advisory
- Farmer dashboard
src/components/Dashboard.tsx - Farm data input
src/components/dashboard/FarmDataInput.tsx - Location crop advisor
src/components/dashboard/LocationCropAdvisor.tsx - Crop recommendations
src/components/dashboard/CropRecommendations.tsx - Soil scanner
src/components/SoilScanner.tsx - Disease detector
src/components/DiseaseDetector.tsx - Chat assistant
src/components/ChatAssistant.tsx
Farm insights
- Soil data card
src/components/dashboard/SoilDataCard.tsx - Weather card
src/components/dashboard/WeatherCard.tsx - Market insights
src/components/dashboard/MarketInsightsCard.tsx - Crop history
src/components/dashboard/CropHistoryCard.tsx - Sustainability card
src/components/dashboard/SustainabilityCard.tsx - Notifications
src/components/NotificationsPanel.tsx
Data and services
- Profile access
src/hooks/useProfile.tsx - Location lookup
src/hooks/useLocation.tsx - Recommendation data
src/hooks/useCropRecommendations.tsx - Market data
src/hooks/useMarketPrices.tsx - Weather data
src/hooks/useWeather.tsx - Supabase client
src/integrations/supabase/client.ts - Crop suggestion function
supabase/functions/suggest-crops/index.ts - Soil scan function
supabase/functions/scan-soil/index.ts - Disease detection function
supabase/functions/detect-disease/index.ts
Other components
- Farmer
- Supabase
- Browser geolocation
- Nominatim
Connections 38
- Farmer → Landing page: starts at
- App shell → View controller: routes to
src/App.tsx - View controller → Auth state: checks session
src/pages/Index.tsx - View controller → Landing page: shows
src/pages/Index.tsx - View controller → Registration page: shows
src/pages/Index.tsx - View controller → Login and signup: shows
src/pages/Index.tsx - View controller → Farmer dashboard: shows
src/pages/Index.tsx - Login and signup → Supabase client: authenticates with
src/components/AuthPage.tsx - Auth state → Supabase client: reads auth state
src/hooks/useAuth.tsx - Supabase client → Supabase: connects to
- Farmer dashboard → Farm data input: renders
src/components/Dashboard.tsx - Farmer dashboard → Location crop advisor: renders
src/components/Dashboard.tsx - Farmer dashboard → Crop recommendations: renders
src/components/Dashboard.tsx - Farmer dashboard → Soil scanner: renders
src/components/Dashboard.tsx - Farmer dashboard → Disease detector: renders
src/components/Dashboard.tsx - Farmer dashboard → Chat assistant: renders
src/components/Dashboard.tsx - Farmer dashboard → Soil data card: renders
src/components/Dashboard.tsx - Farmer dashboard → Weather card: renders
src/components/Dashboard.tsx - Farmer dashboard → Market insights: renders
src/components/Dashboard.tsx - Farmer dashboard → Crop history: renders
src/components/Dashboard.tsx - Farmer dashboard → Sustainability card: renders
src/components/Dashboard.tsx - Farmer dashboard → Notifications: renders
src/components/Dashboard.tsx - Farm data input → Auth state: uses user
src/components/dashboard/FarmDataInput.tsx - Farm data input → Profile access: loads profile
src/components/dashboard/FarmDataInput.tsx - Farm data input → Location lookup: uses location
src/components/dashboard/FarmDataInput.tsx - Farm data input → Supabase client: reads and writes
src/components/dashboard/FarmDataInput.tsx - Farm data input → Crop suggestion function: invokes
src/components/dashboard/FarmDataInput.tsx - Location crop advisor → Recommendation data: uses
src/components/dashboard/LocationCropAdvisor.tsx - Location crop advisor → Crop recommendations: renders
src/components/dashboard/LocationCropAdvisor.tsx - Profile access → Supabase client: reads and updates
src/hooks/useProfile.tsx - Recommendation data → Supabase client: queries
src/hooks/useCropRecommendations.tsx - Market data → Supabase client: queries
src/hooks/useMarketPrices.tsx - Weather data → Supabase: fetches forecast
- Location lookup → Browser geolocation: requests coordinates
src/hooks/useLocation.tsx - Location lookup → Nominatim: reverse geocodes
src/hooks/useLocation.tsx - Soil scanner → Supabase client: uses client
src/components/SoilScanner.tsx - Soil scanner → Soil scan function: may invoke
- Disease detector → Disease detection function: may invoke