# mathiasclb/generateur-mdp architecture

> Architecture diagram of the GitHub repository mathiasclb/generateur-mdp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mathiasclb/generateur-mdp
- Repository: https://github.com/mathiasclb/generateur-mdp

## Overview

A small, single-file Tkinter password generator. The main workflow starts in the GUI, generates or transforms a password, then displays it and estimates its strength. The README also documents in-session history, clipboard copying, and reformulation. The source excerpt is partial, so links for unsampled display and history behavior follow the README’s description rather than inspected implementation details.

Main entry points: [`generateur_mdp.py`](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py) (Dictionary handler), [`liste_francais.txt`](https://github.com/mathiasclb/generateur-mdp/blob/main/liste_francais.txt) (French word list), [`liste_anglais.txt`](https://github.com/mathiasclb/generateur-mdp/blob/main/liste_anglais.txt) (English word list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Tkinter interface"]
  node_gui["Mode controls<br/>[generateur_mdp.py]"]
  node_random_handler["Random handler<br/>[generateur_mdp.py]"]
  node_dictionary_handler["Dictionary handler<br/>[generateur_mdp.py]"]
  node_copy_reformulate["Copy and reformulate<br/>[generateur_mdp.py]"]
end

subgraph group_creation["Password creation"]
  node_random_generator["Random generation<br/>[generateur_mdp.py]"]
  node_word_loader["Word-list loading<br/>[generateur_mdp.py]"]
  node_word_choice["Length filtering<br/>[generateur_mdp.py]"]
  node_substitution["Character substitution<br/>[generateur_mdp.py]"]
  node_fr_words["French word list<br/>[liste_francais.txt]"]
  node_en_words["English word list<br/>[liste_anglais.txt]"]
end

subgraph group_assessment["Strength and results"]
  node_strength["Strength analysis<br/>[generateur_mdp.py]"]
  node_weakness["Pattern penalties<br/>[generateur_mdp.py]"]
  node_result["Password and score<br/>[generateur_mdp.py]"]
  node_history["Session history<br/>[generateur_mdp.py]"]
end

node_user(("User"))
node_random_module["Python random"]
node_clipboard["System clipboard"]

node_user -->|"uses"| node_gui
node_gui -->|"dispatches"| node_random_handler
node_gui -->|"dispatches"| node_dictionary_handler
node_random_handler -->|"generates"| node_random_generator
node_random_generator -->|"uses"| node_random_module
node_dictionary_handler -->|"loads"| node_word_loader
node_word_loader -->|"reads"| node_fr_words
node_word_loader -->|"reads"| node_en_words
node_dictionary_handler -->|"selects"| node_word_choice
node_word_choice -->|"passes word"| node_substitution
node_dictionary_handler -->|"transforms entry"| node_substitution
node_substitution -->|"uses"| node_random_module
node_random_handler -->|"displays password"| node_result
node_dictionary_handler -->|"displays password"| node_result
node_result -->|"scores"| node_strength
node_strength -->|"applies penalties"| node_weakness
node_result -->|"records"| node_history
node_copy_reformulate -->|"copies"| node_clipboard
node_copy_reformulate -->|"reformulates"| node_substitution
node_copy_reformulate -->|"reads selection"| node_history
node_gui -->|"dispatches"| node_copy_reformulate

click node_gui "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_random_handler "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_dictionary_handler "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_copy_reformulate "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_random_generator "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_word_loader "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_word_choice "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_substitution "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_fr_words "https://github.com/mathiasclb/generateur-mdp/blob/main/liste_francais.txt"
click node_en_words "https://github.com/mathiasclb/generateur-mdp/blob/main/liste_anglais.txt"
click node_strength "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_weakness "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_result "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py"
click node_history "https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.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_gui,node_random_handler,node_dictionary_handler,node_copy_reformulate,node_user toneBlue
class node_random_generator,node_word_loader,node_word_choice,node_substitution,node_fr_words,node_en_words toneAmber
class node_strength,node_weakness,node_result,node_history toneMint
class node_random_module,node_clipboard toneIndigo
```

## Components

### Tkinter interface

- [Mode controls](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Random handler](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Dictionary handler](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Copy and reformulate](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`

### Password creation

- [Random generation](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Word-list loading](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Length filtering](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Character substitution](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [French word list](https://github.com/mathiasclb/generateur-mdp/blob/main/liste_francais.txt): `liste_francais.txt`
- [English word list](https://github.com/mathiasclb/generateur-mdp/blob/main/liste_anglais.txt): `liste_anglais.txt`

### Strength and results

- [Strength analysis](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Pattern penalties](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Password and score](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`
- [Session history](https://github.com/mathiasclb/generateur-mdp/blob/main/generateur_mdp.py): `generateur_mdp.py`

### Other components

- **User**
- **Python random**
- **System clipboard**

## Connections

- User → Mode controls: uses
- Mode controls → Random handler: dispatches
- Mode controls → Dictionary handler: dispatches
- Random handler → Random generation: generates
- Random generation → Python random: uses
- Dictionary handler → Word-list loading: loads
- Word-list loading → French word list: reads
- Word-list loading → English word list: reads
- Dictionary handler → Length filtering: selects
- Length filtering → Character substitution: passes word
- Dictionary handler → Character substitution: transforms entry
- Character substitution → Python random: uses
- Random handler → Password and score: displays password
- Dictionary handler → Password and score: displays password
- Password and score → Strength analysis: scores
- Strength analysis → Pattern penalties: applies penalties
- Password and score → Session history: records
- Copy and reformulate → System clipboard: copies
- Copy and reformulate → Character substitution: reformulates
- Copy and reformulate → Session history: reads selection
- Mode controls → Copy and reformulate: dispatches
