# kaowri48/planrcare architecture

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

- Interactive diagram: https://gitdiagram.com/kaowri48/planrcare
- Repository: https://github.com/kaowri48/planrcare

## Overview

PlantCare is a desktop plant-care manager. A user launches the Qt application, navigates the dashboard or care views, and can add or edit plants, review watering status, and inspect care history; MySQL stores the plant and care data. The dashboard coordinates the main views, while plant retrieval and summary calculations also live in a dedicated module. The excerpts establish several view-to-module references, but dashboard sections and some integrations were only partially sampled, so uncertain links are omitted.

Main entry points: [`plantcare/dashboard.py`](https://github.com/kaowri48/planrcare/blob/main/plantcare/dashboard.py) (Dashboard), [`plantcare/my_plants.py`](https://github.com/kaowri48/planrcare/blob/main/plantcare/my_plants.py) (Plant collection), [`plantcare/database.py`](https://github.com/kaowri48/planrcare/blob/main/plantcare/database.py) (Connection helper), [`plantcare/add_plant.py`](https://github.com/kaowri48/planrcare/blob/main/plantcare/add_plant.py) (Add plant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_entry["Qt entry point<br/>[main.py]"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_settings["Settings view<br/>[settings.py]"]
end

subgraph group_care["Plant Care"]
  node_collection["Plant collection<br/>[my_plants.py]"]
  node_add["Add plant<br/>[add_plant.py]"]
  node_edit["Edit plant<br/>[edit_plant.py]"]
  node_schedule["Watering schedule<br/>[schedule.py]"]
  node_history["Care history<br/>[history.py]"]
end

subgraph group_data["Data Access"]
  node_plant_queries["Plant queries and stats<br/>[plants.py]"]
  node_connection["Connection helper<br/>[database.py]"]
  node_mysql[("MySQL plant store")]
end

node_user(("PlantCare user"))

node_user -->|"launches"| node_entry
node_entry -->|"creates"| node_dashboard
node_dashboard -->|"opens"| node_collection
node_dashboard -->|"opens"| node_add
node_dashboard -->|"opens"| node_edit
node_dashboard -->|"opens"| node_schedule
node_dashboard -->|"opens"| node_history
node_dashboard -->|"opens"| node_settings
node_dashboard -->|"loads stats"| node_plant_queries
node_collection -->|"opens"| node_add
node_collection -->|"opens"| node_edit
node_plant_queries -->|"gets connection"| node_connection
node_add -->|"gets connection"| node_connection
node_edit -->|"gets connection"| node_connection
node_connection -->|"connects"| node_mysql
node_schedule -->|"queries and updates"| node_mysql
node_history -->|"reads history"| node_mysql
node_collection -.->|"manages plants"| node_mysql

click node_entry "https://github.com/kaowri48/planrcare/blob/main/plantcare/main.py"
click node_dashboard "https://github.com/kaowri48/planrcare/blob/main/plantcare/dashboard.py"
click node_settings "https://github.com/kaowri48/planrcare/blob/main/plantcare/settings.py"
click node_collection "https://github.com/kaowri48/planrcare/blob/main/plantcare/my_plants.py"
click node_add "https://github.com/kaowri48/planrcare/blob/main/plantcare/add_plant.py"
click node_edit "https://github.com/kaowri48/planrcare/blob/main/plantcare/edit_plant.py"
click node_schedule "https://github.com/kaowri48/planrcare/blob/main/plantcare/schedule.py"
click node_history "https://github.com/kaowri48/planrcare/blob/main/plantcare/history.py"
click node_plant_queries "https://github.com/kaowri48/planrcare/blob/main/plantcare/plants.py"
click node_connection "https://github.com/kaowri48/planrcare/blob/main/plantcare/database.py"

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_entry,node_dashboard,node_settings,node_user toneBlue
class node_collection,node_add,node_edit,node_schedule,node_history toneAmber
class node_plant_queries,node_connection,node_mysql toneMint
```

## Components

### Application Shell

- [Qt entry point](https://github.com/kaowri48/planrcare/blob/main/plantcare/main.py): `plantcare/main.py`
- [Dashboard](https://github.com/kaowri48/planrcare/blob/main/plantcare/dashboard.py): `plantcare/dashboard.py`
- [Settings view](https://github.com/kaowri48/planrcare/blob/main/plantcare/settings.py): `plantcare/settings.py`

### Plant Care

- [Plant collection](https://github.com/kaowri48/planrcare/blob/main/plantcare/my_plants.py): `plantcare/my_plants.py`
- [Add plant](https://github.com/kaowri48/planrcare/blob/main/plantcare/add_plant.py): `plantcare/add_plant.py`
- [Edit plant](https://github.com/kaowri48/planrcare/blob/main/plantcare/edit_plant.py): `plantcare/edit_plant.py`
- [Watering schedule](https://github.com/kaowri48/planrcare/blob/main/plantcare/schedule.py): `plantcare/schedule.py`
- [Care history](https://github.com/kaowri48/planrcare/blob/main/plantcare/history.py): `plantcare/history.py`

### Data Access

- [Plant queries and stats](https://github.com/kaowri48/planrcare/blob/main/plantcare/plants.py): `plantcare/plants.py`
- [Connection helper](https://github.com/kaowri48/planrcare/blob/main/plantcare/database.py): `plantcare/database.py`
- **MySQL plant store**

### Other components

- **PlantCare user**

## Connections

- PlantCare user → Qt entry point: launches (evidence: `plantcare/main.py`)
- Qt entry point → Dashboard: creates (evidence: `plantcare/main.py`)
- Dashboard → Plant collection: opens (evidence: `plantcare/dashboard.py`)
- Dashboard → Add plant: opens (evidence: `plantcare/dashboard.py`)
- Dashboard → Edit plant: opens (evidence: `plantcare/dashboard.py`)
- Dashboard → Watering schedule: opens (evidence: `plantcare/dashboard.py`)
- Dashboard → Care history: opens (evidence: `plantcare/dashboard.py`)
- Dashboard → Settings view: opens (evidence: `plantcare/dashboard.py`)
- Dashboard → Plant queries and stats: loads stats (evidence: `plantcare/dashboard.py`)
- Plant collection → Add plant: opens (evidence: `plantcare/my_plants.py`)
- Plant collection → Edit plant: opens (evidence: `plantcare/my_plants.py`)
- Plant queries and stats → Connection helper: gets connection (evidence: `plantcare/plants.py`)
- Add plant → Connection helper: gets connection (evidence: `plantcare/add_plant.py`)
- Edit plant → Connection helper: gets connection (evidence: `plantcare/edit_plant.py`)
- Connection helper → MySQL plant store: connects (evidence: `plantcare/database.py`)
- Watering schedule → MySQL plant store: queries and updates (evidence: `plantcare/schedule.py`)
- Care history → MySQL plant store: reads history (evidence: `plantcare/history.py`)
- Plant collection → MySQL plant store: manages plants
