# mauryaayush566/random-password-generator architecture

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

- Interactive diagram: https://gitdiagram.com/mauryaayush566/random-password-generator
- Repository: https://github.com/mauryaayush566/random-password-generator

## Overview

A small terminal password generator: the user supplies a minimum length and at least two character categories, then receives a generated password and may repeat. The workflow is implemented inline in main.py; its prompts, validation, character selection, and generation stages are not separate modules.

Main entry points: [`main.py`](https://github.com/mauryaayush566/random-password-generator/blob/main/main.py) (Prompt loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_cli["Prompt loop<br/>[main.py]"]
node_length["Length validation<br/>[main.py]"]
node_categories["Category selection<br/>[main.py]"]
node_generate["Password generation<br/>[main.py]"]
node_result["Password output<br/>[main.py]"]

node_user -->|"starts interaction"| node_cli
node_cli -->|"requests length"| node_length
node_user -->|"enters length"| node_length
node_length -->|"accepts valid length"| node_categories
node_cli -->|"requests categories"| node_categories
node_user -->|"chooses categories"| node_categories
node_categories -->|"supplies character pool"| node_generate
node_length -->|"sets output length"| node_generate
node_generate -->|"produces password"| node_result
node_result -->|"prints password"| node_user
node_user -->|"chooses repetition"| node_cli

click node_cli "https://github.com/mauryaayush566/random-password-generator/blob/main/main.py"
click node_length "https://github.com/mauryaayush566/random-password-generator/blob/main/main.py"
click node_categories "https://github.com/mauryaayush566/random-password-generator/blob/main/main.py"
click node_generate "https://github.com/mauryaayush566/random-password-generator/blob/main/main.py"
click node_result "https://github.com/mauryaayush566/random-password-generator/blob/main/main.py"

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_user toneBlue
class node_cli,node_length,node_categories,node_generate,node_result toneTeal
```

## Components

### Other components

- **User**
- [Prompt loop](https://github.com/mauryaayush566/random-password-generator/blob/main/main.py): `main.py`
- [Length validation](https://github.com/mauryaayush566/random-password-generator/blob/main/main.py): `main.py`
- [Category selection](https://github.com/mauryaayush566/random-password-generator/blob/main/main.py): `main.py`
- [Password generation](https://github.com/mauryaayush566/random-password-generator/blob/main/main.py): `main.py`
- [Password output](https://github.com/mauryaayush566/random-password-generator/blob/main/main.py): `main.py`

## Connections

- User → Prompt loop: starts interaction (evidence: `main.py`)
- Prompt loop → Length validation: requests length (evidence: `main.py`)
- User → Length validation: enters length (evidence: `main.py`)
- Length validation → Category selection: accepts valid length (evidence: `main.py`)
- Prompt loop → Category selection: requests categories (evidence: `main.py`)
- User → Category selection: chooses categories (evidence: `main.py`)
- Category selection → Password generation: supplies character pool (evidence: `main.py`)
- Length validation → Password generation: sets output length (evidence: `main.py`)
- Password generation → Password output: produces password (evidence: `main.py`)
- Password output → User: prints password (evidence: `main.py`)
- User → Prompt loop: chooses repetition (evidence: `main.py`)
