# rahidmondal/pgm architecture

> Architecture diagram of the GitHub repository rahidmondal/pgm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rahidmondal/pgm
- Repository: https://github.com/rahidmondal/pgm

## Overview

##### Main Components
- User Interface (UI) Layer: This includes the HTML pages (pg.html, psc.html, pv.html, and index.html), which form the user-facing side of the app.
- Client-Side Functionality: JavaScript files (pg.js, psc.js, and zxcvbn.js) implement the core functions such as password generation and strength checking. Notice that zxcvbn.js is an external library used for evaluating password strength.
- Styling and Resources: CSS files (index.css, pg.css, psc.css) along with static assets (e.g., favicon) contribute to the UI’s look and feel.
- Deployment Pipeline: Configuration files in the .github directory (specifically the jekyll-gh-pages.yml GitHub Actions workflow) indicate that deployment is automated to GitHub Pages.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User initiating the application
    User["User"]:::ui

    %% Frontend Client Application Subgraph
    subgraph "Frontend Client Application"
        %% UI Pages subgraph
        subgraph "UI Pages"
            IndexPage["Landing Page (index.html)"]:::ui
            PG_Page["Password Generator Page (pg.html)"]:::ui
            PSC_Page["Password Strength Checker Page (psc.html)"]:::ui
            PV_Page["Additional Page (pv.html)"]:::ui
        end

        %% Client-Side Scripts subgraph
        subgraph "Client-Side Scripts"
            PG_Script["Password Generation Script (pg.js)"]:::script
            PSC_Script["Password Strength Checker Script (psc.js)"]:::script
            ZXCVBN_Lib["Password Analysis Library (zxcvbn.js)"]:::script
        end

        %% Styling & Resources subgraph
        subgraph "Styling & Resources"
            IndexCSS["index.css"]:::asset
            PG_CSS["pg.css"]:::asset
            PSC_CSS["psc.css"]:::asset
            Favicon["favicon"]:::asset
        end
    end

    %% Deployment & Hosting Subgraph
    subgraph "Deployment & Hosting"
        CICD["CI/CD Pipeline (GitHub Actions)"]:::deploy
        Hosting["GitHub Pages (Hosting)"]:::deploy
    end

    %% Relationships in Frontend
    User -->|"accesses"| IndexPage
    PG_Page -->|"triggers"| PG_Script
    PSC_Page -->|"triggers"| PSC_Script
    PSC_Script -->|"uses"| ZXCVBN_Lib

    %% Styling applies to UI Pages (dotted connection)
    IndexCSS ---|"styles"| IndexPage
    PG_CSS ---|"styles"| PG_Page
    PSC_CSS ---|"styles"| PSC_Page
    Favicon ---|"is used by"| IndexPage

    %% Deployment Flow
    CICD -->|"deploys-to"| Hosting

    %% Classes for color coding
    classDef ui fill:#AED6F1,stroke:#000,stroke-width:1px;
    classDef script fill:#F9E79F,stroke:#000,stroke-width:1px;
    classDef asset fill:#D5F5E3,stroke:#000,stroke-width:1px;
    classDef deploy fill:#F5B7B1,stroke:#000,stroke-width:1px;

    %% Click Events for UI Pages
    click IndexPage "https://github.com/rahidmondal/pgm/blob/master/src/index.html"
    click PG_Page "https://github.com/rahidmondal/pgm/blob/master/src/Pages/pg.html"
    click PSC_Page "https://github.com/rahidmondal/pgm/blob/master/src/Pages/psc.html"
    click PV_Page "https://github.com/rahidmondal/pgm/blob/master/src/Pages/pv.html"

    %% Click Events for Client-Side Scripts
    click PG_Script "https://github.com/rahidmondal/pgm/blob/master/src/scripts/pg.js"
    click PSC_Script "https://github.com/rahidmondal/pgm/blob/master/src/scripts/psc.js"
    click ZXCVBN_Lib "https://github.com/rahidmondal/pgm/blob/master/src/scripts/zxcvbn.js"

    %% Click Events for Styling & Resources
    click IndexCSS "https://github.com/rahidmondal/pgm/blob/master/src/styles/index.css"
    click PG_CSS "https://github.com/rahidmondal/pgm/blob/master/src/styles/pg.css"
    click PSC_CSS "https://github.com/rahidmondal/pgm/blob/master/src/styles/psc.css"
    click Favicon "https://github.com/rahidmondal/pgm/tree/master/src/Resources/favicon"

    %% Click Event for Deployment Pipeline
    click CICD "https://github.com/rahidmondal/pgm/blob/master/.github/workflows/jekyll-gh-pages.yml"
```
