How 25pradnyesh/vertifarm-app works
VertiFarm is a mobile-first vertical-farming monitor combining farm and sensor management, environmental telemetry, alerts, analytics, and AI plant-health scans. The main user workflow runs from mobile authentication and dashboard screens through client services and the REST API to backend domain services and persistence; telemetry can also stream to the app. The README documents broader IoT and real-time capabilities, but edge-device implementations are not in this tree. Some screen and backend service links are therefore documented at subsystem level rather than inferred from unsampled code.
Main entry points: apiClient.ts HTTP client · sensorService.ts Sensor service · session.py Backend persistence · router.py REST API
Components 25
Mobile experience
- Authentication screens
app/(auth)/login.tsx - Farm dashboard
app/(tabs)/index.tsx - Telemetry views
app/live-data/[metric].tsx - Farm and sensors
app/sensors/index.tsx - Alert views
app/alerts/[id].tsx - Trend analytics
app/(tabs)/analytics.tsx - AI scan experience
app/ai/result.tsx - Recommendations
app/recommendations.tsx
Client services
- Authentication service
services/authService.ts - Sensor service
services/sensorService.ts - Alert service
services/alertService.ts - AI service
services/aiService.ts - HTTP client
services/apiClient.ts
Backend platform
- REST API
backend/app/api/v1/router.py - Authentication backend
backend/app/services/auth_service.py - Telemetry ingestion
backend/app/services/mqtt_service.py - Realtime publishing
backend/app/services/realtime_service.py - AI inference
backend/app/services/ai_service.py - Backend persistence
backend/app/db/session.py - Farm domain models
backend/app/models/domain.py
Shared presentation
- UI primitives
components/ui/ScreenContainer.tsx - Metric charts
components/charts/SingleMetricChart.tsx
Other components
- Grower
- Farm edge devices
- PostgreSQL / Supabase
Connections 28
- Grower → Authentication screens: signs in
README.md - Authentication screens → Authentication service: authenticates
app/(auth)/login.tsx - Farm dashboard → Sensor service: requests status
app/(tabs)/index.tsx - Telemetry views → Sensor service: loads metrics
app/live-data/[metric].tsx - Farm and sensors → Sensor service: manages devices
app/sensors/index.tsx - Alert views → Alert service: loads alert
app/alerts/[id].tsx - AI scan experience → AI service: submits scan
app/ai/result.tsx - Trend analytics → Sensor service: views trends
README.md - Recommendations → AI service: views guidance
README.md - Authentication service → HTTP client: sends auth requests
services/authService.ts - Sensor service → HTTP client: requests telemetry
services/sensorService.ts - Sensor service → HTTP client: opens telemetry stream
services/sensorService.ts - Alert service → HTTP client: requests alerts
services/alertService.ts - AI service → HTTP client: sends scan requests
services/aiService.ts - HTTP client → REST API: calls REST endpoints
README.md - REST API → Authentication backend: routes authentication
backend/app/api/v1/router.py - REST API → Telemetry ingestion: routes telemetry
- REST API → AI inference: routes AI scans
- Farm edge devices → Telemetry ingestion: publishes telemetry
README.md - Telemetry ingestion → Realtime publishing: publishes readings
backend/app/services/mqtt_service.py - Authentication backend → Backend persistence: reads and writes
backend/app/services/auth_service.py - AI inference → Backend persistence: stores scan data
backend/app/services/ai_service.py - Telemetry ingestion → Backend persistence: stores telemetry
backend/app/services/mqtt_service.py - Backend persistence → Farm domain models: uses domain models
backend/app/db/session.py - Backend persistence → PostgreSQL / Supabase: persists records
README.md - Farm dashboard → UI primitives: renders with
app/(tabs)/index.tsx - Telemetry views → Metric charts: renders chart
app/live-data/[metric].tsx - Realtime publishing → HTTP client: streams updates
README.md