# trishdestiny/ldcw6123-tng-project architecture

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

- Interactive diagram: https://gitdiagram.com/trishdestiny/ldcw6123-tng-project
- Repository: https://github.com/trishdestiny/ldcw6123-tng-project

## Overview

This is a single-file C++ console simulator for a Touch ’n Go transit and financial ecosystem. The user selects transit payments, NFC card reloads, GO+ yield projections, or transaction history from a menu. Payment and reload operations update an in-memory account and record successful transactions; history displays those records. The graph reflects only relationships visible in the supplied excerpts; other implementation details are not inferred.

Main entry points: [`main.cpp`](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp) (Menu dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Console interaction"]
  node_menu["Menu dispatcher<br/>[main.cpp]"]
  node_dashboard["Account dashboard<br/>[main.cpp]"]
  node_input["Input validation<br/>[main.cpp]"]
end

subgraph group_operations["Account operations"]
  node_account["Account balances<br/>[main.cpp]"]
  node_transit["Transit payment<br/>[main.cpp]"]
  node_reload["NFC card reload<br/>[main.cpp]"]
  node_yield["GO+ yield projection<br/>[main.cpp]"]
end

subgraph group_records["Transaction records"]
  node_ledger[("Transaction history<br/>[main.cpp]")]
  node_receipt["Receipt output<br/>[main.cpp]"]
end

node_user(("Console user"))

node_user -->|"chooses option"| node_menu
node_menu -->|"calls"| node_dashboard
node_menu -->|"validates choice"| node_input
node_menu -->|"dispatches"| node_transit
node_menu -->|"dispatches"| node_reload
node_menu -->|"dispatches"| node_yield
node_menu -->|"displays history"| node_ledger
node_transit -->|"validates selections"| node_input
node_reload -->|"validates selections"| node_input
node_yield -->|"validates selections"| node_input
node_transit -->|"updates balances"| node_account
node_reload -->|"updates balances"| node_account
node_yield -->|"reads principal"| node_account
node_transit -->|"records payment"| node_ledger
node_reload -->|"records reload"| node_ledger
node_transit -->|"prints receipt"| node_receipt
node_reload -->|"prints receipt"| node_receipt

click node_menu "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_dashboard "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_input "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_account "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_transit "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_reload "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_yield "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_ledger "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"
click node_receipt "https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp"

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_dashboard,node_input,node_user toneBlue
class node_account,node_transit,node_reload,node_yield toneAmber
class node_ledger,node_receipt toneMint
```

## Components

### Console interaction

- [Menu dispatcher](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`
- [Account dashboard](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`
- [Input validation](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`

### Account operations

- [Account balances](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`
- [Transit payment](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`
- [NFC card reload](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`
- [GO+ yield projection](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`

### Transaction records

- [Transaction history](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`
- [Receipt output](https://github.com/trishdestiny/ldcw6123-tng-project/blob/main/main.cpp): `main.cpp`

### Other components

- **Console user**

## Connections

- Console user → Menu dispatcher: chooses option (evidence: `main.cpp`)
- Menu dispatcher → Account dashboard: calls (evidence: `main.cpp`)
- Menu dispatcher → Input validation: validates choice (evidence: `main.cpp`)
- Menu dispatcher → Transit payment: dispatches (evidence: `main.cpp`)
- Menu dispatcher → NFC card reload: dispatches (evidence: `main.cpp`)
- Menu dispatcher → GO+ yield projection: dispatches (evidence: `main.cpp`)
- Menu dispatcher → Transaction history: displays history (evidence: `main.cpp`)
- Transit payment → Input validation: validates selections (evidence: `main.cpp`)
- NFC card reload → Input validation: validates selections (evidence: `main.cpp`)
- GO+ yield projection → Input validation: validates selections (evidence: `main.cpp`)
- Transit payment → Account balances: updates balances (evidence: `main.cpp`)
- NFC card reload → Account balances: updates balances (evidence: `main.cpp`)
- GO+ yield projection → Account balances: reads principal (evidence: `main.cpp`)
- Transit payment → Transaction history: records payment (evidence: `main.cpp`)
- NFC card reload → Transaction history: records reload (evidence: `main.cpp`)
- Transit payment → Receipt output: prints receipt (evidence: `main.cpp`)
- NFC card reload → Receipt output: prints receipt (evidence: `main.cpp`)
