# b-user208/passwordgen architecture

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

- Interactive diagram: https://gitdiagram.com/b-user208/passwordgen
- Repository: https://github.com/b-user208/passwordgen

## Overview

PasswordGen is an interactive C command-line password generator. The user supplies a length and character categories; the entry point calls the generator, evaluates the returned password’s strength, and prints the password and score level. Generation includes category selection and Fisher–Yates shuffling; scoring covers character diversity, length, consecutive repeats, and character frequency. The sampled source shows these runtime relationships directly; the README documents the supported length range and capabilities.

Main entry points: [`main.c`](https://github.com/b-user208/passwordgen/blob/master/main.c) (Prompt and report), [`generator.c`](https://github.com/b-user208/passwordgen/blob/master/generator.c) (Password generation), [`strength.c`](https://github.com/b-user208/passwordgen/blob/master/strength.c) (Strength scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["CLI workflow"]
  node_main["Prompt and report<br/>[main.c]"]
end

subgraph group_logic["Password logic"]
  node_generator["Password generation<br/>[generator.c]"]
  node_strength["Strength scoring<br/>[strength.c]"]
end

node_user(("User"))

node_user -->|"enters options"| node_main
node_main -->|"calls"| node_generator
node_generator -->|"returns password"| node_main
node_main -->|"scores password"| node_strength
node_strength -->|"returns score"| node_main

click node_main "https://github.com/b-user208/passwordgen/blob/master/main.c"
click node_generator "https://github.com/b-user208/passwordgen/blob/master/generator.c"
click node_strength "https://github.com/b-user208/passwordgen/blob/master/strength.c"

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_main,node_user toneBlue
class node_generator,node_strength toneAmber
```

## Components

### CLI workflow

- [Prompt and report](https://github.com/b-user208/passwordgen/blob/master/main.c): `main.c`

### Password logic

- [Password generation](https://github.com/b-user208/passwordgen/blob/master/generator.c): `generator.c`
- [Strength scoring](https://github.com/b-user208/passwordgen/blob/master/strength.c): `strength.c`

### Other components

- **User**

## Connections

- User → Prompt and report: enters options (evidence: `main.c`)
- Prompt and report → Password generation: calls (evidence: `main.c`)
- Password generation → Prompt and report: returns password (evidence: `main.c`)
- Prompt and report → Strength scoring: scores password (evidence: `main.c`)
- Strength scoring → Prompt and report: returns score (evidence: `main.c`)
