# tamilselvan-cs/zerotrustsiem-project architecture

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

- Interactive diagram: https://gitdiagram.com/tamilselvan-cs/zerotrustsiem-project
- Repository: https://github.com/tamilselvan-cs/zerotrustsiem-project

## Overview

Zero-Trust SIEM is a defensive security-monitoring demo pairing a Flask enterprise app with a desktop SOC dashboard. The main workflow is user activity and authentication in the web app, event logging and detection of brute force, impossible travel, or privilege escalation, persistence in MongoDB, then dashboard monitoring and user-blocking response. The dashboard also provides logs, alerts, risk profiles, threat visualization, rules controls, and settings/reporting. Source excerpts show the web and dashboard entry points and several view behaviors; some dashboard details and the analytics engine’s integration are documented or indexed but not fully shown.

Main entry points: [`ZeroTrust_SIEM/Dashboard/main_ui.py`](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/main_ui.py) (Dashboard Shell), [`ZeroTrust_SIEM/database/db_config.py`](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/database/db_config.py) (DB Connection), [`ZeroTrust_SIEM/Ecommerce/app.py`](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Ecommerce/app.py) (Enterprise Web App), [`ZeroTrust_SIEM/Dashboard/views/dashboard_view.py`](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/dashboard_view.py) (Threat Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Victim Web App"]
  node_flask["Enterprise Web App<br/>[app.py]"]
  node_event_logic["Detection &amp; Logging<br/>[app.py]"]
end

subgraph group_storage["Shared Event Store"]
  node_mongo[("MongoDB")]
  node_db_config["DB Connection<br/>[db_config.py]"]
end

subgraph group_soc["SOC Dashboard"]
  node_main_ui["Dashboard Shell<br/>[main_ui.py]"]
end

subgraph group_monitoring["Monitoring Views"]
  node_dashboard["Threat Dashboard<br/>[dashboard_view.py]"]
  node_logs["Live Logs<br/>[logs_view.py]"]
  node_alerts["Alert Feed<br/>[alerts_view.py]"]
  node_users_view["User Risk Profiles<br/>[users_view.py]"]
end

subgraph group_operations["SOC Operations"]
  node_rules["Detection Rules<br/>[rules_view.py]"]
  node_settings["Settings &amp; Export<br/>[settings_view.py]"]
  node_analytics["Analytics Engine<br/>[analytics.py]"]
end

node_users(("Web Users"))
node_soc_user(("SOC Operator"))

node_users -->|"use app"| node_flask
node_flask -->|"checks and logs"| node_event_logic
node_flask -->|"gets connection"| node_db_config
node_event_logic -->|"reads and writes"| node_mongo
node_db_config -->|"connects to"| node_mongo
node_soc_user -->|"operates"| node_main_ui
node_main_ui -->|"gets connection"| node_db_config
node_main_ui -->|"opens view"| node_dashboard
node_main_ui -->|"opens view"| node_logs
node_main_ui -->|"opens view"| node_alerts
node_main_ui -->|"opens view"| node_users_view
node_main_ui -->|"opens view"| node_rules
node_main_ui -->|"opens view"| node_settings
node_dashboard -.->|"polls events"| node_mongo
node_logs -->|"queries logs"| node_mongo
node_alerts -->|"queries alerts"| node_mongo
node_alerts -->|"resolves incidents"| node_mongo
node_users_view -->|"scores from logs"| node_mongo
node_dashboard -->|"blocks or allows"| node_mongo
node_settings -->|"exports and clears"| node_mongo
node_analytics -->|"gets connection"| node_db_config
node_analytics -->|"analyzes logs"| node_mongo

click node_flask "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Ecommerce/app.py"
click node_event_logic "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Ecommerce/app.py"
click node_db_config "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/database/db_config.py"
click node_main_ui "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/main_ui.py"
click node_dashboard "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/dashboard_view.py"
click node_logs "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/logs_view.py"
click node_alerts "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/alerts_view.py"
click node_users_view "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/users_view.py"
click node_rules "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/rules_view.py"
click node_settings "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/settings_view.py"
click node_analytics "https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/analytics.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_flask,node_event_logic,node_users toneBlue
class node_mongo,node_db_config toneAmber
class node_main_ui toneMint
class node_dashboard,node_logs,node_alerts,node_users_view toneRose
class node_rules,node_settings,node_analytics,node_soc_user toneIndigo
```

## Components

### Victim Web App

- [Enterprise Web App](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Ecommerce/app.py): `ZeroTrust_SIEM/Ecommerce/app.py`
- [Detection & Logging](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Ecommerce/app.py): `ZeroTrust_SIEM/Ecommerce/app.py`

### Shared Event Store

- **MongoDB**
- [DB Connection](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/database/db_config.py): `ZeroTrust_SIEM/database/db_config.py`

### SOC Dashboard

- [Dashboard Shell](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/main_ui.py): `ZeroTrust_SIEM/Dashboard/main_ui.py`

### Monitoring Views

- [Threat Dashboard](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/dashboard_view.py): `ZeroTrust_SIEM/Dashboard/views/dashboard_view.py`
- [Live Logs](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/logs_view.py): `ZeroTrust_SIEM/Dashboard/views/logs_view.py`
- [Alert Feed](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/alerts_view.py): `ZeroTrust_SIEM/Dashboard/views/alerts_view.py`
- [User Risk Profiles](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/users_view.py): `ZeroTrust_SIEM/Dashboard/views/users_view.py`

### SOC Operations

- [Detection Rules](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/rules_view.py): `ZeroTrust_SIEM/Dashboard/views/rules_view.py`
- [Settings & Export](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/views/settings_view.py): `ZeroTrust_SIEM/Dashboard/views/settings_view.py`
- [Analytics Engine](https://github.com/tamilselvan-cs/zerotrustsiem-project/blob/main/ZeroTrust_SIEM/Dashboard/analytics.py): `ZeroTrust_SIEM/Dashboard/analytics.py`

### Other components

- **Web Users**
- **SOC Operator**

## Connections

- Web Users → Enterprise Web App: use app (evidence: `README.md`)
- Enterprise Web App → Detection & Logging: checks and logs (evidence: `ZeroTrust_SIEM/Ecommerce/app.py`)
- Enterprise Web App → DB Connection: gets connection (evidence: `ZeroTrust_SIEM/Ecommerce/app.py`)
- Detection & Logging → MongoDB: reads and writes (evidence: `ZeroTrust_SIEM/Ecommerce/app.py`)
- DB Connection → MongoDB: connects to (evidence: `ZeroTrust_SIEM/database/db_config.py`)
- SOC Operator → Dashboard Shell: operates (evidence: `README.md`)
- Dashboard Shell → DB Connection: gets connection (evidence: `ZeroTrust_SIEM/Dashboard/main_ui.py`)
- Dashboard Shell → Threat Dashboard: opens view (evidence: `ZeroTrust_SIEM/Dashboard/main_ui.py`)
- Dashboard Shell → Live Logs: opens view (evidence: `ZeroTrust_SIEM/Dashboard/main_ui.py`)
- Dashboard Shell → Alert Feed: opens view (evidence: `ZeroTrust_SIEM/Dashboard/main_ui.py`)
- Dashboard Shell → User Risk Profiles: opens view (evidence: `ZeroTrust_SIEM/Dashboard/main_ui.py`)
- Dashboard Shell → Detection Rules: opens view (evidence: `ZeroTrust_SIEM/Dashboard/main_ui.py`)
- Dashboard Shell → Settings & Export: opens view (evidence: `ZeroTrust_SIEM/Dashboard/main_ui.py`)
- Threat Dashboard → MongoDB: polls events (evidence: `README.md`)
- Live Logs → MongoDB: queries logs (evidence: `ZeroTrust_SIEM/Dashboard/views/logs_view.py`)
- Alert Feed → MongoDB: queries alerts (evidence: `ZeroTrust_SIEM/Dashboard/views/alerts_view.py`)
- Alert Feed → MongoDB: resolves incidents (evidence: `ZeroTrust_SIEM/Dashboard/views/alerts_view.py`)
- User Risk Profiles → MongoDB: scores from logs (evidence: `ZeroTrust_SIEM/Dashboard/views/users_view.py`)
- Threat Dashboard → MongoDB: blocks or allows (evidence: `ZeroTrust_SIEM/Dashboard/views/dashboard_view.py`)
- Settings & Export → MongoDB: exports and clears (evidence: `ZeroTrust_SIEM/Dashboard/views/settings_view.py`)
- Analytics Engine → DB Connection: gets connection (evidence: `ZeroTrust_SIEM/Dashboard/analytics.py`)
- Analytics Engine → MongoDB: analyzes logs (evidence: `ZeroTrust_SIEM/Dashboard/analytics.py`)
