# rudareanuleonard/skybox architecture

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

- Interactive diagram: https://gitdiagram.com/rudareanuleonard/skybox
- Repository: https://github.com/rudareanuleonard/skybox

## Overview

SkyBox recursively scans a client-side folder, represents discovered files, then connects to a TCP server and sends each file’s name and bytes. The server accepts the connection, reconstructs the relative path, and writes received data beneath its files_from_client directory. The README describes recursive client–server transfer; sampled code shows the scan and transfer flow, but not a fuller change-detection or synchronization protocol.

Main entry points: [`Client/Client.cpp`](https://github.com/rudareanuleonard/skybox/blob/main/Client/Client.cpp) (Client workflow), [`FilesManager/FilesManager.cpp`](https://github.com/rudareanuleonard/skybox/blob/main/FilesManager/FilesManager.cpp) (Folder scanner), [`Server/Server.cpp`](https://github.com/rudareanuleonard/skybox/blob/main/Server/Server.cpp) (File receiver), [`Server/files_from_client`](https://github.com/rudareanuleonard/skybox/tree/main/Server/files_from_client) (Received files)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client scanning and transfer"]
  node_client_app["Client workflow<br/>[Client.cpp]"]
  node_scanner["Folder scanner<br/>[FilesManager.cpp]"]
end

subgraph group_model["File representation"]
  node_file_model["File record<br/>[File.cpp]"]
end

subgraph group_server["Server reception"]
  node_server_app["Server listener<br/>[Server.cpp]"]
  node_receiver["File receiver<br/>[Server.cpp]"]
end

subgraph group_storage["File storage"]
  node_server_files[("Received files")]
end

node_user(("Sync initiator"))
node_local_files[("Client folder")]
node_tcp["TCP connection"]

node_user -->|"starts"| node_client_app
node_client_app -->|"scans folder"| node_scanner
node_scanner -->|"reads recursively"| node_local_files
node_scanner -->|"creates records"| node_file_model
node_scanner -->|"returns files"| node_client_app
node_client_app -->|"connects"| node_tcp
node_client_app -->|"sends names"| node_tcp
node_client_app -->|"sends bytes"| node_tcp
node_tcp -->|"delivers connection"| node_server_app
node_server_app -->|"dispatches file"| node_receiver
node_receiver -->|"writes files"| node_server_files
node_receiver -->|"checks existing paths"| node_server_files

click node_client_app "https://github.com/rudareanuleonard/skybox/blob/main/Client/Client.cpp"
click node_scanner "https://github.com/rudareanuleonard/skybox/blob/main/FilesManager/FilesManager.cpp"
click node_file_model "https://github.com/rudareanuleonard/skybox/blob/main/File/File.cpp"
click node_server_app "https://github.com/rudareanuleonard/skybox/blob/main/Server/Server.cpp"
click node_receiver "https://github.com/rudareanuleonard/skybox/blob/main/Server/Server.cpp"
click node_server_files "https://github.com/rudareanuleonard/skybox/tree/main/Server/files_from_client"

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_app,node_scanner toneBlue
class node_file_model,node_local_files toneAmber
class node_server_app,node_receiver toneMint
class node_server_files toneRose
class node_user,node_tcp toneIndigo
```

## Components

### Client scanning and transfer

- [Client workflow](https://github.com/rudareanuleonard/skybox/blob/main/Client/Client.cpp): `Client/Client.cpp`
- [Folder scanner](https://github.com/rudareanuleonard/skybox/blob/main/FilesManager/FilesManager.cpp): `FilesManager/FilesManager.cpp`

### File representation

- [File record](https://github.com/rudareanuleonard/skybox/blob/main/File/File.cpp): `File/File.cpp`

### Server reception

- [Server listener](https://github.com/rudareanuleonard/skybox/blob/main/Server/Server.cpp): `Server/Server.cpp`
- [File receiver](https://github.com/rudareanuleonard/skybox/blob/main/Server/Server.cpp): `Server/Server.cpp`

### File storage

- [Received files](https://github.com/rudareanuleonard/skybox/tree/main/Server/files_from_client): `Server/files_from_client`

### Other components

- **Sync initiator**
- **Client folder**
- **TCP connection**

## Connections

- Sync initiator → Client workflow: starts
- Client workflow → Folder scanner: scans folder
- Folder scanner → Client folder: reads recursively
- Folder scanner → File record: creates records
- Folder scanner → Client workflow: returns files
- Client workflow → TCP connection: connects
- Client workflow → TCP connection: sends names
- Client workflow → TCP connection: sends bytes
- TCP connection → Server listener: delivers connection
- Server listener → File receiver: dispatches file
- File receiver → Received files: writes files
- File receiver → Received files: checks existing paths
