How racmanmontes09-cyber/proleaf works
This is a Laravel greenhouse monitoring and control application: IoT devices report telemetry, while users monitor greenhouse status, alerts and history and can manage devices and issue commands. Its main workflow is device telemetry ingestion, threshold/health evaluation, and dashboard presentation; a separate command workflow lets devices claim and report command results. The tree and source index show the major subsystems, but several key controllers and services were not excerpted, so their runtime connections are shown as unverified rather than asserted. The README is Laravel boilerplate, not product documentation.
Main entry points: TelemetryService.php Telemetry processing · DashboardService.php Greenhouse dashboard · AlertService.php Alert evaluation · DeviceCommandController.php Device command API
Components 24
Device communication
- Telemetry API
app/Http/Controllers/Api/TelemetryController.php - Device authentication
app/Http/Middleware/AuthenticateDevice.php - Telemetry processing
app/Services/TelemetryService.php - MQTT subscriber
app/Console/Commands/MqttSubscribe.php - Telemetry records
app/Models/Telemetry.php - Device registry
app/Models/Device.php
Monitoring and alerts
- Greenhouse dashboard
app/Services/DashboardService.php - Device status view
app/Livewire/Dashboard/DeviceStatus.php - Alert evaluation
app/Services/AlertService.php - Threshold settings
app/Services/ThresholdService.php - Alert access
app/Repositories/AlertRepository.php - Alert records
app/Models/Alert.php - Offline notifications
app/Mail/GreenhouseOfflineNotification.php
Device control
- Device command API
app/Http/Controllers/Api/DeviceCommandController.php - Command lifecycle
app/Services/DeviceCommandService.php - Command access
app/Repositories/DeviceCommandRepository.php - Device commands
app/Models/DeviceCommand.php
Users and settings
- User administration
app/Livewire/Admin/Users.php - Users and roles
app/Models/User.php - System settings API
app/Http/Controllers/Api/SystemSettingsController.php - System settings
app/Models/SystemSetting.php
Other components
- IoT device
- Greenhouse user
- Email service
Connections 27
- IoT device → Telemetry API: submits readings
- Telemetry API → Device authentication: authenticates
- Telemetry API → Telemetry processing: processes readings
- Telemetry processing → Telemetry records: stores readings
- Telemetry processing → Alert evaluation: evaluates alerts
- MQTT subscriber → Telemetry processing: dispatches telemetry
- Greenhouse user → Greenhouse dashboard: views status
- Greenhouse dashboard → Device status view: renders status
app/Services/DashboardService.php - Greenhouse dashboard → Telemetry processing: reads telemetry
app/Services/DashboardService.php - Greenhouse dashboard → Alert evaluation: reads alerts
app/Services/DashboardService.php - Greenhouse dashboard → Threshold settings: uses thresholds
app/Services/DashboardService.php - Alert evaluation → Threshold settings: loads thresholds
app/Services/AlertService.php - Alert evaluation → Alert access: manages alerts
app/Services/AlertService.php - Alert access → Alert records: queries alerts
app/Repositories/AlertRepository.php - Alert evaluation → Offline notifications: sends notification
app/Services/AlertService.php - Offline notifications → Email service: delivers email
- IoT device → Device command API: claims commands
- Device command API → Command lifecycle: updates lifecycle
app/Http/Controllers/Api/DeviceCommandController.php - Device command API → Command access: finds command
app/Http/Controllers/Api/DeviceCommandController.php - Command lifecycle → Command access: manages commands
app/Services/DeviceCommandService.php - Command access → Device commands: queries commands
app/Repositories/DeviceCommandRepository.php - Device command API → Device registry: uses device
app/Http/Controllers/Api/DeviceCommandController.php - Greenhouse user → User administration: manages users
- User administration → Users and roles: manages accounts
app/Livewire/Admin/Users.php - System settings API → Threshold settings: uses thresholds
app/Http/Controllers/Api/SystemSettingsController.php - Threshold settings → System settings: reads settings
app/Services/ThresholdService.php - Telemetry processing → Device registry: updates device