# ochiengedwin/water-billing-system architecture

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

- Interactive diagram: https://gitdiagram.com/ochiengedwin/water-billing-system
- Repository: https://github.com/ochiengedwin/water-billing-system

## Overview

This is a small Tkinter water-billing application. Users register or sign in, view their account, enter a meter reading, and receive an updated bill; administrators can sign in and change charges. The code also includes account deletion and activity logging. The excerpt shows SQLite access using `waterbill.db`, while the tree contains `database.db`; their relationship is unclear. `check_bill` is imported from `waterBill`, which is absent from the tree, so its implementation and downstream behavior cannot be verified.

Main entry points: [`edu.py`](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py) (Tkinter screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Tkinter screens<br/>[edu.py]"]
  node_activity_log["Activity logging<br/>[edu.py]"]
end

subgraph group_accounts["Accounts"]
  node_user_auth["User authentication<br/>[edu.py]"]
  node_registration["User registration<br/>[edu.py]"]
  node_account_deletion["Account deletion<br/>[edu.py]"]
  node_sqlite[("SQLite store")]
end

subgraph group_billing["Billing"]
  node_bill_check["Bill check"]
  node_bill_update["Meter bill update<br/>[edu.py]"]
  node_charge_admin["Charge settings<br/>[edu.py]"]
end

node_user(("User"))
node_admin(("Administrator"))

node_user -->|"uses"| node_app
node_admin -->|"uses"| node_app
node_app -->|"submits credentials"| node_user_auth
node_app -->|"registers"| node_registration
node_app -->|"requests bill check"| node_bill_check
node_app -->|"submits meter reading"| node_bill_update
node_app -->|"opens charge settings"| node_charge_admin
node_app -->|"requests deletion"| node_account_deletion
node_user_auth -->|"queries credentials"| node_sqlite
node_registration -->|"inserts account"| node_sqlite
node_account_deletion -->|"deletes records"| node_sqlite
node_bill_update -->|"updates bill"| node_sqlite
node_charge_admin -->|"updates charges"| node_sqlite
node_app -->|"appends events"| node_activity_log

click node_app "https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py"
click node_user_auth "https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py"
click node_registration "https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py"
click node_account_deletion "https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py"
click node_bill_update "https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py"
click node_charge_admin "https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py"
click node_activity_log "https://github.com/ochiengedwin/water-billing-system/blob/main/edu.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_app,node_activity_log,node_user toneBlue
class node_user_auth,node_registration,node_account_deletion,node_sqlite toneAmber
class node_bill_check,node_bill_update,node_charge_admin toneMint
class node_admin toneIndigo
```

## Components

### User interface

- [Tkinter screens](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py): `edu.py`
- [Activity logging](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py): `edu.py`

### Accounts

- [User authentication](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py): `edu.py`
- [User registration](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py): `edu.py`
- [Account deletion](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py): `edu.py`
- **SQLite store**

### Billing

- **Bill check**
- [Meter bill update](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py): `edu.py`
- [Charge settings](https://github.com/ochiengedwin/water-billing-system/blob/main/edu.py): `edu.py`

### Other components

- **User**
- **Administrator**

## Connections

- User → Tkinter screens: uses (evidence: `edu.py`)
- Administrator → Tkinter screens: uses (evidence: `edu.py`)
- Tkinter screens → User authentication: submits credentials (evidence: `edu.py`)
- Tkinter screens → User registration: registers (evidence: `edu.py`)
- Tkinter screens → Bill check: requests bill check (evidence: `edu.py`)
- Tkinter screens → Meter bill update: submits meter reading (evidence: `edu.py`)
- Tkinter screens → Charge settings: opens charge settings (evidence: `edu.py`)
- Tkinter screens → Account deletion: requests deletion (evidence: `edu.py`)
- User authentication → SQLite store: queries credentials (evidence: `edu.py`)
- User registration → SQLite store: inserts account (evidence: `edu.py`)
- Account deletion → SQLite store: deletes records (evidence: `edu.py`)
- Meter bill update → SQLite store: updates bill (evidence: `edu.py`)
- Charge settings → SQLite store: updates charges (evidence: `edu.py`)
- Tkinter screens → Activity logging: appends events (evidence: `edu.py`)
