# diwakarreddyl/atm_simulation_terminal_based architecture

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

- Interactive diagram: https://gitdiagram.com/diwakarreddyl/atm_simulation_terminal_based
- Repository: https://github.com/diwakarreddyl/atm_simulation_terminal_based

## Overview

This is a small command-line ATM simulation. Users register or log in, then authenticated users can deposit, withdraw, view balances, change PINs, and log out. The single Python file contains the menu dispatcher, account operations, and a shared MySQL connection helper; account state is stored in the documented MySQL `accounts` table. The relationships shown are visible in the sampled script or README; the database is an external dependency.

Main entry points: [`Simple_ATM_System.py`](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py) (ATM menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["ATM workflow"]
  node_menu["ATM menu"]
end

subgraph group_accounts["Account operations"]
  node_register["Registration"]
  node_login["Login"]
  node_deposit["Deposit"]
  node_withdraw["Withdrawal"]
  node_balance["Balance inquiry"]
  node_pin["PIN change"]
end

subgraph group_data["Database access"]
  node_connection["DB connection"]
  node_mysql[("MySQL accounts")]
end

node_user(("ATM user"))

node_user -->|"uses"| node_menu
node_menu -->|"dispatches"| node_register
node_menu -->|"dispatches"| node_login
node_menu -->|"dispatches"| node_deposit
node_menu -->|"dispatches"| node_withdraw
node_menu -->|"dispatches"| node_balance
node_menu -->|"dispatches"| node_pin
node_register -->|"opens"| node_connection
node_login -->|"opens"| node_connection
node_deposit -->|"opens"| node_connection
node_withdraw -->|"opens"| node_connection
node_balance -->|"opens"| node_connection
node_pin -->|"opens"| node_connection
node_connection -->|"connects"| node_mysql
node_register -->|"reads/writes"| node_mysql
node_login -->|"authenticates"| node_mysql
node_deposit -->|"updates"| node_mysql
node_withdraw -->|"checks/updates"| node_mysql
node_balance -->|"reads"| node_mysql
node_pin -->|"checks/updates"| node_mysql

click node_menu "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py"
click node_register "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py"
click node_login "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py"
click node_deposit "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py"
click node_withdraw "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py"
click node_balance "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py"
click node_pin "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py"
click node_connection "https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.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_menu,node_user toneBlue
class node_register,node_login,node_deposit,node_withdraw,node_balance,node_pin toneAmber
class node_connection,node_mysql toneMint
```

## Components

### ATM workflow

- [ATM menu](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`

### Account operations

- [Registration](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`
- [Login](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`
- [Deposit](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`
- [Withdrawal](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`
- [Balance inquiry](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`
- [PIN change](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`

### Database access

- [DB connection](https://github.com/diwakarreddyl/atm_simulation_terminal_based/blob/main/Simple_ATM_System.py): `Simple_ATM_System.py`
- **MySQL accounts**

### Other components

- **ATM user**

## Connections

- ATM user → ATM menu: uses (evidence: `Simple_ATM_System.py`)
- ATM menu → Registration: dispatches (evidence: `Simple_ATM_System.py`)
- ATM menu → Login: dispatches (evidence: `Simple_ATM_System.py`)
- ATM menu → Deposit: dispatches (evidence: `Simple_ATM_System.py`)
- ATM menu → Withdrawal: dispatches (evidence: `Simple_ATM_System.py`)
- ATM menu → Balance inquiry: dispatches (evidence: `Simple_ATM_System.py`)
- ATM menu → PIN change: dispatches (evidence: `Simple_ATM_System.py`)
- Registration → DB connection: opens (evidence: `Simple_ATM_System.py`)
- Login → DB connection: opens (evidence: `Simple_ATM_System.py`)
- Deposit → DB connection: opens (evidence: `Simple_ATM_System.py`)
- Withdrawal → DB connection: opens (evidence: `Simple_ATM_System.py`)
- Balance inquiry → DB connection: opens (evidence: `Simple_ATM_System.py`)
- PIN change → DB connection: opens (evidence: `Simple_ATM_System.py`)
- DB connection → MySQL accounts: connects (evidence: `Simple_ATM_System.py`)
- Registration → MySQL accounts: reads/writes (evidence: `Simple_ATM_System.py`)
- Login → MySQL accounts: authenticates (evidence: `Simple_ATM_System.py`)
- Deposit → MySQL accounts: updates (evidence: `Simple_ATM_System.py`)
- Withdrawal → MySQL accounts: checks/updates (evidence: `Simple_ATM_System.py`)
- Balance inquiry → MySQL accounts: reads (evidence: `Simple_ATM_System.py`)
- PIN change → MySQL accounts: checks/updates (evidence: `Simple_ATM_System.py`)
