How shrirambhat-2508/agriguard works
AgriGuard is an offline-oriented crop monitoring web app. Users can review field conditions, capture a crop photo for an AI-style analysis flow, and inspect saved reports and trends; they can also manage crops and settings. The sampled code shows screen selection and record state in the app shell, with local mock records and sensor readings rather than a demonstrated backend or physical sensor connection. The README is empty, so capability coverage and relationships rely on the source index and shown excerpts; some screen internals were not sampled.
Main entry points: App.tsx App shell · mockData.ts Local records · MetricCard.tsx Metric card · SettingsScreen.tsx Settings
Components 24
Crop analysis
- Crop photo
src/screens/CropPhotoScreen.tsx - AI analysis
src/screens/AIAnalysisScreen.tsx - Crop result
src/screens/CropResultScreen.tsx - Error states
src/screens/ErrorScreen.tsx
Field monitoring
- Home dashboard
src/screens/HomeScreen.tsx - Sensor view
src/screens/SensorScreen.tsx - Metric detail
src/screens/MetricDetailScreen.tsx
Reports and insights
- History
src/screens/HistoryScreen.tsx - History detail
src/screens/HistoryDetailScreen.tsx - Saved report
src/screens/SavedReportScreen.tsx - Insights
src/screens/InsightsScreen.tsx - Overall analysis
src/screens/OverallAnalysisScreen.tsx
Farm management
- Manage crops
src/screens/ManageCropsScreen.tsx - Settings
src/screens/SettingsScreen.tsx - Crop catalog
src/data/crops.ts
Shared app layer
- App shell
src/App.tsx - Local records
src/data/mockData.ts - Metric card
src/components/MetricCard.tsx - Action button
src/components/Button.tsx - Screen header
src/components/TopBar.tsx - App navigation
src/components/BottomNav.tsx - Sidebar navigation
src/components/Sidebar.tsx - Insight chart
src/components/InsightChart.tsx
Other components
- Farmer
Connections 38
- Farmer → App shell: uses
- App shell → Home dashboard: renders
src/App.tsx - App shell → Sensor view: renders
src/App.tsx - App shell → Crop photo: renders
src/App.tsx - App shell → AI analysis: renders
src/App.tsx - App shell → Crop result: renders
src/App.tsx - App shell → Error states: renders
src/App.tsx - App shell → History: renders
src/App.tsx - App shell → History detail: renders
src/App.tsx - App shell → Saved report: renders
src/App.tsx - App shell → Insights: renders
src/App.tsx - App shell → Overall analysis: renders
src/App.tsx - App shell → Metric detail: renders
src/App.tsx - App shell → Manage crops: renders
src/App.tsx - App shell → Settings: renders
src/App.tsx - App shell → App navigation: renders
src/App.tsx - App shell → Sidebar navigation: renders
src/App.tsx - Home dashboard → Local records: reads
src/screens/HomeScreen.tsx - Home dashboard → Crop catalog: reads
src/screens/HomeScreen.tsx - Home dashboard → Metric card: renders
src/screens/HomeScreen.tsx - Sensor view → Local records: reads
src/screens/SensorScreen.tsx - Sensor view → Metric card: renders
src/screens/SensorScreen.tsx - Crop result → Local records: reads
src/screens/CropResultScreen.tsx - Crop result → Metric card: renders
src/screens/CropResultScreen.tsx - History → Local records: reads
src/screens/HistoryScreen.tsx - History → Metric card: renders
src/screens/HistoryScreen.tsx - History detail → Local records: reads
src/screens/HistoryDetailScreen.tsx - History detail → Metric card: renders
src/screens/HistoryDetailScreen.tsx - Saved report → Metric card: renders
src/screens/SavedReportScreen.tsx - Insights → Local records: reads
src/screens/InsightsScreen.tsx - Insights → Insight chart: renders
src/screens/InsightsScreen.tsx - Metric detail → Local records: reads
src/screens/MetricDetailScreen.tsx - Manage crops → Crop catalog: searches
src/screens/ManageCropsScreen.tsx - Settings → Crop catalog: reads
src/screens/SettingsScreen.tsx - Settings → Local records: reads
src/screens/SettingsScreen.tsx - Crop photo → Action button: renders
src/screens/CropPhotoScreen.tsx - Settings → Action button: renders
src/screens/SettingsScreen.tsx - Settings → Screen header: renders
src/screens/SettingsScreen.tsx