# artemfaust/monitoringprocessnetworkstatisticks architecture

> Architecture diagram of the GitHub repository artemfaust/monitoringprocessnetworkstatisticks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/artemfaust/monitoringprocessnetworkstatisticks
- Repository: https://github.com/artemfaust/monitoringprocessnetworkstatisticks

## Overview

##### Project type and purpose
- This is a standalone desktop GUI application written in Python, built with PyQt5, whose goal is to monitor and display per-process network statistics in real time.

##### File structure
- Top-level files:
- main.py & main_PyQt5.py – application entrypoints
- LICENSE & README.md – metadata
- “ui” directory:
- main.ui – the main window layout
- procesStatistick.ui – dialog or widget for process statistics
- showProcessInfo.ui – dialog showing detailed information

##### README for additional insights
- It provides screenshots of the running application but no explicit architectural notes.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry Point Layer
    subgraph "Entry Point Layer"
        EP1["main.py"]:::entry
        EP2["main_PyQt5.py"]:::entry
    end

    %% UI Layer
    subgraph "UI Layer" 
        UI1["main.ui (Main Window)"]:::ui
        UI2["procesStatistick.ui (Process Stats Dialog)"]:::ui
        UI3["showProcessInfo.ui (Process Info Dialog)"]:::ui
        RES["Icons"]:::resources
        NETICON["Icons/network"]:::resources
    end

    %% Controller Layer
    subgraph "Business Logic / Controller Layer"
        CTRL["Controller"]:::controller
        TIMER["QTimer (Polling Scheduler)"]:::controller
    end

    %% Data Acquisition Layer
    subgraph "Data Acquisition Layer"
        DA["psutil / OS Query Module"]:::dataacq
    end

    %% Data Model / Storage
    subgraph "Data Model / Storage"
        MODEL["In-memory Time-Series Model"]:::model
    end

    %% Presentation Layer
    subgraph "Presentation Layer"
        PRES["UI Update / View Renderer"]:::presentation
    end

    %% Connections
    EP1 -->|"initializes"| CTRL
    EP2 -->|"initializes"| CTRL
    EP1 -->|"loads .ui files"| UI1
    EP1 --> UI2
    EP1 --> UI3
    UI1 -->|"uses resources"| RES
    UI1 --> NETICON
    UI2 --> RES
    UI3 --> RES

    CTRL -->|"starts"| TIMER
    TIMER -->|"polls every 1s"| DA
    DA -->|"fetches network stats"| MODEL
    MODEL -->|"pushModelUpdate()"| PRES
    PRES -->|"renders to"| UI1
    PRES --> UI2
    PRES --> UI3
    UI1 -->|"user events"| CTRL
    UI2 --> CTRL
    UI3 --> CTRL

    %% Click Events
    click EP1 "https://github.com/artemfaust/monitoringprocessnetworkstatisticks/blob/master/main.py"
    click EP2 "https://github.com/artemfaust/monitoringprocessnetworkstatisticks/blob/master/main_PyQt5.py"
    click UI1 "https://github.com/artemfaust/monitoringprocessnetworkstatisticks/blob/master/ui/main.ui"
    click UI2 "https://github.com/artemfaust/monitoringprocessnetworkstatisticks/blob/master/ui/procesStatistick.ui"
    click UI3 "https://github.com/artemfaust/monitoringprocessnetworkstatisticks/blob/master/ui/showProcessInfo.ui"
    click RES "https://github.com/artemfaust/monitoringprocessnetworkstatisticks/tree/master/Icons/"
    click NETICON "https://github.com/artemfaust/monitoringprocessnetworkstatisticks/tree/master/Icons/network/"

    %% Styles
    classDef entry fill:#f9f,stroke:#333,stroke-width:1px
    classDef ui fill:#bbf,stroke:#333,stroke-width:1px
    classDef resources fill:#888,stroke:#333,stroke-width:1px
    classDef controller fill:#bfb,stroke:#333,stroke-width:1px
    classDef dataacq fill:#fb8,stroke:#333,stroke-width:1px
    classDef model fill:#dcb,stroke:#333,stroke-width:1px
    classDef presentation fill:#cdf,stroke:#333,stroke-width:1px
```
