How vijayummalraju-star/agrivision works
AgriVision AI is an Expo mobile plant-health assistant. Its main user journey is taking a plant photo, receiving an educational assessment, and revisiting results; the app also supports plant tracking, disease learning, assistant conversations, reminders, and offline use. The graph includes the documented Supabase and AI backend. Several screen and service implementations were not excerpted, so relationships for those features rely on README statements or are omitted rather than inferred from names alone.
Main entry points: handler.ts Plant analysis · supabase.ts Supabase data and storage · useOfflineSync.ts Offline queue and sync · index.tsx Home dashboard
Components 21
Mobile app
- Home dashboard
app/(tabs)/index.tsx
Plant health features
- Photo capture
app/scan/capture.tsx - Photo preview
app/scan/preview.tsx - Scan result
app/scan/result/[id].tsx - Scan history
app/(tabs)/history.tsx - Plant collection
src/services/plants.ts - Disease library
app/diseases/index.tsx - Plant assistant
supabase/functions/agricultural-assistant/index.ts - Care reminders
src/services/reminders.ts
Account and preferences
- Sign-in screens
app/(auth)/login.tsx - Authentication
src/services/auth.ts - Settings and language
app/settings/index.tsx
Supabase backend
- Plant analysis
supabase/functions/analyze-plant/handler.ts - Supabase data and storage
src/services/supabase.ts - Account and scan deletion
supabase/functions/delete-account/index.ts
App runtime
- Scan session state
src/store/scanSessionStore.ts - Offline queue and sync
src/hooks/useOfflineSync.ts - Query cache
src/services/queryClient.ts
Other components
- Farmer or gardener
- AI provider
- Phone notifications
Connections 23
- Farmer or gardener → Home dashboard: opens app
README.md - Home dashboard → Photo capture: starts scan
- Photo capture → Photo preview: reviews photo
- Photo preview → Plant analysis: submits photo
README.md - Plant analysis → AI provider: requests assessment
README.md - Plant analysis → Supabase data and storage: stores scan
README.md - Plant analysis → Scan result: returns assessment
README.md - Home dashboard → Scan history: opens history
app/(tabs)/index.tsx - Farmer or gardener → Plant collection: tracks plants
README.md - Farmer or gardener → Disease library: browses diseases
README.md - Farmer or gardener → Plant assistant: asks questions
README.md - Farmer or gardener → Care reminders: sets reminders
README.md - Care reminders → Phone notifications: schedules alerts
README.md - Farmer or gardener → Sign-in screens: signs in
README.md - Sign-in screens → Authentication: submits credentials
- Authentication → Supabase data and storage: uses Supabase
README.md - Farmer or gardener → Settings and language: chooses language
README.md - Photo capture → Scan session state: sets pending photo
- Offline queue and sync → Scan session state: reads queued scans
src/hooks/useOfflineSync.ts - Offline queue and sync → Supabase data and storage: syncs scans
- Offline queue and sync → Query cache: invalidates cache
src/hooks/useOfflineSync.ts - Farmer or gardener → Account and scan deletion: requests deletion
README.md - Account and scan deletion → Supabase data and storage: deletes stored data