# jpearson135/eecs581p3 architecture

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

- Interactive diagram: https://gitdiagram.com/jpearson135/eecs581p3
- Repository: https://github.com/jpearson135/eecs581p3

## Overview

DigiWallet is a local desktop application combining a bank-card wallet, authenticator, password manager and password creator, with a master-password-protected vault and backup recovery. The user workflow is to launch, create or unlock the vault, then manage secrets through feature menus; data is encrypted before secure local storage. The graph includes the documented password feature despite limited source excerpts. Relationships are based on the README, shown declarations and calls, and SOURCE INDEX references; unsampled implementation details are not inferred.

Main entry points: [`Main.cpp`](https://github.com/jpearson135/eecs581p3/blob/main/Main.cpp) (Application startup), [`Keys.cpp`](https://github.com/jpearson135/eecs581p3/blob/main/Keys.cpp) (Key manager), [`Wallet.cpp`](https://github.com/jpearson135/eecs581p3/blob/main/Wallet.cpp) (Card wallet), [`Ui.cpp`](https://github.com/jpearson135/eecs581p3/blob/main/Ui.cpp) (FLTK interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_main["Application startup<br/>[Main.cpp]"]
end

subgraph group_features["Secret management"]
  node_wallet["Card wallet<br/>[Wallet.cpp]"]
  node_auth["Authenticator<br/>[Totp.cpp]"]
  node_passwords["Password manager<br/>[Passwords.cpp]"]
  node_password_creator["Password creator<br/>[Passwords.cpp]"]
end

subgraph group_security["Vault security"]
  node_vault["Vault lifecycle<br/>[Vault.cpp]"]
  node_crypto["Crypto service<br/>[Crypto.cpp]"]
  node_keys["Key manager<br/>[Keys.cpp]"]
end

subgraph group_persistence["Persistence and recovery"]
  node_storage[("Secure file store<br/>[Storage.cpp]")]
  node_backup["Backup service<br/>[Backup.cpp]"]
end

subgraph group_presentation["Desktop interface"]
  node_ui["FLTK interface<br/>[Ui.cpp]"]
  node_wallet_menu["Wallet menu<br/>[WalletMenu.cpp]"]
  node_auth_menu["Authenticator menu<br/>[AuthMenu.cpp]"]
  node_password_menu["Password menu<br/>[PasswordMenu.cpp]"]
end

node_user(("User"))

node_user -->|"launches"| node_main
node_main -->|"opens store"| node_storage
node_main -->|"creates manager"| node_keys
node_main -->|"creates wallet"| node_wallet
node_main -->|"creates manager"| node_passwords
node_main -->|"creates authenticator"| node_auth
node_main -->|"offers backup"| node_backup
node_main -->|"runs vault flow"| node_vault
node_main -->|"starts interface"| node_ui
node_main -->|"configures menu"| node_wallet_menu
node_main -->|"configures menu"| node_auth_menu
node_main -->|"configures menu"| node_password_menu
node_wallet_menu -->|"delegates actions"| node_wallet
node_auth_menu -->|"presents accounts"| node_auth
node_password_menu -->|"manages entries"| node_passwords
node_passwords -.->|"provides generation"| node_password_creator
node_wallet -->|"encrypts data"| node_keys
node_wallet -->|"reads and writes"| node_storage
node_auth -->|"encrypts data"| node_keys
node_keys -->|"derives and encrypts"| node_crypto
node_keys -->|"loads metadata"| node_storage
node_backup -->|"verifies bundle"| node_keys
node_backup -->|"backs up files"| node_storage
node_ui -->|"renders wallet"| node_wallet
node_ui -->|"renders codes"| node_auth
node_ui -->|"renders passwords"| node_passwords
node_user -->|"manages cards"| node_wallet_menu
node_user -->|"uses authenticator"| node_auth_menu
node_user -->|"manages passwords"| node_password_menu
node_user -->|"recovers vault"| node_backup

click node_main "https://github.com/jpearson135/eecs581p3/blob/main/Main.cpp"
click node_vault "https://github.com/jpearson135/eecs581p3/blob/main/Vault.cpp"
click node_wallet "https://github.com/jpearson135/eecs581p3/blob/main/Wallet.cpp"
click node_auth "https://github.com/jpearson135/eecs581p3/blob/main/Totp.cpp"
click node_passwords "https://github.com/jpearson135/eecs581p3/blob/main/Passwords.cpp"
click node_password_creator "https://github.com/jpearson135/eecs581p3/blob/main/Passwords.cpp"
click node_crypto "https://github.com/jpearson135/eecs581p3/blob/main/Crypto.cpp"
click node_keys "https://github.com/jpearson135/eecs581p3/blob/main/Keys.cpp"
click node_storage "https://github.com/jpearson135/eecs581p3/blob/main/Storage.cpp"
click node_backup "https://github.com/jpearson135/eecs581p3/blob/main/Backup.cpp"
click node_ui "https://github.com/jpearson135/eecs581p3/blob/main/Ui.cpp"
click node_wallet_menu "https://github.com/jpearson135/eecs581p3/blob/main/WalletMenu.cpp"
click node_auth_menu "https://github.com/jpearson135/eecs581p3/blob/main/AuthMenu.cpp"
click node_password_menu "https://github.com/jpearson135/eecs581p3/blob/main/PasswordMenu.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_main,node_user toneBlue
class node_wallet,node_auth,node_passwords,node_password_creator toneAmber
class node_vault,node_crypto,node_keys toneMint
class node_storage,node_backup toneRose
class node_ui,node_wallet_menu,node_auth_menu,node_password_menu toneIndigo
```

## Components

### Application flow

- [Application startup](https://github.com/jpearson135/eecs581p3/blob/main/Main.cpp): `Main.cpp`

### Secret management

- [Card wallet](https://github.com/jpearson135/eecs581p3/blob/main/Wallet.cpp): `Wallet.cpp`
- [Authenticator](https://github.com/jpearson135/eecs581p3/blob/main/Totp.cpp): `Totp.cpp`
- [Password manager](https://github.com/jpearson135/eecs581p3/blob/main/Passwords.cpp): `Passwords.cpp`
- [Password creator](https://github.com/jpearson135/eecs581p3/blob/main/Passwords.cpp): `Passwords.cpp`

### Vault security

- [Vault lifecycle](https://github.com/jpearson135/eecs581p3/blob/main/Vault.cpp): `Vault.cpp`
- [Crypto service](https://github.com/jpearson135/eecs581p3/blob/main/Crypto.cpp): `Crypto.cpp`
- [Key manager](https://github.com/jpearson135/eecs581p3/blob/main/Keys.cpp): `Keys.cpp`

### Persistence and recovery

- [Secure file store](https://github.com/jpearson135/eecs581p3/blob/main/Storage.cpp): `Storage.cpp`
- [Backup service](https://github.com/jpearson135/eecs581p3/blob/main/Backup.cpp): `Backup.cpp`

### Desktop interface

- [FLTK interface](https://github.com/jpearson135/eecs581p3/blob/main/Ui.cpp): `Ui.cpp`
- [Wallet menu](https://github.com/jpearson135/eecs581p3/blob/main/WalletMenu.cpp): `WalletMenu.cpp`
- [Authenticator menu](https://github.com/jpearson135/eecs581p3/blob/main/AuthMenu.cpp): `AuthMenu.cpp`
- [Password menu](https://github.com/jpearson135/eecs581p3/blob/main/PasswordMenu.cpp): `PasswordMenu.cpp`

### Other components

- **User**

## Connections

- User → Application startup: launches (evidence: `README.md`)
- Application startup → Secure file store: opens store (evidence: `Main.cpp`)
- Application startup → Key manager: creates manager (evidence: `Main.cpp`)
- Application startup → Card wallet: creates wallet (evidence: `Main.cpp`)
- Application startup → Password manager: creates manager (evidence: `Main.cpp`)
- Application startup → Authenticator: creates authenticator (evidence: `Main.cpp`)
- Application startup → Backup service: offers backup (evidence: `Main.cpp`)
- Application startup → Vault lifecycle: runs vault flow (evidence: `README.md`)
- Application startup → FLTK interface: starts interface (evidence: `Main.cpp`)
- Application startup → Wallet menu: configures menu (evidence: `Main.cpp`)
- Application startup → Authenticator menu: configures menu (evidence: `Main.cpp`)
- Application startup → Password menu: configures menu (evidence: `Main.cpp`)
- Wallet menu → Card wallet: delegates actions
- Authenticator menu → Authenticator: presents accounts
- Password menu → Password manager: manages entries (evidence: `README.md`)
- Password manager → Password creator: provides generation
- Card wallet → Key manager: encrypts data
- Card wallet → Secure file store: reads and writes
- Authenticator → Key manager: encrypts data (evidence: `Totp.cpp`)
- Key manager → Crypto service: derives and encrypts
- Key manager → Secure file store: loads metadata
- Backup service → Key manager: verifies bundle
- Backup service → Secure file store: backs up files
- FLTK interface → Card wallet: renders wallet (evidence: `Ui.cpp`)
- FLTK interface → Authenticator: renders codes (evidence: `Ui.cpp`)
- FLTK interface → Password manager: renders passwords (evidence: `Ui.cpp`)
- User → Wallet menu: manages cards (evidence: `README.md`)
- User → Authenticator menu: uses authenticator (evidence: `README.md`)
- User → Password menu: manages passwords (evidence: `README.md`)
- User → Backup service: recovers vault (evidence: `README.md`)
