# angeshpandian-afk/password-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/angeshpandian-afk/password-analyzer
- Repository: https://github.com/angeshpandian-afk/password-analyzer

## Overview

PassGuard is a local password-strength and security-awareness application, offered as a Flask web app and an offline single-file HTML version. In the Flask workflow, a user enters a password in the analyzer page; its browser script sends it to the API, which invokes the analysis engine and returns scores, checks, warnings, and crack-time estimates for display. Users can also generate passwords, download reports, and view awareness tips and a quiz. The graph preserves these documented capabilities; some page-to-script links rely on README documentation rather than sampled page source.

Main entry points: [`app.py`](https://github.com/angeshpandian-afk/password-analyzer/blob/main/app.py) (Routes and API), [`core/wordlist.py`](https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/wordlist.py) (Word Data Loader), [`core/analyzer.py`](https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/analyzer.py) (Strength Engine), [`static/js/analyzer.js`](https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/analyzer.js) (Analyzer UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Flask Web App"]
  node_flask["Routes and API<br/>[app.py]"]
  node_analyzer_page["Analyzer Page<br/>[index.html]"]
  node_analyzer_ui["Analyzer UI<br/>[analyzer.js]"]
  node_shared_ui["Shared UI Helpers<br/>[common.js]"]
  node_theme_ui["Theme Controls<br/>[theme.js]"]
end

subgraph group_analysis["Password Analysis"]
  node_analysis_engine["Strength Engine<br/>[analyzer.py]"]
  node_common_check["Blocklist Check<br/>[common.py]"]
  node_wordlist["Word Data Loader<br/>[wordlist.py]"]
  node_blocklist["Common Passwords"]
  node_words["Dictionary Words<br/>[wordlist.txt]"]
end

subgraph group_features["User Features"]
  node_generator_page["Generator Page<br/>[generator.html]"]
  node_generator_ui["Generator UI<br/>[generator.js]"]
  node_generator_engine["Secure Generator<br/>[generator.py]"]
  node_report_engine["Report Builder<br/>[report.py]"]
  node_awareness_page["Awareness Page<br/>[awareness.html]"]
  node_awareness_ui["Awareness UI<br/>[awareness.js]"]
  node_awareness_content["Tips and Quiz<br/>[awareness.json]"]
end

subgraph group_offline["Offline Edition"]
  node_offline_file["Standalone HTML<br/>[PassGuard.html]"]
  node_offline_engine["Offline Logic<br/>[engine.js]"]
  node_offline_ui["Offline UI<br/>[ui.js]"]
end

node_user(("User"))
node_browser(("Browser"))

node_user -->|"uses"| node_browser
node_browser -->|"opens"| node_analyzer_page
node_analyzer_page -->|"loads script"| node_analyzer_ui
node_analyzer_ui -->|"calls API helper"| node_shared_ui
node_shared_ui -->|"sends requests"| node_flask
node_flask -->|"analyzes"| node_analysis_engine
node_analysis_engine -->|"checks blocklist"| node_common_check
node_analysis_engine -->|"matches words"| node_wordlist
node_common_check -->|"uses data path"| node_wordlist
node_wordlist -->|"loads"| node_blocklist
node_wordlist -->|"loads"| node_words
node_analysis_engine -->|"returns results"| node_analyzer_ui
node_browser -->|"opens"| node_generator_page
node_generator_page -->|"loads script"| node_generator_ui
node_generator_ui -->|"uses helpers"| node_shared_ui
node_flask -->|"generates passwords"| node_generator_engine
node_generator_engine -->|"chooses passphrase words"| node_wordlist
node_generator_ui -->|"requests generation"| node_flask
node_analyzer_ui -->|"requests reports"| node_flask
node_flask -->|"builds report"| node_report_engine
node_browser -->|"opens"| node_awareness_page
node_awareness_page -->|"loads script"| node_awareness_ui
node_flask -->|"loads content"| node_awareness_content
node_awareness_ui -->|"presents tips and quiz"| node_awareness_content
node_browser -->|"uses theme"| node_theme_ui
node_user -->|"opens locally"| node_offline_file
node_offline_file -->|"includes UI"| node_offline_ui
node_offline_ui -->|"calls analysis and generation"| node_offline_engine
node_offline_engine -->|"uses embedded data"| node_words
node_offline_engine -->|"uses embedded data"| node_blocklist

click node_flask "https://github.com/angeshpandian-afk/password-analyzer/blob/main/app.py"
click node_analyzer_page "https://github.com/angeshpandian-afk/password-analyzer/blob/main/templates/index.html"
click node_analyzer_ui "https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/analyzer.js"
click node_shared_ui "https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/common.js"
click node_analysis_engine "https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/analyzer.py"
click node_common_check "https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/common.py"
click node_wordlist "https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/wordlist.py"
click node_blocklist "https://github.com/angeshpandian-afk/password-analyzer/blob/main/data/common_passwords.txt"
click node_words "https://github.com/angeshpandian-afk/password-analyzer/blob/main/data/wordlist.txt"
click node_generator_page "https://github.com/angeshpandian-afk/password-analyzer/blob/main/templates/generator.html"
click node_generator_ui "https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/generator.js"
click node_generator_engine "https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/generator.py"
click node_report_engine "https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/report.py"
click node_awareness_page "https://github.com/angeshpandian-afk/password-analyzer/blob/main/templates/awareness.html"
click node_awareness_ui "https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/awareness.js"
click node_awareness_content "https://github.com/angeshpandian-afk/password-analyzer/blob/main/data/awareness.json"
click node_theme_ui "https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/theme.js"
click node_offline_file "https://github.com/angeshpandian-afk/password-analyzer/blob/main/standalone/PassGuard.html"
click node_offline_engine "https://github.com/angeshpandian-afk/password-analyzer/blob/main/standalone/src/engine.js"
click node_offline_ui "https://github.com/angeshpandian-afk/password-analyzer/blob/main/standalone/src/ui.js"

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_flask,node_analyzer_page,node_analyzer_ui,node_shared_ui,node_theme_ui,node_user,node_browser toneBlue
class node_analysis_engine,node_common_check,node_wordlist,node_blocklist,node_words toneAmber
class node_generator_page,node_generator_ui,node_generator_engine,node_report_engine,node_awareness_page,node_awareness_ui,node_awareness_content toneMint
class node_offline_file,node_offline_engine,node_offline_ui toneRose
```

## Components

### Flask Web App

- [Routes and API](https://github.com/angeshpandian-afk/password-analyzer/blob/main/app.py): `app.py`
- [Analyzer Page](https://github.com/angeshpandian-afk/password-analyzer/blob/main/templates/index.html): `templates/index.html`
- [Analyzer UI](https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/analyzer.js): `static/js/analyzer.js`
- [Shared UI Helpers](https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/common.js): `static/js/common.js`
- [Theme Controls](https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/theme.js): `static/js/theme.js`

### Password Analysis

- [Strength Engine](https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/analyzer.py): `core/analyzer.py`
- [Blocklist Check](https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/common.py): `core/common.py`
- [Word Data Loader](https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/wordlist.py): `core/wordlist.py`
- [Common Passwords](https://github.com/angeshpandian-afk/password-analyzer/blob/main/data/common_passwords.txt): `data/common_passwords.txt`
- [Dictionary Words](https://github.com/angeshpandian-afk/password-analyzer/blob/main/data/wordlist.txt): `data/wordlist.txt`

### User Features

- [Generator Page](https://github.com/angeshpandian-afk/password-analyzer/blob/main/templates/generator.html): `templates/generator.html`
- [Generator UI](https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/generator.js): `static/js/generator.js`
- [Secure Generator](https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/generator.py): `core/generator.py`
- [Report Builder](https://github.com/angeshpandian-afk/password-analyzer/blob/main/core/report.py): `core/report.py`
- [Awareness Page](https://github.com/angeshpandian-afk/password-analyzer/blob/main/templates/awareness.html): `templates/awareness.html`
- [Awareness UI](https://github.com/angeshpandian-afk/password-analyzer/blob/main/static/js/awareness.js): `static/js/awareness.js`
- [Tips and Quiz](https://github.com/angeshpandian-afk/password-analyzer/blob/main/data/awareness.json): `data/awareness.json`

### Offline Edition

- [Standalone HTML](https://github.com/angeshpandian-afk/password-analyzer/blob/main/standalone/PassGuard.html): `standalone/PassGuard.html`
- [Offline Logic](https://github.com/angeshpandian-afk/password-analyzer/blob/main/standalone/src/engine.js): `standalone/src/engine.js`
- [Offline UI](https://github.com/angeshpandian-afk/password-analyzer/blob/main/standalone/src/ui.js): `standalone/src/ui.js`

### Other components

- **User**
- **Browser**

## Connections

- User → Browser: uses (evidence: `README.md`)
- Browser → Analyzer Page: opens (evidence: `README.md`)
- Analyzer Page → Analyzer UI: loads script (evidence: `README.md`)
- Analyzer UI → Shared UI Helpers: calls API helper (evidence: `static/js/analyzer.js`)
- Shared UI Helpers → Routes and API: sends requests (evidence: `static/js/common.js`)
- Routes and API → Strength Engine: analyzes (evidence: `app.py`)
- Strength Engine → Blocklist Check: checks blocklist (evidence: `core/analyzer.py`)
- Strength Engine → Word Data Loader: matches words (evidence: `core/analyzer.py`)
- Blocklist Check → Word Data Loader: uses data path (evidence: `core/common.py`)
- Word Data Loader → Common Passwords: loads
- Word Data Loader → Dictionary Words: loads (evidence: `core/wordlist.py`)
- Strength Engine → Analyzer UI: returns results (evidence: `README.md`)
- Browser → Generator Page: opens (evidence: `README.md`)
- Generator Page → Generator UI: loads script (evidence: `README.md`)
- Generator UI → Shared UI Helpers: uses helpers (evidence: `README.md`)
- Routes and API → Secure Generator: generates passwords (evidence: `app.py`)
- Secure Generator → Word Data Loader: chooses passphrase words (evidence: `core/generator.py`)
- Generator UI → Routes and API: requests generation (evidence: `README.md`)
- Analyzer UI → Routes and API: requests reports (evidence: `static/js/analyzer.js`)
- Routes and API → Report Builder: builds report (evidence: `app.py`)
- Browser → Awareness Page: opens (evidence: `README.md`)
- Awareness Page → Awareness UI: loads script (evidence: `README.md`)
- Routes and API → Tips and Quiz: loads content (evidence: `app.py`)
- Awareness UI → Tips and Quiz: presents tips and quiz (evidence: `README.md`)
- Browser → Theme Controls: uses theme (evidence: `README.md`)
- User → Standalone HTML: opens locally (evidence: `README.md`)
- Standalone HTML → Offline UI: includes UI (evidence: `README.md`)
- Offline UI → Offline Logic: calls analysis and generation (evidence: `standalone/src/ui.js`)
- Offline Logic → Dictionary Words: uses embedded data (evidence: `standalone/src/engine.js`)
- Offline Logic → Common Passwords: uses embedded data (evidence: `README.md`)
