How amemiyakana890/plant-monitoring works
Plant Environment Monitoring is an IoT plant-care system: an ESP32 sensor sends environmental readings to an authenticated API, which stores logs, evaluates plant conditions, and may issue alerts; the Flutter app presents plant status, history, notifications, and settings. The graph includes the documented pairing, species, watering, and push-notification capabilities. App and several server routes/controllers were not sampled, so uncertain internal dispatch links are omitted.
Main entry points: app.js Express API · http_plant_repository.dart HTTP repository · db.js SQLite state · sensorController.js Sensor evaluation
Components 25
Sensing device
- Environment sensors
esp32/plant_sensor_integrated/plant_sensor_integrated.ino - ESP32 firmware
esp32/plant_sensor_integrated/plant_sensor_integrated.ino
API and evaluation
- Express API
server/app.js - Sensor endpoint
server/routes/sensor.js - Sensor evaluation
server/controllers/sensorController.js - Plant management
server/controllers/plantsController.js - Device pairing
server/controllers/devicesController.js - History queries
server/controllers/historyController.js - Alert settings
server/controllers/settingsController.js - Status rules
server/utils/plantStatus.js - Species catalog
server/utils/speciesCatalog.js
Persistent state
- SQLite state
server/database/db.js
Mobile app
- Flutter app
app/lib/main.dart - Login flow
app/lib/screens/auth - Auth state
app/lib/state/auth_store.dart - Plant state
app/lib/state/plant_store.dart - HTTP repository
app/lib/repositories/http_plant_repository.dart - Plant screens
app/lib/screens - History screen
app/lib/screens/history/history_page.dart - Notification screen
app/lib/screens/notification/notification_page.dart - Settings screens
app/lib/screens/settings - Push service
app/lib/services/push_notification_service.dart
External services
- Firebase Auth
- Firebase messaging
Other components
- Plant grower
Connections 28
- Plant grower → Flutter app: uses
- Environment sensors → ESP32 firmware: provides readings
- ESP32 firmware → Sensor endpoint: sends HTTP
- Express API → Sensor endpoint: mounts route
- Express API → Plant management: mounts API
- Express API → Device pairing: mounts API
- Express API → History queries: mounts API
- Express API → Alert settings: mounts API
- Sensor endpoint → Sensor evaluation: handles readings
- Sensor evaluation → Status rules: evaluates status
- Sensor evaluation → SQLite state: stores logs and alerts
- Sensor evaluation → Firebase messaging: sends push
- Plant management → Species catalog: loads care profile
- Plant management → SQLite state: reads and writes plants
- Device pairing → SQLite state: manages pairing
- History queries → SQLite state: reads sensor logs
- Alert settings → SQLite state: stores preferences
- Flutter app → Login flow: shows login
- Login flow → Auth state: uses auth state
- Auth state → Firebase Auth: authenticates
- Flutter app → Plant state: provides app state
- Plant state → HTTP repository: loads plant data
- HTTP repository → Express API: calls API
- Plant screens → Plant state: reads plant state
- History screen → HTTP repository: requests history
- Notification screen → HTTP repository: loads alerts
- Settings screens → HTTP repository: updates settings
- Push service → Firebase messaging: registers token