# zkcplk/federe_ogrenme_ile_malware_tespiti architecture

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

- Interactive diagram: https://gitdiagram.com/zkcplk/federe_ogrenme_ile_malware_tespiti
- Repository: https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti

## Overview

This is a federated-learning malware detection and classification application: clients train local FNN or LSTM models on malware datasets, exchange encrypted weights with a coordinating server, and receive a FedAvg global model. The main workflow runs from client polling and local training through authenticated round-based transfer, server aggregation, evaluation, logging, and either another round or completion. The sampled source supports these runtime links; dataset contents and some configuration details are represented only by the tree.

Main entry points: [`Fed_Server/server_functions.py`](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py) (FedAvg round), [`Fed_Client/client_functions.py`](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_functions.py) (Round loop), [`Fed_Server/server_main.py`](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_main.py) (Server listener), [`Fed_Server/server_main.json`](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_main.json) (Server config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client runtime"]
  node_client_entry["Client launcher<br/>[client_main.py]"]
  node_client_loop["Round loop"]
  node_client_data[("Malware datasets")]
  node_client_network["Client protocol"]
end

subgraph group_server["Server runtime"]
  node_server_entry["Server listener<br/>[server_main.py]"]
  node_server_handler["Client handler"]
  node_aggregation["FedAvg round"]
  node_evaluation["Model evaluation"]
  node_metrics_log["Metrics log"]
  node_server_data[("Evaluation datasets")]
end

subgraph group_models["Model learning"]
  node_client_arch["Client architectures<br/>[model.py]"]
  node_server_arch["Server architectures<br/>[model.py]"]
end

subgraph group_state["State and security"]
  node_client_config["Client config<br/>[client_main.json]"]
  node_server_config["Server config<br/>[server_main.json]"]
  node_client_crypto["Client crypto and state<br/>[other.py]"]
  node_server_crypto["Server crypto and state<br/>[other.py]"]
  node_api_keys[("API credentials<br/>[user.json]")]
end

node_operator(("Client operator"))
node_client_actor(("Client participant"))

node_operator -->|"starts"| node_client_entry
node_client_entry -->|"loads and updates"| node_client_config
node_client_entry -->|"clears model files"| node_client_crypto
node_client_entry -->|"starts rounds"| node_client_loop
node_client_loop -->|"reads training data"| node_client_data
node_client_loop -->|"reads settings"| node_client_config
node_client_loop -->|"builds model"| node_client_arch
node_client_loop -->|"checks and transfers"| node_client_network
node_client_network -->|"TLS commands and weights"| node_server_entry
node_client_network -->|"decrypts global weights"| node_client_crypto
node_client_loop -->|"encrypts local weights"| node_client_crypto
node_server_entry -->|"loads and updates"| node_server_config
node_server_entry -->|"builds initial model"| node_server_arch
node_server_entry -->|"saves encrypted model"| node_server_crypto
node_server_entry -->|"dispatches connection"| node_server_handler
node_server_handler -->|"checks credentials"| node_api_keys
node_server_handler -->|"checks round"| node_server_config
node_server_handler -->|"reads and writes weights"| node_server_crypto
node_server_entry -->|"updates after request"| node_aggregation
node_aggregation -->|"reads round and submissions"| node_server_config
node_aggregation -->|"decrypts and encrypts weights"| node_server_crypto
node_aggregation -->|"loads and averages weights"| node_server_arch
node_aggregation -->|"tests global model"| node_evaluation
node_evaluation -->|"reads evaluation data"| node_server_data
node_evaluation -->|"reads evaluation settings"| node_server_config
node_aggregation -->|"records metrics"| node_metrics_log
node_aggregation -->|"advances round"| node_server_config
node_client_actor -->|"participates"| node_client_network

click node_client_entry "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_main.py"
click node_client_loop "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_functions.py"
click node_client_data "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/tree/main/Fed_Client/datasets"
click node_client_network "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_functions.py"
click node_server_entry "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_main.py"
click node_server_handler "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py"
click node_aggregation "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py"
click node_evaluation "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py"
click node_metrics_log "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py"
click node_server_data "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/tree/main/Fed_Server/datasets"
click node_client_arch "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/models/model.py"
click node_server_arch "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/models/model.py"
click node_client_config "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_main.json"
click node_server_config "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_main.json"
click node_client_crypto "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/other.py"
click node_server_crypto "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/other.py"
click node_api_keys "https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/apikeys/user.json"

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_client_entry,node_client_loop,node_client_data,node_client_network,node_operator,node_client_actor toneBlue
class node_server_entry,node_server_handler,node_aggregation,node_evaluation,node_metrics_log,node_server_data toneAmber
class node_client_arch,node_server_arch toneMint
class node_client_config,node_server_config,node_client_crypto,node_server_crypto,node_api_keys toneRose
```

## Components

### Client runtime

- [Client launcher](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_main.py): `Fed_Client/client_main.py`
- [Round loop](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_functions.py): `Fed_Client/client_functions.py`
- [Malware datasets](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/tree/main/Fed_Client/datasets): `Fed_Client/datasets`
- [Client protocol](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_functions.py): `Fed_Client/client_functions.py`

### Server runtime

- [Server listener](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_main.py): `Fed_Server/server_main.py`
- [Client handler](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py): `Fed_Server/server_functions.py`
- [FedAvg round](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py): `Fed_Server/server_functions.py`
- [Model evaluation](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py): `Fed_Server/server_functions.py`
- [Metrics log](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_functions.py): `Fed_Server/server_functions.py`
- [Evaluation datasets](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/tree/main/Fed_Server/datasets): `Fed_Server/datasets`

### Model learning

- [Client architectures](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/models/model.py): `Fed_Client/models/model.py`
- [Server architectures](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/models/model.py): `Fed_Server/models/model.py`

### State and security

- [Client config](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/client_main.json): `Fed_Client/client_main.json`
- [Server config](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/server_main.json): `Fed_Server/server_main.json`
- [Client crypto and state](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Client/other.py): `Fed_Client/other.py`
- [Server crypto and state](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/other.py): `Fed_Server/other.py`
- [API credentials](https://github.com/zkcplk/federe_ogrenme_ile_malware_tespiti/blob/main/Fed_Server/apikeys/user.json): `Fed_Server/apikeys/user.json`

### Other components

- **Client operator**
- **Client participant**

## Connections

- Client operator → Client launcher: starts
- Client launcher → Client config: loads and updates
- Client launcher → Client crypto and state: clears model files
- Client launcher → Round loop: starts rounds
- Round loop → Malware datasets: reads training data
- Round loop → Client config: reads settings
- Round loop → Client architectures: builds model
- Round loop → Client protocol: checks and transfers
- Client protocol → Server listener: TLS commands and weights
- Client protocol → Client crypto and state: decrypts global weights
- Round loop → Client crypto and state: encrypts local weights
- Server listener → Server config: loads and updates
- Server listener → Server architectures: builds initial model
- Server listener → Server crypto and state: saves encrypted model
- Server listener → Client handler: dispatches connection
- Client handler → API credentials: checks credentials
- Client handler → Server config: checks round
- Client handler → Server crypto and state: reads and writes weights
- Server listener → FedAvg round: updates after request
- FedAvg round → Server config: reads round and submissions
- FedAvg round → Server crypto and state: decrypts and encrypts weights
- FedAvg round → Server architectures: loads and averages weights
- FedAvg round → Model evaluation: tests global model
- Model evaluation → Evaluation datasets: reads evaluation data
- Model evaluation → Server config: reads evaluation settings
- FedAvg round → Metrics log: records metrics
- FedAvg round → Server config: advances round
- Client participant → Client protocol: participates
