How lander414/coop-monitoring-system works
This is a poultry-coop monitoring and stress-risk evaluator with a React dashboard and Express API. Users review live and historical telemetry, or submit a chicken image for visual analysis and a combined risk assessment. Sensor telemetry is separately received, scored for heat risk, and stored for dashboard retrieval. The sampled code shows these paths and the Supabase and Gemini integrations; the simulator and other unsampled modules are not expanded into inferred workflows.
Main entry points: server.js HTTP server · Dashboard.tsx Monitoring dashboard · api.ts Frontend API client · telemetryRoutes.js Telemetry routes
Components 15
Dashboard
- Monitoring dashboard
poultry-frontend/src/pages/Dashboard.tsx - App shell
poultry-frontend/src/App.tsx - Frontend entry
poultry-frontend/src/main.tsx - Status animation
poultry-frontend/src/components/ChickenStatusAnimation.tsx - Monitoring types
poultry-frontend/src/types/monitoring.ts
API
- Frontend API client
poultry-frontend/src/services/api.ts - HTTP server
poultry-backend/server.js - Telemetry routes
poultry-backend/routes/telemetryRoutes.js
Risk assessment
- Image uploads
poultry-backend/uploads - Image analysis
poultry-backend/services/aiService.js - Combined risk engine
poultry-backend/services/riskEngine.js
External services
- Supabase telemetry store
- Google Gemini
Other components
- Coop operator
- Coop sensor
Connections 16
- Coop operator → Monitoring dashboard: views and submits
poultry-frontend/src/pages/Dashboard.tsx - Frontend entry → App shell: renders
poultry-frontend/src/main.tsx - App shell → Monitoring dashboard: renders
poultry-frontend/src/App.tsx - Monitoring dashboard → Frontend API client: requests data and evaluation
poultry-frontend/src/pages/Dashboard.tsx - Monitoring dashboard → Status animation: renders status
poultry-frontend/src/pages/Dashboard.tsx - Monitoring dashboard → Monitoring types: uses types
poultry-frontend/src/pages/Dashboard.tsx - Status animation → Monitoring types: uses risk type
poultry-frontend/src/components/ChickenStatusAnimation.tsx - Frontend API client → Monitoring types: uses response types
poultry-frontend/src/services/api.ts - Frontend API client → HTTP server: calls API
poultry-frontend/src/services/api.ts - Coop sensor → Telemetry routes: posts readings
poultry-backend/routes/telemetryRoutes.js - HTTP server → Telemetry routes: mounts routes
poultry-backend/server.js - Telemetry routes → Supabase telemetry store: reads and writes
poultry-backend/routes/telemetryRoutes.js - HTTP server → Image uploads: stores images
poultry-backend/server.js - HTTP server → Image analysis: analyzes uploaded image
poultry-backend/server.js - HTTP server → Combined risk engine: calculates assessment
poultry-backend/server.js - Image analysis → Google Gemini: requests image analysis
poultry-backend/services/aiService.js