# bayazid-bit/sdt architecture

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

- Interactive diagram: https://gitdiagram.com/bayazid-bit/sdt
- Repository: https://github.com/bayazid-bit/sdt

## Overview

SDT is a command-line secure-delete tool. Its workflow parses file or folder options, requests confirmation, discovers files recursively for folder mode, overwrites each target for the configured number of passes, then removes files and directories. The graph reflects the single sampled source file; its small size does not justify separate subsystem groups.

Main entry points: [`sdt.py`](https://github.com/bayazid-bit/sdt/blob/main/sdt.py) (Folder discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_arguments["Argument parsing<br/>[sdt.py]"]
  node_confirmation["Safety confirmation<br/>[sdt.py]"]
  node_folder_scan["Folder discovery<br/>[sdt.py]"]
end

subgraph group_deletion["Deletion runtime"]
  node_file_delete["File deletion<br/>[sdt.py]"]
  node_overwrite["Overwrite passes<br/>[sdt.py]"]
end

node_operator(("Operator"))
node_filesystem[("Local filesystem")]

node_operator -->|"provides options"| node_arguments
node_arguments -->|"requests approval"| node_confirmation
node_confirmation -->|"on folder mode"| node_folder_scan
node_confirmation -->|"on file mode"| node_file_delete
node_folder_scan -->|"scans directories"| node_filesystem
node_folder_scan -->|"dispatches files"| node_file_delete
node_file_delete -->|"runs passes"| node_overwrite
node_overwrite -->|"writes random bytes"| node_filesystem
node_file_delete -->|"removes file"| node_filesystem
node_folder_scan -->|"removes directories"| node_filesystem

click node_arguments "https://github.com/bayazid-bit/sdt/blob/main/sdt.py"
click node_confirmation "https://github.com/bayazid-bit/sdt/blob/main/sdt.py"
click node_folder_scan "https://github.com/bayazid-bit/sdt/blob/main/sdt.py"
click node_file_delete "https://github.com/bayazid-bit/sdt/blob/main/sdt.py"
click node_overwrite "https://github.com/bayazid-bit/sdt/blob/main/sdt.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_arguments,node_confirmation,node_folder_scan toneBlue
class node_file_delete,node_overwrite,node_filesystem toneAmber
class node_operator toneIndigo
```

## Components

### CLI workflow

- [Argument parsing](https://github.com/bayazid-bit/sdt/blob/main/sdt.py): `sdt.py`
- [Safety confirmation](https://github.com/bayazid-bit/sdt/blob/main/sdt.py): `sdt.py`
- [Folder discovery](https://github.com/bayazid-bit/sdt/blob/main/sdt.py): `sdt.py`

### Deletion runtime

- [File deletion](https://github.com/bayazid-bit/sdt/blob/main/sdt.py): `sdt.py`
- [Overwrite passes](https://github.com/bayazid-bit/sdt/blob/main/sdt.py): `sdt.py`

### Other components

- **Operator**
- **Local filesystem**

## Connections

- Operator → Argument parsing: provides options (evidence: `sdt.py`)
- Argument parsing → Safety confirmation: requests approval (evidence: `sdt.py`)
- Safety confirmation → Folder discovery: on folder mode (evidence: `sdt.py`)
- Safety confirmation → File deletion: on file mode (evidence: `sdt.py`)
- Folder discovery → Local filesystem: scans directories (evidence: `sdt.py`)
- Folder discovery → File deletion: dispatches files (evidence: `sdt.py`)
- File deletion → Overwrite passes: runs passes (evidence: `sdt.py`)
- Overwrite passes → Local filesystem: writes random bytes (evidence: `sdt.py`)
- File deletion → Local filesystem: removes file (evidence: `sdt.py`)
- Folder discovery → Local filesystem: removes directories (evidence: `sdt.py`)
