# gowtham8714/custom-password-generator architecture

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

- Interactive diagram: https://gitdiagram.com/gowtham8714/custom-password-generator
- Repository: https://github.com/gowtham8714/custom-password-generator

## Overview

This Chrome extension turns saved personal details into memorable password options, then injects a selected option into the active page and saves the domain, detected username, and password to a local vault. Its popup also restores generator settings and provides vault browsing and clearing. The runtime is concentrated in popup.js; README statements document the product workflow, while the sampled source shows its implementation. The tree and excerpts do not expose manifest permissions or additional content scripts.

Main entry points: [`popup.js`](https://github.com/gowtham8714/custom-password-generator/blob/main/popup.js) (Popup controller), [`popup.html`](https://github.com/gowtham8714/custom-password-generator/blob/main/popup.html) (Popup interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_popup["Popup experience"]
  node_popup_ui["Popup interface<br/>[popup.html]"]
  node_popup_logic["Popup controller<br/>[popup.js]"]
end

subgraph group_passwords["Password workflow"]
  node_generator["Password generator<br/>[popup.js]"]
end

subgraph group_vault["Local vault"]
  node_vault_logic["Vault operations<br/>[popup.js]"]
  node_local_storage[("Chrome local storage")]
end

node_user(("Extension user"))
node_active_page["Active webpage"]
node_chrome_tabs["Chrome tabs API"]
node_chrome_scripting["Chrome scripting API"]

node_user -->|"uses"| node_popup_ui
node_popup_logic -->|"updates"| node_popup_ui
node_popup_logic -->|"loads settings"| node_local_storage
node_popup_logic -->|"saves settings"| node_local_storage
node_popup_logic -->|"generates options"| node_generator
node_popup_logic -->|"routes vault actions"| node_vault_logic
node_vault_logic -->|"reads and writes"| node_local_storage
node_vault_logic -->|"renders entries"| node_popup_ui
node_popup_logic -->|"queries active tab"| node_chrome_tabs
node_popup_logic -->|"executes page script"| node_chrome_scripting
node_chrome_scripting -->|"fills password"| node_active_page
node_active_page -->|"returns username"| node_chrome_scripting
node_popup_logic -->|"saves selected credential"| node_vault_logic

click node_popup_ui "https://github.com/gowtham8714/custom-password-generator/blob/main/popup.html"
click node_popup_logic "https://github.com/gowtham8714/custom-password-generator/blob/main/popup.js"
click node_generator "https://github.com/gowtham8714/custom-password-generator/blob/main/popup.js"
click node_vault_logic "https://github.com/gowtham8714/custom-password-generator/blob/main/popup.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_popup_ui,node_popup_logic,node_user toneBlue
class node_generator toneAmber
class node_vault_logic,node_local_storage,node_chrome_tabs,node_chrome_scripting toneMint
class node_active_page toneIndigo
```

## Components

### Popup experience

- [Popup interface](https://github.com/gowtham8714/custom-password-generator/blob/main/popup.html): `popup.html`
- [Popup controller](https://github.com/gowtham8714/custom-password-generator/blob/main/popup.js): `popup.js`

### Password workflow

- [Password generator](https://github.com/gowtham8714/custom-password-generator/blob/main/popup.js): `popup.js`

### Local vault

- [Vault operations](https://github.com/gowtham8714/custom-password-generator/blob/main/popup.js): `popup.js`
- **Chrome local storage**

### Other components

- **Extension user**
- **Active webpage**
- **Chrome tabs API**
- **Chrome scripting API**

## Connections

- Extension user → Popup interface: uses (evidence: `README.md`)
- Popup controller → Popup interface: updates (evidence: `popup.js`)
- Popup controller → Chrome local storage: loads settings (evidence: `popup.js`)
- Popup controller → Chrome local storage: saves settings (evidence: `popup.js`)
- Popup controller → Password generator: generates options (evidence: `popup.js`)
- Popup controller → Vault operations: routes vault actions (evidence: `popup.js`)
- Vault operations → Chrome local storage: reads and writes (evidence: `popup.js`)
- Vault operations → Popup interface: renders entries (evidence: `popup.js`)
- Popup controller → Chrome tabs API: queries active tab (evidence: `popup.js`)
- Popup controller → Chrome scripting API: executes page script (evidence: `popup.js`)
- Chrome scripting API → Active webpage: fills password
- Active webpage → Chrome scripting API: returns username
- Popup controller → Vault operations: saves selected credential (evidence: `popup.js`)
