From ea7e2cf60597b2b5b6262254c6d0fe7ae3b7a478 Mon Sep 17 00:00:00 2001 From: Tien Do Nam Date: Sat, 18 Jul 2026 02:21:58 +0200 Subject: [PATCH] docs: add dependency diagram --- README.md | 14 +- support/docs/README.md | 7 + support/docs/dependency-hierarchy.d2 | 116 ++++ support/docs/dependency-hierarchy.svg | 961 ++++++++++++++++++++++++++ 4 files changed, 1089 insertions(+), 9 deletions(-) create mode 100644 support/docs/README.md create mode 100644 support/docs/dependency-hierarchy.d2 create mode 100644 support/docs/dependency-hierarchy.svg diff --git a/README.md b/README.md index 920520cf..3dba850b 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ LocalSend is a free, open-source app that allows you to securely share files and messages with nearby devices over your local network without needing an internet connection. - [About](#about) -- [Sponsors](#sponsors) - [Screenshots](#screenshots) - [Download](#download) - [How It Works](#how-it-works) +- [Dependency Hierarchy](#dependency-hierarchy) - [Getting Started](#getting-started) - [Contributing](#contributing) - [Translation](#translation) @@ -43,14 +43,6 @@ LocalSend is a free, open-source app that allows you to securely share files and LocalSend is a cross-platform app that enables secure communication between devices using a REST API and HTTPS encryption. Unlike other messaging apps that rely on external servers, LocalSend doesn't require an internet connection or third-party servers, making it a fast and reliable solution for local communication. -## Sponsors - -Browser testing via - - - - - ## Screenshots iPhone screenshot PC screenshot @@ -136,6 +128,10 @@ LocalSend uses a secure communication protocol that allows devices to communicat For more information on the LocalSend Protocol, see the [documentation](https://github.com/localsend/protocol). +## Dependency Hierarchy + +![Dependency hierarchy](support/docs/dependency-hierarchy.svg) + ## Getting Started To compile LocalSend from the source code, follow these steps: diff --git a/support/docs/README.md b/support/docs/README.md new file mode 100644 index 00000000..0f31933f --- /dev/null +++ b/support/docs/README.md @@ -0,0 +1,7 @@ +# Dependency Diagram + +From the repository root, generate the SVG with [D2](https://d2lang.com): + +```sh +d2 --theme 4 --dark-theme 200 --layout elk --pad 32 support/docs/dependency-hierarchy.d2 support/docs/dependency-hierarchy.svg +``` diff --git a/support/docs/dependency-hierarchy.d2 b/support/docs/dependency-hierarchy.d2 new file mode 100644 index 00000000..3afcbbe5 --- /dev/null +++ b/support/docs/dependency-hierarchy.d2 @@ -0,0 +1,116 @@ +# Render with: +# d2 --theme 4 --dark-theme 200 --layout elk --pad 32 support/docs/dependency-hierarchy.d2 support/docs/dependency-hierarchy.svg + +direction: down + +classes: { + card: { + shape: text + } +} + +consumers: "" { + direction: right + style: { + border-radius: 16 + stroke-dash: 4 + } + + app: ||md + + + + + + + + + + + +
App
Dart/Flutter
/app/
Cross-platform App
+ || { + class: card + } + + cli: ||md + + + + + + + + + + + +
CLI
Rust
/cli/
Command line interface
+ || { + class: card + } + + server: ||md + + + + + + + + + + + +
Server
Rust
/server/
WebRTC signaling server
+ || { + class: card + } +} + +localsend_isolates: ||md + + + + + + + + + + + +
LocalSend Isolates
Dart + Rust
/packages/localsend_isolates/
Background thread and Rust bindings
+|| { + class: card +} + +core: ||md + + + + + + + + + + + +
Core
Rust
/packages/core/
Library implementing the LocalSend protocol
+|| { + class: card +} + +core_hub: "" { + shape: circle + width: 1 + height: 1 + style.opacity: 0 +} + +consumers.app -> localsend_isolates +consumers.cli -- core_hub +consumers.server -- core_hub +localsend_isolates -- core_hub +core_hub -> core diff --git a/support/docs/dependency-hierarchy.svg b/support/docs/dependency-hierarchy.svg new file mode 100644 index 00000000..84378662 --- /dev/null +++ b/support/docs/dependency-hierarchy.svg @@ -0,0 +1,961 @@ +
+ + + + + + + + + + +
LocalSend Isolates
Dart + Rust
/packages/localsend_isolates/
Background thread and Rust bindings
+ + + + + + + + + + +
Core
Rust
/packages/core/
Library implementing the LocalSend protocol
+ + + + + + + + + + +
App
Dart/Flutter
/app/
Cross-platform App
+ + + + + + + + + + +
CLI
Rust
/cli/
Command line interface
+ + + + + + + + + + +
Server
Rust
/server/
WebRTC signaling server
+ + +