# strangerfelix/riwaa architecture

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

- Interactive diagram: https://gitdiagram.com/strangerfelix/riwaa
- Repository: https://github.com/strangerfelix/riwaa

## Overview

Riwaa is a Flutter plant-care app paired with an ESP32 watering system; the ESP32 firmware is documented as residing on a separate branch and is not present in this tree. The documented workflow is plant monitoring and manual watering through the app, with Firebase synchronizing data to the controller; the controller waters when moisture falls below a threshold. The tree also shows auth, logs, notifications, scanning, and settings areas. Flutter implementation details were not sampled, so feature-level links beyond README statements are omitted or marked unverified.

Main entry points: [`lib`](https://github.com/strangerfelix/riwaa/tree/app/lib) (Mobile App), [`lib/features/auth`](https://github.com/strangerfelix/riwaa/tree/app/lib/features/auth) (Authentication), [`lib/features/settings`](https://github.com/strangerfelix/riwaa/tree/app/lib/features/settings) (Settings), [`lib/features/home`](https://github.com/strangerfelix/riwaa/tree/app/lib/features/home) (Plant Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Flutter App"]
  node_flutter["Mobile App"]
  node_auth["Authentication"]
  node_settings["Settings"]
end

subgraph group_plant["Plant Features"]
  node_home["Plant Dashboard"]
  node_logs["Plant Logs"]
  node_notifications["Notifications"]
  node_scan["Plant Scan"]
end

subgraph group_sync["Cloud Sync"]
  node_firebase[("Firebase")]
end

subgraph group_device["Watering Hardware"]
  node_esp32["ESP32 Controller"]
  node_moisture["Moisture Sensor"]
  node_relay["Relay And Pump"]
end

node_user(("Plant Owner"))

node_user -->|"uses"| node_flutter
node_flutter -->|"syncs data"| node_firebase
node_flutter -->|"manual watering"| node_firebase
node_firebase -->|"syncs data"| node_esp32
node_esp32 -->|"reads moisture"| node_moisture
node_esp32 -->|"controls watering"| node_relay
node_user -.->|"signs in"| node_auth
node_user -.->|"views plants"| node_home
node_user -.->|"views logs"| node_logs
node_user -.->|"receives updates"| node_notifications
node_user -.->|"scans plant"| node_scan
node_user -.->|"changes settings"| node_settings

click node_flutter "https://github.com/strangerfelix/riwaa/tree/app/lib"
click node_auth "https://github.com/strangerfelix/riwaa/tree/app/lib/features/auth"
click node_home "https://github.com/strangerfelix/riwaa/tree/app/lib/features/home"
click node_logs "https://github.com/strangerfelix/riwaa/tree/app/lib/features/logs"
click node_notifications "https://github.com/strangerfelix/riwaa/tree/app/lib/features/notifications"
click node_scan "https://github.com/strangerfelix/riwaa/tree/app/lib/features/scan"
click node_settings "https://github.com/strangerfelix/riwaa/tree/app/lib/features/settings"

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_flutter,node_auth,node_settings toneBlue
class node_home,node_logs,node_notifications,node_scan toneAmber
class node_firebase toneMint
class node_esp32,node_moisture,node_relay toneRose
class node_user toneIndigo
```

## Components

### Flutter App

- [Mobile App](https://github.com/strangerfelix/riwaa/tree/app/lib): `lib`
- [Authentication](https://github.com/strangerfelix/riwaa/tree/app/lib/features/auth): `lib/features/auth`
- [Settings](https://github.com/strangerfelix/riwaa/tree/app/lib/features/settings): `lib/features/settings`

### Plant Features

- [Plant Dashboard](https://github.com/strangerfelix/riwaa/tree/app/lib/features/home): `lib/features/home`
- [Plant Logs](https://github.com/strangerfelix/riwaa/tree/app/lib/features/logs): `lib/features/logs`
- [Notifications](https://github.com/strangerfelix/riwaa/tree/app/lib/features/notifications): `lib/features/notifications`
- [Plant Scan](https://github.com/strangerfelix/riwaa/tree/app/lib/features/scan): `lib/features/scan`

### Cloud Sync

- **Firebase**

### Watering Hardware

- **ESP32 Controller**
- **Moisture Sensor**
- **Relay And Pump**

### Other components

- **Plant Owner**

## Connections

- Plant Owner → Mobile App: uses (evidence: `README.md`)
- Mobile App → Firebase: syncs data (evidence: `README.md`)
- Mobile App → Firebase: manual watering (evidence: `README.md`)
- Firebase → ESP32 Controller: syncs data (evidence: `README.md`)
- ESP32 Controller → Moisture Sensor: reads moisture (evidence: `README.md`)
- ESP32 Controller → Relay And Pump: controls watering (evidence: `README.md`)
- Plant Owner → Authentication: signs in
- Plant Owner → Plant Dashboard: views plants
- Plant Owner → Plant Logs: views logs
- Plant Owner → Notifications: receives updates
- Plant Owner → Plant Scan: scans plant
- Plant Owner → Settings: changes settings
