# ammaarah14/password_checker architecture

> Architecture diagram of the GitHub repository ammaarah14/password_checker, 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/ammaarah14/password_checker
- Repository: https://github.com/ammaarah14/password_checker

## Overview

Vault is a small password strength and breach-checking tool with two entry points: an interactive/batch CLI and a local Flask web app. Each accepts a password, uses shared logic for heuristic strength scoring, entropy, labeling, crack-time estimation, and a k-anonymity breach lookup, then presents a report or JSON response. The README documents the browser UI and privacy model; templates/index.html is present but its source was not sampled, so its wiring is shown only as documented. Edges reflect sampled calls or README statements.

Main entry points: [`app.py`](https://github.com/ammaarah14/password_checker/blob/main/app.py) (Web API), [`cli.py`](https://github.com/ammaarah14/password_checker/blob/main/cli.py) (CLI workflow), [`templates/index.html`](https://github.com/ammaarah14/password_checker/blob/main/templates/index.html) (Web interface), [`checker.py`](https://github.com/ammaarah14/password_checker/blob/main/checker.py) (Private breach lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI workflow<br/>[cli.py]"]
  node_web["Web API<br/>[app.py]"]
  node_web_ui["Web interface<br/>[index.html]"]
end

subgraph group_analysis["Password analysis"]
  node_strength["Strength scoring<br/>[checker.py]"]
  node_strength_label["Strength label<br/>[checker.py]"]
  node_crack_time["Crack-time estimate<br/>[checker.py]"]
end

subgraph group_breaches["Breach lookup"]
  node_hibp{{"Pwned Passwords API"}}
  node_breach_lookup["Private breach lookup<br/>[checker.py]"]
end

node_cli_user(("CLI user"))
node_web_user(("Browser user"))

node_cli_user -->|"provides password"| node_cli
node_cli -->|"scores password"| node_strength
node_cli -->|"labels score"| node_strength_label
node_cli -->|"estimates time"| node_crack_time
node_cli -->|"checks breach"| node_breach_lookup
node_web_user -.->|"enters password"| node_web_ui
node_web_ui -.->|"submits check"| node_web
node_web -->|"renders page"| node_web_ui
node_web -->|"scores password"| node_strength
node_web -->|"labels score"| node_strength_label
node_web -->|"estimates time"| node_crack_time
node_web -->|"checks breach"| node_breach_lookup
node_breach_lookup -->|"sends hash prefix"| node_hibp

click node_cli "https://github.com/ammaarah14/password_checker/blob/main/cli.py"
click node_web "https://github.com/ammaarah14/password_checker/blob/main/app.py"
click node_web_ui "https://github.com/ammaarah14/password_checker/blob/main/templates/index.html"
click node_strength "https://github.com/ammaarah14/password_checker/blob/main/checker.py"
click node_strength_label "https://github.com/ammaarah14/password_checker/blob/main/checker.py"
click node_crack_time "https://github.com/ammaarah14/password_checker/blob/main/checker.py"
click node_breach_lookup "https://github.com/ammaarah14/password_checker/blob/main/checker.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_cli,node_web,node_web_ui,node_cli_user,node_web_user toneBlue
class node_strength,node_strength_label,node_crack_time toneAmber
class node_hibp,node_breach_lookup toneMint
```

## Components

### User interfaces

- [CLI workflow](https://github.com/ammaarah14/password_checker/blob/main/cli.py): `cli.py`
- [Web API](https://github.com/ammaarah14/password_checker/blob/main/app.py): `app.py`
- [Web interface](https://github.com/ammaarah14/password_checker/blob/main/templates/index.html): `templates/index.html`

### Password analysis

- [Strength scoring](https://github.com/ammaarah14/password_checker/blob/main/checker.py): `checker.py`
- [Strength label](https://github.com/ammaarah14/password_checker/blob/main/checker.py): `checker.py`
- [Crack-time estimate](https://github.com/ammaarah14/password_checker/blob/main/checker.py): `checker.py`

### Breach lookup

- **Pwned Passwords API**
- [Private breach lookup](https://github.com/ammaarah14/password_checker/blob/main/checker.py): `checker.py`

### Other components

- **CLI user**
- **Browser user**

## Connections

- CLI user → CLI workflow: provides password (evidence: `README.md`)
- CLI workflow → Strength scoring: scores password (evidence: `cli.py`)
- CLI workflow → Strength label: labels score (evidence: `cli.py`)
- CLI workflow → Crack-time estimate: estimates time (evidence: `cli.py`)
- CLI workflow → Private breach lookup: checks breach (evidence: `cli.py`)
- Browser user → Web interface: enters password (evidence: `README.md`)
- Web interface → Web API: submits check (evidence: `README.md`)
- Web API → Web interface: renders page (evidence: `app.py`)
- Web API → Strength scoring: scores password (evidence: `app.py`)
- Web API → Strength label: labels score (evidence: `app.py`)
- Web API → Crack-time estimate: estimates time (evidence: `app.py`)
- Web API → Private breach lookup: checks breach (evidence: `app.py`)
- Private breach lookup → Pwned Passwords API: sends hash prefix (evidence: `checker.py`)
