# chaganti997/secure-biometric-file-tranfer architecture

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

- Interactive diagram: https://gitdiagram.com/chaganti997/secure-biometric-file-tranfer
- Repository: https://github.com/chaganti997/secure-biometric-file-tranfer

## Overview

This repository implements a command-line client/server file-transfer application with optional authentication and AES encryption. A user selects client commands to list, download, or upload files; the client backend serializes requests and exchanges framed messages with the server, whose backend dispatches file operations against its server-side directory. Authentication establishes a session key separately from file commands. The graph reflects the excerpts and SOURCE INDEX references; no README capability descriptions are available, and some backend sections are unsampled, so unverified network dispatch is shown as dashed.

Main entry points: [`scripts/client_backend.py`](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/client_backend.py) (Client commands), [`scripts/server_backend.py`](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/server_backend.py) (Server commands), [`scripts/authentication.py`](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/authentication.py) (Authentication), [`scripts/encryption_utils.py`](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/encryption_utils.py) (Cipher library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client workflow"]
  node_client_app["Client CLI<br/>[client.py]"]
  node_client_ops["Client commands<br/>[client_backend.py]"]
  node_client_files[("Local files")]
end

subgraph group_server["Server workflow"]
  node_server_app["Server listener<br/>[server.py]"]
  node_server_ops["Server commands<br/>[server_backend.py]"]
  node_server_files[("Server files")]
end

subgraph group_shared["Security and protocol"]
  node_auth["Authentication<br/>[authentication.py]"]
  node_cipher["Cipher library"]
  node_bytes["Byte conversion<br/>[byte_utils.py]"]
  node_framing["Message framing<br/>[utils.py]"]
end

node_user(("User"))
node_peer(("TCP peer"))

node_user -->|"enters commands"| node_client_app
node_client_app -->|"runs commands"| node_client_ops
node_client_app -->|"authenticates"| node_auth
node_client_ops -->|"sends requests"| node_peer
node_client_ops -->|"reads and writes"| node_client_files
node_client_ops -->|"encrypts files"| node_cipher
node_client_ops -->|"converts payloads"| node_bytes
node_client_ops -->|"frames messages"| node_framing
node_server_app -->|"receives commands"| node_server_ops
node_server_app -->|"authenticates peers"| node_auth
node_server_app -->|"receives responses"| node_framing
node_server_ops -.->|"handles requests"| node_peer
node_server_ops -->|"reads and writes"| node_server_files
node_server_ops -->|"encrypts files"| node_cipher
node_server_ops -->|"converts payloads"| node_bytes
node_server_ops -->|"frames messages"| node_framing
node_auth -->|"formats auth request"| node_client_ops
node_auth -->|"encodes auth messages"| node_bytes
node_auth -->|"exchanges auth messages"| node_framing
node_auth -->|"uses crypto support"| node_cipher
node_cipher -->|"normalizes data"| node_bytes

click node_client_app "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/client.py"
click node_client_ops "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/client_backend.py"
click node_client_files "https://github.com/chaganti997/secure-biometric-file-tranfer/tree/main/scripts/client_files"
click node_server_app "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/server.py"
click node_server_ops "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/server_backend.py"
click node_server_files "https://github.com/chaganti997/secure-biometric-file-tranfer/tree/main/scripts/server_files"
click node_auth "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/authentication.py"
click node_cipher "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/encryption_utils.py"
click node_bytes "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/byte_utils.py"
click node_framing "https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/utils.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_client_app,node_client_ops,node_client_files,node_user toneBlue
class node_server_app,node_server_ops,node_server_files toneAmber
class node_auth,node_cipher,node_bytes,node_framing toneMint
class node_peer toneIndigo
```

## Components

### Client workflow

- [Client CLI](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/client.py): `scripts/client.py`
- [Client commands](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/client_backend.py): `scripts/client_backend.py`
- [Local files](https://github.com/chaganti997/secure-biometric-file-tranfer/tree/main/scripts/client_files): `scripts/client_files`

### Server workflow

- [Server listener](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/server.py): `scripts/server.py`
- [Server commands](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/server_backend.py): `scripts/server_backend.py`
- [Server files](https://github.com/chaganti997/secure-biometric-file-tranfer/tree/main/scripts/server_files): `scripts/server_files`

### Security and protocol

- [Authentication](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/authentication.py): `scripts/authentication.py`
- [Cipher library](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/encryption_utils.py): `scripts/encryption_utils.py`
- [Byte conversion](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/byte_utils.py): `scripts/byte_utils.py`
- [Message framing](https://github.com/chaganti997/secure-biometric-file-tranfer/blob/main/scripts/utils.py): `scripts/utils.py`

### Other components

- **User**
- **TCP peer**

## Connections

- User → Client CLI: enters commands (evidence: `scripts/client.py`)
- Client CLI → Client commands: runs commands (evidence: `scripts/client.py`)
- Client CLI → Authentication: authenticates (evidence: `scripts/client.py`)
- Client commands → TCP peer: sends requests (evidence: `scripts/client_backend.py`)
- Client commands → Local files: reads and writes (evidence: `scripts/client_backend.py`)
- Client commands → Cipher library: encrypts files (evidence: `scripts/client_backend.py`)
- Client commands → Byte conversion: converts payloads (evidence: `scripts/client_backend.py`)
- Client commands → Message framing: frames messages (evidence: `scripts/client_backend.py`)
- Server listener → Server commands: receives commands (evidence: `scripts/server.py`)
- Server listener → Authentication: authenticates peers (evidence: `scripts/server.py`)
- Server listener → Message framing: receives responses (evidence: `scripts/server.py`)
- Server commands → TCP peer: handles requests
- Server commands → Server files: reads and writes (evidence: `scripts/server_backend.py`)
- Server commands → Cipher library: encrypts files (evidence: `scripts/server_backend.py`)
- Server commands → Byte conversion: converts payloads (evidence: `scripts/server_backend.py`)
- Server commands → Message framing: frames messages (evidence: `scripts/server_backend.py`)
- Authentication → Client commands: formats auth request (evidence: `scripts/authentication.py`)
- Authentication → Byte conversion: encodes auth messages (evidence: `scripts/authentication.py`)
- Authentication → Message framing: exchanges auth messages (evidence: `scripts/authentication.py`)
- Authentication → Cipher library: uses crypto support (evidence: `scripts/authentication.py`)
- Cipher library → Byte conversion: normalizes data (evidence: `scripts/encryption_utils.py`)
