{"id":15641672,"url":"https://github.com/fwcd/distributed-chat","last_synced_at":"2025-04-09T16:12:26.157Z","repository":{"id":54508485,"uuid":"330292909","full_name":"fwcd/distributed-chat","owner":"fwcd","description":"Distributed peer-to-peer messaging app using Bluetooth LE mesh networks","archived":false,"fork":false,"pushed_at":"2024-09-03T18:05:22.000Z","size":1148,"stargazers_count":80,"open_issues_count":8,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-09T16:12:06.997Z","etag":null,"topics":["bluetooth","bluetooth-le","bluetooth-low-energy","chat","distributed-systems","ios","linux","mesh-networks","vapor"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fwcd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-17T01:36:47.000Z","updated_at":"2025-03-04T06:26:00.000Z","dependencies_parsed_at":"2024-10-22T22:58:02.623Z","dependency_job_id":null,"html_url":"https://github.com/fwcd/distributed-chat","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fdistributed-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fdistributed-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fdistributed-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fdistributed-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fwcd","download_url":"https://codeload.github.com/fwcd/distributed-chat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065283,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bluetooth","bluetooth-le","bluetooth-low-energy","chat","distributed-systems","ios","linux","mesh-networks","vapor"],"created_at":"2024-10-03T11:44:26.855Z","updated_at":"2025-04-09T16:12:26.097Z","avatar_url":"https://github.com/fwcd.png","language":"Swift","readme":"# Distributed Chat\n\n[![Kit](https://github.com/fwcd/distributed-chat/actions/workflows/kit.yml/badge.svg)](https://github.com/fwcd/distributed-chat/actions/workflows/kit.yml)\n[![Bluetooth](https://github.com/fwcd/distributed-chat/actions/workflows/bluetooth.yml/badge.svg)](https://github.com/fwcd/distributed-chat/actions/workflows/bluetooth.yml)\n[![App](https://github.com/fwcd/distributed-chat/actions/workflows/app.yml/badge.svg)](https://github.com/fwcd/distributed-chat/actions/workflows/app.yml)\n[![CLI](https://github.com/fwcd/distributed-chat/actions/workflows/cli.yml/badge.svg)](https://github.com/fwcd/distributed-chat/actions/workflows/cli.yml)\n[![Simulation Protocol](https://github.com/fwcd/distributed-chat/actions/workflows/simulation-protocol.yml/badge.svg)](https://github.com/fwcd/distributed-chat/actions/workflows/simulation-protocol.yml)\n[![Simulation Server](https://github.com/fwcd/distributed-chat/actions/workflows/simulation-server.yml/badge.svg)](https://github.com/fwcd/distributed-chat/actions/workflows/simulation-server.yml)\n\n\u003cdiv align=\"center\"\u003e\n\u003cp\u003e\n\u003cimg alt=\"Logo\" src=\"Images/logo.svg\" width=\"200\"\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n\u003cimg alt=\"Lock Screen Screenshot\" src=\"Images/lockscreen.png\" width=\"140\"\u003e\n\u003cimg alt=\"Channels Screen Screenshot\" src=\"Images/channels.png\" width=\"140\"\u003e\n\u003cimg alt=\"Channel Screenshot\" src=\"Images/channel.png\" width=\"140\"\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\nA distributed chat messenger that uses Bluetooth LE mesh networks.\n\n* Fully decentralized architecture, no server or Internet connection required\n* Message caching, delayed transmission\n* Public and private end-to-end-encrypted messaging channels\n* Voice messages, image, file and contact attachments\n* Full simulation environment with configurable nodes, links and much more included\n* Cross-platform, portable core\n\n## Components\n\nThe project consists of the following components:\n\n* `DistributedChatKit`: The abstract application, platform-independent, transport-independent (uses interface for broadcasting/receiving messages)\n* `DistributedChatBluetooth`: An abstraction over platform-specific Bluetooth LE transports\n* `DistributedChatApp`: The iOS/macOS implementation, uses Bluetooth LE as transport, does **not** require a server\n* `DistributedChatCLI`: The CLI implementation, uses either HTTP/WebSockets as transport with the simulation server or Bluetooth LE (WIP)\n* `DistributedChatSimulationProtocol`: The high-level JSON-based protocol used between CLI and simulation server\n* `DistributedChatSimulationServer`: The companion server for the CLI, relays messages between connected CLI nodes, provides web-interface for configuring links between nodes\n* `Scripts`: Scripts for launching CLI instances conveniently and for testing the BLE transport\n\nThe dependency graph between these packages looks like this:\n\n```mermaid\n%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%%\nflowchart BT\n    subgraph cross-platform\n        DistributedChatBluetooth --\u003e DistributedChatKit\n        DistributedChatCLI --\u003e DistributedChatKit\n        DistributedChatCLI --\u003e DistributedChatBluetooth\n        DistributedChatCLI --\u003e DistributedChatSimulationProtocol\n        DistributedChatSimulationServer --\u003e DistributedChatSimulationProtocol\n    end\n    subgraph \"Apple platforms\"\n        DistributedChatApp --\u003e DistributedChatKit\n        DistributedChatApp --\u003e DistributedChatBluetooth\n    end\n```\n\n## Building and Running\n\nFirst, make sure to have Swift 5.10+ or newer installed. Recent versions for Ubuntu and macOS can be found [here](https://swift.org/download/).\n\n### Simulation Server\n\nTo run the simulation server, navigate into the directory `DistributedChatSimulationServer` and execute:\n\n```sh\nswift run\n```\n\nThe web interface should now be accessible at `http://localhost:8080`.\n\n### CLI\n\nTo start a single instance of the CLI, make sure that the simulation server is running, navigate into `DistributedChatCLI` and execute:\n\n```sh\nswift run distributed-chat --name Alice\n```\n\nYou can substitute any name for Alice. Once the CLI has started, the chosen name should show up as a node in the simulation server's web interface.\n\nFor convenience, there is a bash script for starting multiple instances of the CLI together in a single `tmux` session. To use it, navigate into the root directory of this repository and run\n\n```sh\nScripts/start_clis Alice Bob Charles Dave\n```\n\n...or however many clients you want to start. To stop all clients at once, press `Ctrl + B` then type `:kill-session` and press enter.\n\n### iOS app\n\nBuilding and running the iOS app is only possible on macOS, so make sure to have the following available:\n\n* Xcode 15.4+\n* Swift 5.10+ (should be included with Xcode)\n* optionally an iOS device\n\nThe open the `DistributedChatApp` subdirectory in Xcode and build/run the project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fdistributed-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffwcd%2Fdistributed-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fdistributed-chat/lists"}