# denzelvw-xyz/file-integrity-checker architecture

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

- Interactive diagram: https://gitdiagram.com/denzelvw-xyz/file-integrity-checker
- Repository: https://github.com/denzelvw-xyz/file-integrity-checker

## Overview

This is a small interactive CLI for creating and checking file-integrity baselines. The user chooses Scan or Check; scanning hashes files into a JSON baseline, while checking compares current files with that baseline and reports unchanged, changed, deleted, and new files. The runtime is implemented in one script, so nodes represent responsibilities within that script rather than separate modules. The documented workflow and the checker.py excerpt support the shown relationships.

Main entry points: [`checker.py`](https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py) (Interactive CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Interaction"]
  node_interactive_cli["Interactive CLI<br/>[checker.py]"]
  node_selector["Option selector"]
end

subgraph group_scan["Baseline creation"]
  node_directory_scan["Directory scan<br/>[checker.py]"]
  node_sha256["SHA-256 hashing<br/>[checker.py]"]
  node_baseline[("JSON baseline<br/>[checker.py]")]
end

subgraph group_check["Integrity checking"]
  node_comparison["Baseline comparison<br/>[checker.py]"]
  node_status_output["Status output<br/>[checker.py]"]
end

node_user(("User"))

node_user -->|"chooses mode"| node_interactive_cli
node_interactive_cli -->|"prompts choice"| node_selector
node_interactive_cli -->|"runs Scan"| node_directory_scan
node_directory_scan -->|"hashes contents"| node_sha256
node_directory_scan -->|"writes hashes"| node_baseline
node_interactive_cli -->|"runs Check"| node_comparison
node_comparison -->|"reads hashes"| node_baseline
node_comparison -->|"hashes current files"| node_sha256
node_comparison -->|"prints statuses"| node_status_output

click node_interactive_cli "https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py"
click node_directory_scan "https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py"
click node_sha256 "https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py"
click node_baseline "https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py"
click node_comparison "https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py"
click node_status_output "https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py"

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_interactive_cli,node_selector,node_user toneBlue
class node_directory_scan,node_sha256,node_baseline toneAmber
class node_comparison,node_status_output toneMint
```

## Components

### Interaction

- [Interactive CLI](https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py): `checker.py`
- **Option selector**

### Baseline creation

- [Directory scan](https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py): `checker.py`
- [SHA-256 hashing](https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py): `checker.py`
- [JSON baseline](https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py): `checker.py`

### Integrity checking

- [Baseline comparison](https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py): `checker.py`
- [Status output](https://github.com/denzelvw-xyz/file-integrity-checker/blob/main/checker.py): `checker.py`

### Other components

- **User**

## Connections

- User → Interactive CLI: chooses mode (evidence: `README.md`)
- Interactive CLI → Option selector: prompts choice (evidence: `checker.py`)
- Interactive CLI → Directory scan: runs Scan (evidence: `checker.py`)
- Directory scan → SHA-256 hashing: hashes contents (evidence: `checker.py`)
- Directory scan → JSON baseline: writes hashes (evidence: `checker.py`)
- Interactive CLI → Baseline comparison: runs Check (evidence: `checker.py`)
- Baseline comparison → JSON baseline: reads hashes (evidence: `checker.py`)
- Baseline comparison → SHA-256 hashing: hashes current files (evidence: `checker.py`)
- Baseline comparison → Status output: prints statuses (evidence: `checker.py`)
