# kartikupadhyay0/unlimited_share architecture

> Architecture diagram of the GitHub repository kartikupadhyay0/unlimited_share, 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/kartikupadhyay0/unlimited_share
- Repository: https://github.com/kartikupadhyay0/unlimited_share

## Overview

Unlimited Share is a small secure P2P file-sharing app: a sender creates a room code, a receiver joins with it, and the server relays WebRTC signaling so the peers can establish a direct transfer. The server also serves the static app and cleans up sender-owned rooms on disconnect. The client file is present in the tree but its contents were not sampled, so client-side UI and transfer details are limited to what the product description and server events support.

Main entry points: [`public/index.html`](https://github.com/kartikupadhyay0/unlimited_share/blob/main/public/index.html) (Sharing app), [`server.js`](https://github.com/kartikupadhyay0/unlimited_share/blob/main/server.js) (Socket handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser clients"]
  node_client_app["Sharing app<br/>[index.html]"]
  node_peer_transfer["Peer transfer<br/>[index.html]"]
end

subgraph group_signaling["Room signaling"]
  node_socket_handlers["Socket handlers<br/>[server.js]"]
  node_room_registry[("Room registry<br/>[server.js]")]
end

subgraph group_runtime["Web runtime"]
  node_server["App server<br/>[server.js]"]
end

node_sender(("Sender"))
node_receiver(("Receiver"))

node_sender -->|"uses"| node_client_app
node_receiver -->|"uses"| node_client_app
node_client_app -->|"loads app"| node_server
node_client_app -->|"sends socket events"| node_socket_handlers
node_server -->|"dispatches events"| node_socket_handlers
node_socket_handlers -->|"reads and writes"| node_room_registry
node_socket_handlers -->|"notifies peers"| node_client_app
node_client_app -->|"uses signaling"| node_peer_transfer
node_peer_transfer -->|"transfers directly"| node_peer_transfer

click node_client_app "https://github.com/kartikupadhyay0/unlimited_share/blob/main/public/index.html"
click node_server "https://github.com/kartikupadhyay0/unlimited_share/blob/main/server.js"
click node_socket_handlers "https://github.com/kartikupadhyay0/unlimited_share/blob/main/server.js"
click node_room_registry "https://github.com/kartikupadhyay0/unlimited_share/blob/main/server.js"
click node_peer_transfer "https://github.com/kartikupadhyay0/unlimited_share/blob/main/public/index.html"

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_peer_transfer toneBlue
class node_socket_handlers,node_room_registry toneAmber
class node_server toneMint
class node_sender,node_receiver toneIndigo
```

## Components

### Browser clients

- [Sharing app](https://github.com/kartikupadhyay0/unlimited_share/blob/main/public/index.html): `public/index.html`
- [Peer transfer](https://github.com/kartikupadhyay0/unlimited_share/blob/main/public/index.html): `public/index.html`

### Room signaling

- [Socket handlers](https://github.com/kartikupadhyay0/unlimited_share/blob/main/server.js): `server.js`
- [Room registry](https://github.com/kartikupadhyay0/unlimited_share/blob/main/server.js): `server.js`

### Web runtime

- [App server](https://github.com/kartikupadhyay0/unlimited_share/blob/main/server.js): `server.js`

### Other components

- **Sender**
- **Receiver**

## Connections

- Sender → Sharing app: uses
- Receiver → Sharing app: uses
- Sharing app → App server: loads app
- Sharing app → Socket handlers: sends socket events
- App server → Socket handlers: dispatches events
- Socket handlers → Room registry: reads and writes
- Socket handlers → Sharing app: notifies peers
- Sharing app → Peer transfer: uses signaling
- Peer transfer → Peer transfer: transfers directly
