# shubhankarraj9/flutter-projects architecture

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

- Interactive diagram: https://gitdiagram.com/shubhankarraj9/flutter-projects
- Repository: https://github.com/shubhankarraj9/flutter-projects

## Overview

The tree contains three projects, but only LocalSend has a substantial runtime visible here: a cross-platform Flutter app, Rust networking/transfer code, and a WebSocket signaling server. The principal workflow is peer discovery/signaling followed by a WebRTC connection and file transfer; the core also includes HTTP transfer and certificate/token verification. Attendance and meals show platform launch shells only, and the README provides no product detail. App-side Dart wiring and several core/server implementations were not sampled, so those links are omitted rather than inferred.

Main entry points: [`localsend-main/server/src/controller/ws_controller.rs`](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/controller/ws_controller.rs) (Peer signaling handler), [`localsend-main/core/src/webrtc/webrtc.rs`](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/webrtc/webrtc.rs) (WebRTC transfer), [`localsend-main/core/src/http/client/mod.rs`](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/http/client/mod.rs) (HTTP client), [`localsend-main/app`](https://github.com/shubhankarraj9/flutter-projects/tree/main/localsend-main/app) (Flutter client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["LocalSend app"]
  node_flutter["Flutter client"]
  node_rust_api["Rust bridge API"]
  node_bridge["Flutter Rust bridge<br/>[frb_generated.rs]"]
end

subgraph group_core["Networking core"]
  node_http_client["HTTP client<br/>[mod.rs]"]
  node_http_server["HTTP transfer server"]
  node_discovery["Peer discovery<br/>[discovery.rs]"]
  node_signaling["WebRTC signaling<br/>[signaling.rs]"]
  node_webrtc["WebRTC transfer<br/>[webrtc.rs]"]
  node_transfer_model["Transfer model<br/>[transfer.rs]"]
  node_token_crypto["Token cryptography<br/>[token.rs]"]
  node_cert_crypto["Certificate validation<br/>[cert.rs]"]
  node_cert_verifier["TLS client verifier"]
end

subgraph group_server["Signaling server"]
  node_server_routes["WebSocket route<br/>[main.rs]"]
  node_ws_controller["Peer signaling handler<br/>[ws_controller.rs]"]
  node_server_state["Connection state<br/>[state.rs]"]
  node_ip_group["IP grouping<br/>[ip.rs]"]
end

node_user(("User"))
node_peer(("Remote peer"))

node_user -.->|"uses"| node_flutter
node_flutter -.->|"invokes"| node_rust_api
node_rust_api -.->|"bridges through"| node_bridge
node_http_client -->|"sends HTTP"| node_peer
node_http_client -->|"verifies tokens"| node_token_crypto
node_http_server -->|"uses verifier"| node_cert_verifier
node_cert_verifier -->|"validates certificate"| node_cert_crypto
node_signaling -->|"uses peer model"| node_discovery
node_webrtc -->|"exchanges SDP"| node_signaling
node_webrtc -->|"checks tokens"| node_token_crypto
node_webrtc -->|"uses file model"| node_transfer_model
node_server_routes -->|"routes to"| node_ws_controller
node_ws_controller -->|"updates state"| node_server_state
node_ws_controller -->|"groups peers"| node_ip_group
node_ws_controller -->|"relays signaling"| node_peer

click node_flutter "https://github.com/shubhankarraj9/flutter-projects/tree/main/localsend-main/app"
click node_rust_api "https://github.com/shubhankarraj9/flutter-projects/tree/main/localsend-main/app/rust/src/api"
click node_bridge "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/app/rust/src/frb_generated.rs"
click node_http_client "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/http/client/mod.rs"
click node_http_server "https://github.com/shubhankarraj9/flutter-projects/tree/main/localsend-main/core/src/http/server"
click node_discovery "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/model/discovery.rs"
click node_signaling "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/webrtc/signaling.rs"
click node_webrtc "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/webrtc/webrtc.rs"
click node_transfer_model "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/model/transfer.rs"
click node_token_crypto "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/crypto/token.rs"
click node_cert_crypto "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/crypto/cert.rs"
click node_cert_verifier "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/http/server/client_cert_verifier.rs"
click node_server_routes "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/main.rs"
click node_ws_controller "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/controller/ws_controller.rs"
click node_server_state "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/config/state.rs"
click node_ip_group "https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/util/ip.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_flutter,node_rust_api,node_bridge,node_user toneBlue
class node_http_client,node_http_server,node_discovery,node_signaling,node_webrtc,node_transfer_model,node_token_crypto,node_cert_crypto,node_cert_verifier toneAmber
class node_server_routes,node_ws_controller,node_server_state,node_ip_group toneMint
class node_peer toneIndigo
```

## Components

### LocalSend app

- [Flutter client](https://github.com/shubhankarraj9/flutter-projects/tree/main/localsend-main/app): `localsend-main/app`
- [Rust bridge API](https://github.com/shubhankarraj9/flutter-projects/tree/main/localsend-main/app/rust/src/api): `localsend-main/app/rust/src/api`
- [Flutter Rust bridge](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/app/rust/src/frb_generated.rs): `localsend-main/app/rust/src/frb_generated.rs`

### Networking core

- [HTTP client](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/http/client/mod.rs): `localsend-main/core/src/http/client/mod.rs`
- [HTTP transfer server](https://github.com/shubhankarraj9/flutter-projects/tree/main/localsend-main/core/src/http/server): `localsend-main/core/src/http/server`
- [Peer discovery](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/model/discovery.rs): `localsend-main/core/src/model/discovery.rs`
- [WebRTC signaling](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/webrtc/signaling.rs): `localsend-main/core/src/webrtc/signaling.rs`
- [WebRTC transfer](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/webrtc/webrtc.rs): `localsend-main/core/src/webrtc/webrtc.rs`
- [Transfer model](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/model/transfer.rs): `localsend-main/core/src/model/transfer.rs`
- [Token cryptography](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/crypto/token.rs): `localsend-main/core/src/crypto/token.rs`
- [Certificate validation](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/crypto/cert.rs): `localsend-main/core/src/crypto/cert.rs`
- [TLS client verifier](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/core/src/http/server/client_cert_verifier.rs): `localsend-main/core/src/http/server/client_cert_verifier.rs`

### Signaling server

- [WebSocket route](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/main.rs): `localsend-main/server/src/main.rs`
- [Peer signaling handler](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/controller/ws_controller.rs): `localsend-main/server/src/controller/ws_controller.rs`
- [Connection state](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/config/state.rs): `localsend-main/server/src/config/state.rs`
- [IP grouping](https://github.com/shubhankarraj9/flutter-projects/blob/main/localsend-main/server/src/util/ip.rs): `localsend-main/server/src/util/ip.rs`

### Other components

- **User**
- **Remote peer**

## Connections

- User → Flutter client: uses
- Flutter client → Rust bridge API: invokes
- Rust bridge API → Flutter Rust bridge: bridges through
- HTTP client → Remote peer: sends HTTP (evidence: `localsend-main/core/src/http/client/mod.rs`)
- HTTP client → Token cryptography: verifies tokens (evidence: `localsend-main/core/src/http/client/mod.rs`)
- HTTP transfer server → TLS client verifier: uses verifier (evidence: `localsend-main/core/src/http/server/client_cert_verifier.rs`)
- TLS client verifier → Certificate validation: validates certificate (evidence: `localsend-main/core/src/http/server/client_cert_verifier.rs`)
- WebRTC signaling → Peer discovery: uses peer model (evidence: `localsend-main/core/src/webrtc/signaling.rs`)
- WebRTC transfer → WebRTC signaling: exchanges SDP (evidence: `localsend-main/core/src/webrtc/webrtc.rs`)
- WebRTC transfer → Token cryptography: checks tokens (evidence: `localsend-main/core/src/webrtc/webrtc.rs`)
- WebRTC transfer → Transfer model: uses file model (evidence: `localsend-main/core/src/webrtc/webrtc.rs`)
- WebSocket route → Peer signaling handler: routes to (evidence: `localsend-main/server/src/main.rs`)
- Peer signaling handler → Connection state: updates state (evidence: `localsend-main/server/src/controller/ws_controller.rs`)
- Peer signaling handler → IP grouping: groups peers (evidence: `localsend-main/server/src/controller/ws_controller.rs`)
- Peer signaling handler → Remote peer: relays signaling (evidence: `localsend-main/server/src/controller/ws_controller.rs`)
