# shagunchaudhary794/thanatos_sentinal architecture

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

- Interactive diagram: https://gitdiagram.com/shagunchaudhary794/thanatos_sentinal
- Repository: https://github.com/shagunchaudhary794/thanatos_sentinal

## Overview

Thanatos Sentinel is a Flask-based Windows process-monitoring dashboard. Its main workflow is to observe new processes, score suspicious behavior, suspend critical threats for manual control, and expose monitoring and threat records in a browser. The graph also shows the documented log archiving, decryption, reporting, themes, and anti-tamper capabilities. The excerpts confirm several backend routes and frontend requests; some README capabilities, including tray integration and anti-tamper, are not visible in sampled source, so their links are documented rather than inferred from implementation.

Main entry points: [`static/js/main.js`](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/static/js/main.js) (Dashboard logic), [`app.py`](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py) (Process watcher), [`logs`](https://github.com/shagunchaudhary794/thanatos_sentinal/tree/main/logs) (Log files), [`templates/index.html`](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/templates/index.html) (Dashboard interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_monitoring["Threat monitoring"]
  node_monitor["Process watcher<br/>[app.py]"]
  node_classifier["Threat scoring<br/>[app.py]"]
  node_stats["System statistics<br/>[app.py]"]
end

subgraph group_response["Threat response"]
  node_controls["Manual controls<br/>[app.py]"]
  node_quarantine["Quarantine handling<br/>[app.py]"]
  node_tamper["Anti-tamper checks<br/>[app.py]"]
end

subgraph group_records["Logs and reports"]
  node_logwriter["Event logging<br/>[app.py]"]
  node_dna["Threat DNA records<br/>[app.py]"]
  node_archive["Encrypted archives<br/>[app.py]"]
  node_decrypt["Archive decryption<br/>[app.py]"]
  node_reports["Threat reports<br/>[app.py]"]
  node_logstore[("Log files")]
  node_archivefiles[("Archive files")]
end

subgraph group_dashboard["Dashboard"]
  node_ui["Dashboard interface<br/>[index.html]"]
  node_frontend["Dashboard logic<br/>[main.js]"]
  node_themes["Theme styling<br/>[style.css]"]
end

node_user(("Operator"))
node_browser["Web browser"]
node_windows["Windows processes"]

node_user -->|"opens dashboard"| node_browser
node_browser -->|"requests page"| node_ui
node_ui -.->|"loads script"| node_frontend
node_user -.->|"uses controls"| node_frontend
node_frontend -->|"fetches stats"| node_stats
node_frontend -->|"fetches logs"| node_logwriter
node_frontend -->|"sends actions"| node_controls
node_frontend -->|"fetches records"| node_dna
node_frontend -->|"uploads archive"| node_decrypt
node_frontend -->|"requests report"| node_reports
node_frontend -.->|"applies theme"| node_themes
node_frontend -.->|"controls"| node_tamper
node_windows -.->|"process events"| node_monitor
node_monitor -->|"scores processes"| node_classifier
node_monitor -->|"records events"| node_logwriter
node_monitor -->|"saves findings"| node_dna
node_monitor -->|"suspends critical"| node_windows
node_monitor -->|"tracks suspended"| node_quarantine
node_controls -->|"resumes or kills"| node_windows
node_controls -->|"moves files"| node_quarantine
node_controls -->|"records actions"| node_logwriter
node_stats -.->|"reads metrics"| node_windows
node_logwriter -->|"writes logs"| node_logstore
node_dna -->|"writes records"| node_logstore
node_archive -->|"reads and clears"| node_logstore
node_archive -->|"writes encrypted"| node_archivefiles
node_decrypt -->|"returns plaintext"| node_browser
node_reports -->|"reads entries"| node_dna
node_tamper -.->|"reports changes"| node_logwriter
node_user -.->|"views results"| node_browser

click node_monitor "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_classifier "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_stats "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_controls "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_quarantine "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_tamper "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_logwriter "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_dna "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_archive "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_decrypt "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_reports "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py"
click node_logstore "https://github.com/shagunchaudhary794/thanatos_sentinal/tree/main/logs"
click node_archivefiles "https://github.com/shagunchaudhary794/thanatos_sentinal/tree/main/archive"
click node_ui "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/templates/index.html"
click node_frontend "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/static/js/main.js"
click node_themes "https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/static/css/style.css"

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_monitor,node_classifier,node_stats,node_browser toneBlue
class node_controls,node_quarantine,node_tamper toneAmber
class node_logwriter,node_dna,node_archive,node_decrypt,node_reports,node_logstore,node_archivefiles toneMint
class node_ui,node_frontend,node_themes toneRose
class node_user,node_windows toneIndigo
```

## Components

### Threat monitoring

- [Process watcher](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Threat scoring](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [System statistics](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`

### Threat response

- [Manual controls](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Quarantine handling](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Anti-tamper checks](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`

### Logs and reports

- [Event logging](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Threat DNA records](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Encrypted archives](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Archive decryption](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Threat reports](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/app.py): `app.py`
- [Log files](https://github.com/shagunchaudhary794/thanatos_sentinal/tree/main/logs): `logs`
- [Archive files](https://github.com/shagunchaudhary794/thanatos_sentinal/tree/main/archive): `archive`

### Dashboard

- [Dashboard interface](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/templates/index.html): `templates/index.html`
- [Dashboard logic](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/static/js/main.js): `static/js/main.js`
- [Theme styling](https://github.com/shagunchaudhary794/thanatos_sentinal/blob/main/static/css/style.css): `static/css/style.css`

### Other components

- **Operator**
- **Web browser**
- **Windows processes**

## Connections

- Operator → Web browser: opens dashboard (evidence: `README.md`)
- Web browser → Dashboard interface: requests page
- Dashboard interface → Dashboard logic: loads script
- Operator → Dashboard logic: uses controls
- Dashboard logic → System statistics: fetches stats (evidence: `static/js/main.js`)
- Dashboard logic → Event logging: fetches logs (evidence: `static/js/main.js`)
- Dashboard logic → Manual controls: sends actions (evidence: `static/js/main.js`)
- Dashboard logic → Threat DNA records: fetches records (evidence: `static/js/main.js`)
- Dashboard logic → Archive decryption: uploads archive (evidence: `static/js/main.js`)
- Dashboard logic → Threat reports: requests report (evidence: `static/js/main.js`)
- Dashboard logic → Theme styling: applies theme
- Dashboard logic → Anti-tamper checks: controls
- Windows processes → Process watcher: process events (evidence: `README.md`)
- Process watcher → Threat scoring: scores processes (evidence: `app.py`)
- Process watcher → Event logging: records events (evidence: `app.py`)
- Process watcher → Threat DNA records: saves findings (evidence: `app.py`)
- Process watcher → Windows processes: suspends critical (evidence: `app.py`)
- Process watcher → Quarantine handling: tracks suspended (evidence: `app.py`)
- Manual controls → Windows processes: resumes or kills (evidence: `app.py`)
- Manual controls → Quarantine handling: moves files (evidence: `app.py`)
- Manual controls → Event logging: records actions (evidence: `app.py`)
- System statistics → Windows processes: reads metrics (evidence: `README.md`)
- Event logging → Log files: writes logs (evidence: `app.py`)
- Threat DNA records → Log files: writes records (evidence: `app.py`)
- Encrypted archives → Log files: reads and clears (evidence: `app.py`)
- Encrypted archives → Archive files: writes encrypted (evidence: `app.py`)
- Archive decryption → Web browser: returns plaintext (evidence: `app.py`)
- Threat reports → Threat DNA records: reads entries (evidence: `app.py`)
- Anti-tamper checks → Event logging: reports changes (evidence: `app.py`)
- Operator → Web browser: views results
