# mynrdvx/smart-hydroponics architecture

> Architecture diagram of the GitHub repository mynrdvx/smart-hydroponics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mynrdvx/smart-hydroponics
- Repository: https://github.com/mynrdvx/smart-hydroponics

## Overview

Smart Hydroponics is a React Native app for monitoring and interacting with a hydroponics installation. The user enters through the login route, then navigates from the dashboard to sensor readings and related views, including history, captured images, alerts, and forecasts. The README documents Firebase services and Arduino/ESP32 communication as product capabilities; the supplied excerpts do not establish the precise runtime wiring for those integrations. Forecast code shown uses local sample data, and the pH detail screen excerpt simulates readings.

Main entry points: [`App.js`](https://github.com/mynrdvx/smart-hydroponics/blob/main/App.js) (Navigation app), [`screens/DashboardScreen.js`](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/DashboardScreen.js) (Dashboard), [`screens/SensorDetail.js`](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/SensorDetail.js) (Sensor details), [`screens`](https://github.com/mynrdvx/smart-hydroponics/tree/main/screens) (Sensor screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile navigation"]
  node_app["Navigation app<br/>[App.js]"]
  node_login["Login<br/>[LoginScreen.js]"]
  node_dashboard["Dashboard<br/>[DashboardScreen.js]"]
end

subgraph group_monitoring["Sensor monitoring"]
  node_sensor_detail["Sensor details<br/>[SensorDetail.js]"]
  node_sensor_screens["Sensor screens"]
  node_realtime_views["Realtime views"]
end

subgraph group_insights["History and insights"]
  node_forecast["Forecast<br/>[Forecast.js]"]
  node_alerts["Alert history<br/>[AlertHistory.js]"]
  node_images["Growth captures<br/>[CapturedImages.js]"]
end

subgraph group_integrations["Backend and hardware"]
  node_firebase_auth["Firebase auth<br/>[firebaseConfig.js]"]
  node_firebase_db[("Firebase database<br/>[firebaseConfig.js]")]
  node_hardware["Arduino / ESP32"]
end

node_user(("Grower"))

node_user -->|"opens"| node_app
node_app -->|"initial route"| node_login
node_app -->|"navigates"| node_dashboard
node_app -->|"routes to"| node_sensor_detail
node_app -->|"routes to"| node_sensor_screens
node_app -->|"routes to"| node_forecast
node_app -->|"routes to"| node_alerts
node_app -->|"routes to"| node_images
node_dashboard -->|"opens"| node_sensor_detail
node_sensor_detail -->|"shows readings"| node_sensor_screens
node_sensor_screens -->|"includes views"| node_realtime_views
node_user -->|"views"| node_dashboard
node_hardware -.->|"sends sensor data"| node_firebase_db
node_firebase_db -.->|"provides realtime data"| node_app
node_login -.->|"authenticates"| node_firebase_auth

click node_app "https://github.com/mynrdvx/smart-hydroponics/blob/main/App.js"
click node_login "https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/LoginScreen.js"
click node_dashboard "https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/DashboardScreen.js"
click node_sensor_detail "https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/SensorDetail.js"
click node_sensor_screens "https://github.com/mynrdvx/smart-hydroponics/tree/main/screens"
click node_realtime_views "https://github.com/mynrdvx/smart-hydroponics/tree/main/screens/sensors-realtime-fe"
click node_forecast "https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/Forecast.js"
click node_alerts "https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/AlertHistory.js"
click node_images "https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/CapturedImages.js"
click node_firebase_auth "https://github.com/mynrdvx/smart-hydroponics/blob/main/services/firebaseConfig.js"
click node_firebase_db "https://github.com/mynrdvx/smart-hydroponics/blob/main/config/firebaseConfig.js"
click node_hardware "https://github.com/mynrdvx/smart-hydroponics/tree/main/Arduino"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_login,node_dashboard toneBlue
class node_sensor_detail,node_sensor_screens,node_realtime_views toneAmber
class node_forecast,node_alerts,node_images toneMint
class node_firebase_auth,node_firebase_db,node_hardware toneRose
class node_user toneIndigo
```

## Components

### Mobile navigation

- [Navigation app](https://github.com/mynrdvx/smart-hydroponics/blob/main/App.js): `App.js`
- [Login](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/LoginScreen.js): `screens/LoginScreen.js`
- [Dashboard](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/DashboardScreen.js): `screens/DashboardScreen.js`

### Sensor monitoring

- [Sensor details](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/SensorDetail.js): `screens/SensorDetail.js`
- [Sensor screens](https://github.com/mynrdvx/smart-hydroponics/tree/main/screens): `screens`
- [Realtime views](https://github.com/mynrdvx/smart-hydroponics/tree/main/screens/sensors-realtime-fe): `screens/sensors-realtime-fe`

### History and insights

- [Forecast](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/Forecast.js): `screens/Forecast.js`
- [Alert history](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/AlertHistory.js): `screens/AlertHistory.js`
- [Growth captures](https://github.com/mynrdvx/smart-hydroponics/blob/main/screens/CapturedImages.js): `screens/CapturedImages.js`

### Backend and hardware

- [Firebase auth](https://github.com/mynrdvx/smart-hydroponics/blob/main/services/firebaseConfig.js): `services/firebaseConfig.js`
- [Firebase database](https://github.com/mynrdvx/smart-hydroponics/blob/main/config/firebaseConfig.js): `config/firebaseConfig.js`
- [Arduino / ESP32](https://github.com/mynrdvx/smart-hydroponics/tree/main/Arduino): `Arduino`

### Other components

- **Grower**

## Connections

- Grower → Navigation app: opens
- Navigation app → Login: initial route
- Navigation app → Dashboard: navigates
- Navigation app → Sensor details: routes to
- Navigation app → Sensor screens: routes to
- Navigation app → Forecast: routes to
- Navigation app → Alert history: routes to
- Navigation app → Growth captures: routes to
- Dashboard → Sensor details: opens
- Sensor details → Sensor screens: shows readings
- Sensor screens → Realtime views: includes views
- Grower → Dashboard: views
- Arduino / ESP32 → Firebase database: sends sensor data
- Firebase database → Navigation app: provides realtime data
- Login → Firebase auth: authenticates
