# notdeathcookie/securevault architecture

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

- Interactive diagram: https://gitdiagram.com/notdeathcookie/securevault
- Repository: https://github.com/notdeathcookie/securevault

## Overview

Secure Vault is a desktop GUI for encrypting and decrypting text, files, and folders, plus hashing files and securely shredding paths. The user configures an operation in the dashboard; long-running work is performed in the vault layer and reports progress and results back to the UI. Crypto primitives are abstracted behind a platform-specific interface. The README documents the major capabilities and backend choices; some UI and vault implementation details were not excerpted, so those links rely on documented relationships.

Main entry points: [`src/main.cpp`](https://github.com/notdeathcookie/securevault/blob/main/src/main.cpp) (Dashboard UI), [`src/vault_crypto.hpp`](https://github.com/notdeathcookie/securevault/blob/main/src/vault_crypto.hpp) (Crypto Interface), [`src/vault.cpp`](https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp) (File Encryption), [`src/theme.hpp`](https://github.com/notdeathcookie/securevault/blob/main/src/theme.hpp) (Visual Theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_gui["Dashboard UI<br/>[main.cpp]"]
  node_theme["Visual Theme<br/>[theme.hpp]"]
end

subgraph group_vault_ops["Vault Operations"]
  node_text["Text Encryption<br/>[vault.cpp]"]
  node_file_crypto["File Encryption<br/>[vault.cpp]"]
  node_folder_crypto["Folder Encryption<br/>[vault.cpp]"]
  node_hashing["File Hashing<br/>[vault.cpp]"]
  node_shredding["Secure Shredding<br/>[vault.cpp]"]
  node_job["Job Progress<br/>[vault.hpp]"]
end

subgraph group_crypto["Crypto Backends"]
  node_crypto_api["Crypto Interface<br/>[vault_crypto.hpp]"]
  node_openssl["OpenSSL Backend"]
  node_cng["Windows CNG Backend"]
end

subgraph group_files["File Handling"]
  node_filesystem[("Local Files")]
  node_folder_container["Folder Container<br/>[vault.cpp]"]
end

node_user(("User"))

node_user -->|"configures"| node_gui
node_gui -->|"draws with"| node_theme
node_gui -.->|"starts"| node_text
node_gui -.->|"starts"| node_file_crypto
node_gui -->|"starts"| node_folder_crypto
node_gui -.->|"starts"| node_hashing
node_gui -.->|"starts"| node_shredding
node_gui -->|"polls"| node_job
node_text -->|"uses"| node_crypto_api
node_file_crypto -->|"uses"| node_crypto_api
node_hashing -->|"uses"| node_crypto_api
node_crypto_api -->|"implemented by"| node_openssl
node_crypto_api -->|"implemented by"| node_cng
node_file_crypto -->|"reads and writes"| node_filesystem
node_folder_crypto -->|"archives through"| node_folder_container
node_folder_crypto -->|"encrypts via"| node_file_crypto
node_hashing -->|"reads"| node_filesystem
node_shredding -->|"overwrites and deletes"| node_filesystem

click node_gui "https://github.com/notdeathcookie/securevault/blob/main/src/main.cpp"
click node_theme "https://github.com/notdeathcookie/securevault/blob/main/src/theme.hpp"
click node_text "https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp"
click node_file_crypto "https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp"
click node_folder_crypto "https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp"
click node_hashing "https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp"
click node_shredding "https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp"
click node_job "https://github.com/notdeathcookie/securevault/blob/main/src/vault.hpp"
click node_crypto_api "https://github.com/notdeathcookie/securevault/blob/main/src/vault_crypto.hpp"
click node_openssl "https://github.com/notdeathcookie/securevault/blob/main/src/vault_crypto_openssl.cpp"
click node_cng "https://github.com/notdeathcookie/securevault/blob/main/src/vault_crypto_win.cpp"
click node_folder_container "https://github.com/notdeathcookie/securevault/blob/main/src/vault.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_gui,node_theme,node_user toneBlue
class node_text,node_file_crypto,node_folder_crypto,node_hashing,node_shredding,node_job toneAmber
class node_crypto_api,node_openssl,node_cng toneMint
class node_filesystem,node_folder_container toneRose
```

## Components

### Dashboard

- [Dashboard UI](https://github.com/notdeathcookie/securevault/blob/main/src/main.cpp): `src/main.cpp`
- [Visual Theme](https://github.com/notdeathcookie/securevault/blob/main/src/theme.hpp): `src/theme.hpp`

### Vault Operations

- [Text Encryption](https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp): `src/vault.cpp`
- [File Encryption](https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp): `src/vault.cpp`
- [Folder Encryption](https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp): `src/vault.cpp`
- [File Hashing](https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp): `src/vault.cpp`
- [Secure Shredding](https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp): `src/vault.cpp`
- [Job Progress](https://github.com/notdeathcookie/securevault/blob/main/src/vault.hpp): `src/vault.hpp`

### Crypto Backends

- [Crypto Interface](https://github.com/notdeathcookie/securevault/blob/main/src/vault_crypto.hpp): `src/vault_crypto.hpp`
- [OpenSSL Backend](https://github.com/notdeathcookie/securevault/blob/main/src/vault_crypto_openssl.cpp): `src/vault_crypto_openssl.cpp`
- [Windows CNG Backend](https://github.com/notdeathcookie/securevault/blob/main/src/vault_crypto_win.cpp): `src/vault_crypto_win.cpp`

### File Handling

- **Local Files**
- [Folder Container](https://github.com/notdeathcookie/securevault/blob/main/src/vault.cpp): `src/vault.cpp`

### Other components

- **User**

## Connections

- User → Dashboard UI: configures (evidence: `README.md`)
- Dashboard UI → Visual Theme: draws with (evidence: `src/main.cpp`)
- Dashboard UI → Text Encryption: starts
- Dashboard UI → File Encryption: starts
- Dashboard UI → Folder Encryption: starts (evidence: `src/main.cpp`)
- Dashboard UI → File Hashing: starts
- Dashboard UI → Secure Shredding: starts
- Dashboard UI → Job Progress: polls (evidence: `src/main.cpp`)
- Text Encryption → Crypto Interface: uses
- File Encryption → Crypto Interface: uses
- File Hashing → Crypto Interface: uses
- Crypto Interface → OpenSSL Backend: implemented by (evidence: `src/vault_crypto.hpp`)
- Crypto Interface → Windows CNG Backend: implemented by (evidence: `src/vault_crypto.hpp`)
- File Encryption → Local Files: reads and writes (evidence: `README.md`)
- Folder Encryption → Folder Container: archives through (evidence: `src/vault.cpp`)
- Folder Encryption → File Encryption: encrypts via (evidence: `src/vault.cpp`)
- File Hashing → Local Files: reads (evidence: `README.md`)
- Secure Shredding → Local Files: overwrites and deletes
