# lakshminarayanasrikar41-prog/risksheild architecture

> Architecture diagram of the GitHub repository lakshminarayanasrikar41-prog/risksheild, 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/lakshminarayanasrikar41-prog/risksheild
- Repository: https://github.com/lakshminarayanasrikar41-prog/risksheild

## Overview

RISKSHIELD is a single-file C console application for recording, assessing, viewing, and searching transactions. The user workflow runs through the menu in `main`: add a validated transaction, calculate and classify its risk, then view or search records and explicitly save them. On startup, `main` loads saved records from `transactions.txt`. The graph reflects the one source file and documented text-file storage; no separate modules are present.

Main entry points: [`RISKSHEILD_FINAL_CODE.C`](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C) (Menu and dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Console workflow"]
  node_main["Menu and dispatch"]
  node_add["Add transaction"]
  node_view["View transactions"]
  node_search["Search transaction"]
end

subgraph group_assessment["Risk assessment"]
  node_calculate["Calculate risk score"]
  node_classify["Assign risk level"]
end

subgraph group_storage["Transaction storage"]
  node_records["Transaction array"]
  node_load["Load records"]
  node_save["Save records"]
  node_file[("transactions.txt")]
end

node_user(("Console user"))

node_user -->|"chooses options"| node_main
node_main -->|"prints results"| node_user
node_main -->|"calls at startup"| node_load
node_main -->|"dispatches"| node_add
node_main -->|"dispatches"| node_view
node_main -->|"dispatches"| node_search
node_main -->|"dispatches"| node_save
node_add -->|"calls"| node_calculate
node_add -->|"calls"| node_classify
node_add -->|"updates"| node_records
node_view -->|"reads"| node_records
node_search -->|"searches"| node_records
node_load -->|"reads"| node_file
node_load -->|"loads"| node_records
node_save -->|"reads"| node_records
node_save -->|"writes"| node_file

click node_main "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_add "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_view "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_search "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_records "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_calculate "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_classify "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_load "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"
click node_save "https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C"

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_add,node_view,node_search,node_user toneBlue
class node_calculate,node_classify toneAmber
class node_records,node_load,node_save,node_file toneMint
```

## Components

### Console workflow

- [Menu and dispatch](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`
- [Add transaction](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`
- [View transactions](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`
- [Search transaction](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`

### Risk assessment

- [Calculate risk score](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`
- [Assign risk level](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`

### Transaction storage

- [Transaction array](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`
- [Load records](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`
- [Save records](https://github.com/lakshminarayanasrikar41-prog/risksheild/blob/main/RISKSHEILD_FINAL_CODE.C): `RISKSHEILD_FINAL_CODE.C`
- **transactions.txt**

### Other components

- **Console user**

## Connections

- Console user → Menu and dispatch: chooses options
- Menu and dispatch → Console user: prints results
- Menu and dispatch → Load records: calls at startup
- Menu and dispatch → Add transaction: dispatches
- Menu and dispatch → View transactions: dispatches
- Menu and dispatch → Search transaction: dispatches
- Menu and dispatch → Save records: dispatches
- Add transaction → Calculate risk score: calls
- Add transaction → Assign risk level: calls
- Add transaction → Transaction array: updates
- View transactions → Transaction array: reads
- Search transaction → Transaction array: searches
- Load records → transactions.txt: reads
- Load records → Transaction array: loads
- Save records → Transaction array: reads
- Save records → transactions.txt: writes
