# hub0777/password-toolkit architecture

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

- Interactive diagram: https://gitdiagram.com/hub0777/password-toolkit
- Repository: https://github.com/hub0777/password-toolkit

## Overview

Password Toolkit is a terminal app for checking password strength, generating passwords, checking breach exposure, and reviewing saved results. The principal workflow starts at the menu, which dispatches user choices to the relevant feature; strength and breach checks save results, while log viewing reads them back. Password generation is also initiated by the menu. The README describes encoding as “coming soon”; the shown code only prints a notice. Relationships below are limited to those shown in the excerpts or documented in the README.

Main entry points: [`menu.py`](https://github.com/hub0777/password-toolkit/blob/main/menu.py) (Menu loop), [`file_manager.py`](https://github.com/hub0777/password-toolkit/blob/main/file_manager.py) (Log manager), [`breach.py`](https://github.com/hub0777/password-toolkit/blob/main/breach.py) (Breach check), [`main.py`](https://github.com/hub0777/password-toolkit/blob/main/main.py) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Terminal interface"]
  node_entry["Application entry<br/>[main.py]"]
  node_menu["Menu loop<br/>[menu.py]"]
  node_menu_display["Menu display<br/>[utils.py]"]
end

subgraph group_password_tools["Password tools"]
  node_strength["Strength check<br/>[strength.py]"]
  node_generator["Password generator<br/>[generator.py]"]
  node_breach["Breach check<br/>[breach.py]"]
  node_encoding_notice["Encoding notice<br/>[menu.py]"]
end

subgraph group_history["Result history"]
  node_log_manager["Log manager<br/>[file_manager.py]"]
  node_log_file[("Local log file")]
end

node_user(("User"))
node_hibp["HIBP API"]

node_user -->|"starts app"| node_entry
node_entry -->|"runs menu"| node_menu
node_user -->|"chooses option"| node_menu
node_menu -->|"displays options"| node_menu_display
node_menu -->|"checks strength"| node_strength
node_menu -->|"generates password"| node_generator
node_menu -->|"checks breach"| node_breach
node_menu -->|"views log"| node_log_manager
node_menu -->|"shows notice"| node_encoding_notice
node_breach -->|"requests hash range"| node_hibp
node_strength -->|"saves result"| node_log_manager
node_breach -->|"saves result"| node_log_manager
node_menu -->|"saves activity"| node_log_manager
node_log_manager -->|"appends and reads"| node_log_file

click node_entry "https://github.com/hub0777/password-toolkit/blob/main/main.py"
click node_menu "https://github.com/hub0777/password-toolkit/blob/main/menu.py"
click node_menu_display "https://github.com/hub0777/password-toolkit/blob/main/utils.py"
click node_strength "https://github.com/hub0777/password-toolkit/blob/main/strength.py"
click node_generator "https://github.com/hub0777/password-toolkit/blob/main/generator.py"
click node_breach "https://github.com/hub0777/password-toolkit/blob/main/breach.py"
click node_log_manager "https://github.com/hub0777/password-toolkit/blob/main/file_manager.py"
click node_encoding_notice "https://github.com/hub0777/password-toolkit/blob/main/menu.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_menu,node_menu_display,node_user toneBlue
class node_strength,node_generator,node_breach,node_encoding_notice toneAmber
class node_log_manager,node_log_file,node_hibp toneMint
```

## Components

### Terminal interface

- [Application entry](https://github.com/hub0777/password-toolkit/blob/main/main.py): `main.py`
- [Menu loop](https://github.com/hub0777/password-toolkit/blob/main/menu.py): `menu.py`
- [Menu display](https://github.com/hub0777/password-toolkit/blob/main/utils.py): `utils.py`

### Password tools

- [Strength check](https://github.com/hub0777/password-toolkit/blob/main/strength.py): `strength.py`
- [Password generator](https://github.com/hub0777/password-toolkit/blob/main/generator.py): `generator.py`
- [Breach check](https://github.com/hub0777/password-toolkit/blob/main/breach.py): `breach.py`
- [Encoding notice](https://github.com/hub0777/password-toolkit/blob/main/menu.py): `menu.py`

### Result history

- [Log manager](https://github.com/hub0777/password-toolkit/blob/main/file_manager.py): `file_manager.py`
- **Local log file**

### Other components

- **User**
- **HIBP API**

## Connections

- User → Application entry: starts app (evidence: `README.md`)
- Application entry → Menu loop: runs menu (evidence: `main.py`)
- User → Menu loop: chooses option (evidence: `menu.py`)
- Menu loop → Menu display: displays options (evidence: `menu.py`)
- Menu loop → Strength check: checks strength (evidence: `menu.py`)
- Menu loop → Password generator: generates password (evidence: `menu.py`)
- Menu loop → Breach check: checks breach (evidence: `menu.py`)
- Menu loop → Log manager: views log (evidence: `menu.py`)
- Menu loop → Encoding notice: shows notice (evidence: `menu.py`)
- Breach check → HIBP API: requests hash range (evidence: `breach.py`)
- Strength check → Log manager: saves result (evidence: `strength.py`)
- Breach check → Log manager: saves result (evidence: `breach.py`)
- Menu loop → Log manager: saves activity (evidence: `menu.py`)
- Log manager → Local log file: appends and reads (evidence: `file_manager.py`)
