# avilashchak/passwordgenerator architecture

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

- Interactive diagram: https://gitdiagram.com/avilashchak/passwordgenerator
- Repository: https://github.com/avilashchak/passwordgenerator

## Overview

##### Project type and purpose
- This is a single-page, front-end only application (no server-side code or databases) built with React.js, styled with Tailwind CSS, and bundled via Vite.
- Its sole purpose is to let users configure and generate secure passwords and copy them to the clipboard.

##### File structure
- Top-level:
- index.html – host page where the React app mounts
- public/ – static assets (favicon, manifest, images)
- src/ – React app source code
– main.jsx – entry point, renders <App/> into the DOM
– App.jsx – main component housing password logic and UI
– App.css, index.css – global & component styles
- Vite config (vite.config.js) defines dev server and build rules.
- No backend or API folders—this is purely client-side.

##### README for additional insights
- Core features: slider for length, toggles for numbers/special chars, “Copy to Clipboard” button.
- Tech stack: React hooks (useState/useEffect/useCallback/useRef), Tailwind CSS, Clipboard API.
- Deployed as a static site (e.g., Vercel).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build & Deploy Layer
    subgraph "Build & Deploy"
        direction TB
        VITE["Vite Dev Server & Build Config"]:::build
        SRC_MAIN["src/main.jsx"]:::build
        CSS_GLOBAL["src/index.css"]:::build
        CSS_APP["src/App.css"]:::build
        ASSETS_SRC["src/assets/"]:::build
        PUBLIC["public/"]:::build
        BUNDLE["Bundled JS & CSS"]:::build
        HOST["Static Host (e.g., Vercel/CDN)"]:::build

        SRC_MAIN -->|"included in"| VITE
        CSS_GLOBAL -->|"included in"| VITE
        CSS_APP -->|"included in"| VITE
        ASSETS_SRC -->|"included in"| VITE
        PUBLIC -->|"served as static assets by"| HOST
        VITE -->|"bundles src & CSS & assets"| BUNDLE
        BUNDLE -->|"deployed to"| HOST
    end

    %% Runtime & Browser Layer
    subgraph "Browser & Runtime"
        direction TB
        BROWSER["User's Browser"]:::runtime
        INDEX_HTML["index.html"]:::runtime
        REACT_APP["React Application"]:::runtime
        APP["App.jsx"]:::runtime
        SLIDER["SliderControl"]:::runtime
        OPTIONS["OptionsPanel"]:::runtime
        DISPLAY["PasswordDisplay"]:::runtime
        COPY_BTN["CopyButton"]:::runtime
        CLIPBOARD["Clipboard API"]:::api

        HOST -->|"serves index.html & bundle"| INDEX_HTML
        BROWSER -->|"loads"| INDEX_HTML
        INDEX_HTML -->|"executes bundle"| REACT_APP
        REACT_APP -->|"renders"| APP
        APP -->|"contains"| SLIDER
        APP -->|"contains"| OPTIONS
        APP -->|"contains"| DISPLAY
        APP -->|"contains"| COPY_BTN
        SLIDER -->|"onChange event"| APP
        OPTIONS -->|"onToggle event"| APP
        APP -->|"state update & generate()"| DISPLAY
        COPY_BTN -->|"onClick copy()"| CLIPBOARD
        CLIPBOARD -->|"copies text"| BROWSER
    end

    %% Click Events
    click VITE "https://github.com/avilashchak/passwordgenerator/blob/main/vite.config.js"
    click INDEX_HTML "https://github.com/avilashchak/passwordgenerator/blob/main/index.html"
    click PUBLIC "https://github.com/avilashchak/passwordgenerator/tree/main/public/"
    click SRC_MAIN "https://github.com/avilashchak/passwordgenerator/blob/main/src/main.jsx"
    click APP "https://github.com/avilashchak/passwordgenerator/blob/main/src/App.jsx"
    click CSS_GLOBAL "https://github.com/avilashchak/passwordgenerator/blob/main/src/index.css"
    click CSS_APP "https://github.com/avilashchak/passwordgenerator/blob/main/src/App.css"
    click ASSETS_SRC "https://github.com/avilashchak/passwordgenerator/tree/main/src/assets/"

    %% Styles
    classDef build fill:#d4f8d4,stroke:#2f7d32,color:#2f7d32
    classDef runtime fill:#d4e5ff,stroke:#3366cc,color:#3366cc
    classDef api fill:#fff4cc,stroke:#b38900,color:#b38900
```
