# yaswanthkumarmallela01/filedrop architecture

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

- Interactive diagram: https://gitdiagram.com/yaswanthkumarmallela01/filedrop
- Repository: https://github.com/yaswanthkumarmallela01/filedrop

## Overview

FileDrop is a local-network file-transfer application: users receive files through a laptop-hosted browser interface, send files to discovered peers, share selected files through expiring links, or synchronize folders. Its Rust CLI coordinates transfer, security, discovery, hotspot setup, and terminal UI components. The graph includes README-documented capabilities whose internals were not sampled; those relationships are documented rather than inferred from module names.

Main entry points: [`src/main.rs`](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/main.rs) (CLI commands), [`src/transfer/server.rs`](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/server.rs) (Receive server), [`src/transfer/client.rs`](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/client.rs) (Send client), [`src/tui/app.rs`](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/tui/app.rs) (Terminal UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_cli["CLI commands<br/>[main.rs]"]
  node_tui["Terminal UI<br/>[app.rs]"]
  node_config["Configuration<br/>[config.rs]"]
end

subgraph group_transfer["File transfer"]
  node_receiver["Receive server<br/>[server.rs]"]
  node_webui["Browser interface<br/>[mod.rs]"]
  node_sender["Send client<br/>[client.rs]"]
  node_protocol["Transfer protocol<br/>[protocol.rs]"]
  node_chunks["Chunking and checksums<br/>[chunker.rs]"]
end

subgraph group_connect["Connectivity"]
  node_discovery["Peer discovery<br/>[mod.rs]"]
  node_hotspot["Hotspot setup<br/>[mod.rs]"]
end

subgraph group_security["Security"]
  node_certs["Device certificates<br/>[certs.rs]"]
  node_pairing["Device pairing<br/>[pairing.rs]"]
  node_encryption["Encryption<br/>[encryption.rs]"]
end

subgraph group_extras["Sharing and sync"]
  node_share["Ephemeral file sharing<br/>[server.rs]"]
  node_sync["Folder sync<br/>[server.rs]"]
  node_watcher["Change watcher<br/>[watcher.rs]"]
end

node_user(("User"))
node_phone(("Phone browser"))

node_user -->|"runs commands"| node_cli
node_cli -->|"loads settings"| node_config
node_cli -->|"opens interface"| node_tui
node_cli -->|"starts receiver"| node_receiver
node_cli -->|"starts send"| node_sender
node_cli -->|"starts sharing"| node_share
node_cli -->|"starts sync"| node_sync
node_cli -->|"pairs devices"| node_pairing
node_cli -->|"sets up hotspot"| node_hotspot
node_receiver -->|"serves UI"| node_webui
node_phone -->|"opens transfer page"| node_webui
node_webui -->|"connects by WebSocket"| node_receiver
node_sender -->|"encodes messages"| node_protocol
node_sender -->|"hashes and streams"| node_chunks
node_sender -->|"discovers peer"| node_discovery
node_receiver -->|"parses messages"| node_protocol
node_receiver -->|"writes and verifies"| node_chunks
node_pairing -->|"exchanges certificates"| node_certs
node_certs -->|"uses config paths"| node_config
node_tui -->|"runs receive mode"| node_receiver
node_tui -->|"queues file sends"| node_sender
node_tui -->|"creates hotspot"| node_hotspot
node_sync -->|"watches folder"| node_watcher
node_user -->|"scans QR code"| node_phone
node_receiver -.->|"uses encryption"| node_encryption

click node_cli "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/main.rs"
click node_tui "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/tui/app.rs"
click node_config "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/config.rs"
click node_receiver "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/server.rs"
click node_webui "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/web/mod.rs"
click node_sender "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/client.rs"
click node_protocol "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/protocol.rs"
click node_chunks "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/chunker.rs"
click node_discovery "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/discovery/mod.rs"
click node_hotspot "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/hotspot/mod.rs"
click node_certs "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/security/certs.rs"
click node_pairing "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/security/pairing.rs"
click node_encryption "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/security/encryption.rs"
click node_share "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/share/server.rs"
click node_sync "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/sync/server.rs"
click node_watcher "https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/sync/watcher.rs"

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_cli,node_tui,node_config,node_user,node_phone toneBlue
class node_receiver,node_webui,node_sender,node_protocol,node_chunks toneAmber
class node_discovery,node_hotspot toneMint
class node_certs,node_pairing,node_encryption toneRose
class node_share,node_sync,node_watcher toneIndigo
```

## Components

### User entry

- [CLI commands](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/main.rs): `src/main.rs`
- [Terminal UI](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/tui/app.rs): `src/tui/app.rs`
- [Configuration](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/config.rs): `src/config.rs`

### File transfer

- [Receive server](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/server.rs): `src/transfer/server.rs`
- [Browser interface](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/web/mod.rs): `src/web/mod.rs`
- [Send client](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/client.rs): `src/transfer/client.rs`
- [Transfer protocol](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/protocol.rs): `src/transfer/protocol.rs`
- [Chunking and checksums](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/transfer/chunker.rs): `src/transfer/chunker.rs`

### Connectivity

- [Peer discovery](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/discovery/mod.rs): `src/discovery/mod.rs`
- [Hotspot setup](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/hotspot/mod.rs): `src/hotspot/mod.rs`

### Security

- [Device certificates](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/security/certs.rs): `src/security/certs.rs`
- [Device pairing](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/security/pairing.rs): `src/security/pairing.rs`
- [Encryption](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/security/encryption.rs): `src/security/encryption.rs`

### Sharing and sync

- [Ephemeral file sharing](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/share/server.rs): `src/share/server.rs`
- [Folder sync](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/sync/server.rs): `src/sync/server.rs`
- [Change watcher](https://github.com/yaswanthkumarmallela01/filedrop/blob/master/src/sync/watcher.rs): `src/sync/watcher.rs`

### Other components

- **User**
- **Phone browser**

## Connections

- User → CLI commands: runs commands (evidence: `README.md`)
- CLI commands → Configuration: loads settings (evidence: `src/main.rs`)
- CLI commands → Terminal UI: opens interface (evidence: `src/main.rs`)
- CLI commands → Receive server: starts receiver (evidence: `README.md`)
- CLI commands → Send client: starts send (evidence: `README.md`)
- CLI commands → Ephemeral file sharing: starts sharing (evidence: `README.md`)
- CLI commands → Folder sync: starts sync (evidence: `README.md`)
- CLI commands → Device pairing: pairs devices (evidence: `README.md`)
- CLI commands → Hotspot setup: sets up hotspot (evidence: `src/main.rs`)
- Receive server → Browser interface: serves UI (evidence: `src/transfer/server.rs`)
- Phone browser → Browser interface: opens transfer page (evidence: `README.md`)
- Browser interface → Receive server: connects by WebSocket (evidence: `src/web/mod.rs`)
- Send client → Transfer protocol: encodes messages (evidence: `src/transfer/client.rs`)
- Send client → Chunking and checksums: hashes and streams (evidence: `src/transfer/client.rs`)
- Send client → Peer discovery: discovers peer (evidence: `src/transfer/client.rs`)
- Receive server → Transfer protocol: parses messages (evidence: `src/transfer/server.rs`)
- Receive server → Chunking and checksums: writes and verifies (evidence: `src/transfer/server.rs`)
- Device pairing → Device certificates: exchanges certificates (evidence: `src/security/pairing.rs`)
- Device certificates → Configuration: uses config paths (evidence: `src/security/certs.rs`)
- Terminal UI → Receive server: runs receive mode (evidence: `src/tui/app.rs`)
- Terminal UI → Send client: queues file sends (evidence: `src/tui/app.rs`)
- Terminal UI → Hotspot setup: creates hotspot (evidence: `src/tui/app.rs`)
- Folder sync → Change watcher: watches folder (evidence: `src/sync/server.rs`)
- User → Phone browser: scans QR code (evidence: `README.md`)
- Receive server → Encryption: uses encryption
