# cse-cyber-security/cybersecurity-asset-mini architecture

> Architecture diagram of the GitHub repository cse-cyber-security/cybersecurity-asset-mini, 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/cse-cyber-security/cybersecurity-asset-mini
- Repository: https://github.com/cse-cyber-security/cybersecurity-asset-mini

## Overview

This is a small, file-backed cybersecurity asset inventory. Its principal workflow is to validate asset data, then add, search, update, delete, or display inventory records; a separate summary counts assets by risk and security status. The sampled source implements these operations in one class and reads/writes JSON. The README documents the capabilities, but no command-line or other application entry point is shown. Note that the source references `../data/assets.json`, while the tree lists `Data/assets.json`; the configured path may not match the repository file, depending on the working directory and filesystem case sensitivity.

Main entry points: [`src/asset-inventory.py`](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py) (Asset inventory), [`Data/assets.json`](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/Data/assets.json) (Asset JSON file)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inventory["Inventory operations"]
  node_inventory_api["Asset inventory<br/>[asset-inventory.py]"]
  node_validation["Asset validation<br/>[asset-inventory.py]"]
  node_add["Add asset<br/>[asset-inventory.py]"]
  node_display["Display assets<br/>[asset-inventory.py]"]
  node_search["Search asset<br/>[asset-inventory.py]"]
  node_update["Update asset<br/>[asset-inventory.py]"]
  node_delete["Delete asset<br/>[asset-inventory.py]"]
  node_summary["Security summary<br/>[asset-inventory.py]"]
end

subgraph group_storage["JSON storage"]
  node_load["Load assets<br/>[asset-inventory.py]"]
  node_save["Save assets<br/>[asset-inventory.py]"]
  node_asset_file[("Asset JSON file<br/>[assets.json]")]
end

node_user(("Inventory user"))

node_user -->|"uses"| node_inventory_api
node_inventory_api -->|"provides"| node_add
node_inventory_api -->|"provides"| node_display
node_inventory_api -->|"provides"| node_search
node_inventory_api -->|"provides"| node_update
node_inventory_api -->|"provides"| node_delete
node_inventory_api -->|"provides"| node_summary
node_add -->|"validates"| node_validation
node_add -->|"loads records"| node_load
node_add -->|"saves records"| node_save
node_display -->|"loads records"| node_load
node_search -->|"loads records"| node_load
node_update -->|"loads records"| node_load
node_update -->|"validates"| node_validation
node_update -->|"saves records"| node_save
node_delete -->|"loads records"| node_load
node_delete -->|"saves records"| node_save
node_summary -->|"loads records"| node_load
node_load -->|"reads"| node_asset_file
node_save -->|"writes"| node_asset_file

click node_inventory_api "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_validation "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_add "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_display "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_search "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_update "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_delete "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_summary "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_load "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_save "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py"
click node_asset_file "https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/Data/assets.json"

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_inventory_api,node_validation,node_add,node_display,node_search,node_update,node_delete,node_summary,node_user toneBlue
class node_load,node_save,node_asset_file toneAmber
```

## Components

### Inventory operations

- [Asset inventory](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Asset validation](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Add asset](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Display assets](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Search asset](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Update asset](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Delete asset](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Security summary](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`

### JSON storage

- [Load assets](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Save assets](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/src/asset-inventory.py): `src/asset-inventory.py`
- [Asset JSON file](https://github.com/cse-cyber-security/cybersecurity-asset-mini/blob/Hariharan_P/Data/assets.json): `Data/assets.json`

### Other components

- **Inventory user**

## Connections

- Inventory user → Asset inventory: uses
- Asset inventory → Add asset: provides
- Asset inventory → Display assets: provides
- Asset inventory → Search asset: provides
- Asset inventory → Update asset: provides
- Asset inventory → Delete asset: provides
- Asset inventory → Security summary: provides
- Add asset → Asset validation: validates
- Add asset → Load assets: loads records
- Add asset → Save assets: saves records
- Display assets → Load assets: loads records
- Search asset → Load assets: loads records
- Update asset → Load assets: loads records
- Update asset → Asset validation: validates
- Update asset → Save assets: saves records
- Delete asset → Load assets: loads records
- Delete asset → Save assets: saves records
- Security summary → Load assets: loads records
- Load assets → Asset JSON file: reads
- Save assets → Asset JSON file: writes
