bitchat README

The project's README from github.com/permissionlesstech/bitchat. As one markdown file: README.md.

icon_128x128@2x

bitchat

A decentralized peer-to-peer messaging app with dual transport architecture: local Bluetooth mesh networks for offline communication and internet-based Nostr protocol for global reach. No accounts, no phone numbers, no central servers. It's the side-groupchat.

bitchat.free

📲 App Store

📲 Play Store

Getting a copy you can trust

Install from the App Store, or build from source you have verified. A compiled build from anywhere else cannot be verified — see Verifying bitchat for how to check source against the per-release hash manifest, and for what to do if that is the only build you can get.

This matters more than it usually would: this repository has been the target of takedown demands, and when a repository or releases page disappears, mirrors appear that nobody can check.

License

This project is released into the public domain. See the LICENSE file for details.

Features

Technical Architecture

BitChat uses a hybrid messaging architecture with two complementary transport layers:

Bluetooth Mesh Network (Offline)

Nostr Protocol (Internet)

BitChat's private-envelope format is proprietary and is not NIP-17, NIP-44, or NIP-59 compatible. It uses Nostr as a relay transport but only interoperates with BitChat clients: private payloads travel inside kind-1059 events whose v2:-prefixed content is a BitChat-specific XChaCha20-Poly1305 construction, not NIP-44 encryption.

Channel Types

mesh #bluetooth

Location Channels (block #dr5rsj7, neighborhood #dr5rs, country #dr)

Direct Message Routing

Private messages use intelligent transport selection:

  1. Bluetooth First (preferred when available)

    • Direct connection with established Noise session
    • Fastest and most private option
  2. Nostr Fallback (when Bluetooth unavailable)

    • Uses recipient's Nostr public key
    • BitChat's app-specific private-envelope encryption
    • Routes through global relay network
  3. Smart Queuing (when neither available)

    • Messages queued until transport becomes available
    • Automatic delivery when connection established

For detailed protocol documentation, see the Technical Whitepaper.

Setup

Option 1: Using Xcode

open bitchat.xcodeproj

For a signed device build, create your ignored local configuration and replace the example team ID with your Apple Developer Team ID:

cp Configs/Local.xcconfig.example Configs/Local.xcconfig

Local.xcconfig.example derives unique app and App Group identifiers from that team ID. The entitlement files already reference $(APP_GROUP_ID), so tracked project or entitlement files do not need to be edited.

Useful command-line checks from the repository root:

# macOS Debug build without signing
xcodebuild -project bitchat.xcodeproj -scheme "bitchat (macOS)" \
  -configuration Debug CODE_SIGNING_ALLOWED=NO build

# Full SwiftPM test suite
swift test

# iOS simulator tests
xcodebuild -project bitchat.xcodeproj -scheme "bitchat (iOS)" \
  -sdk iphonesimulator \
  -destination 'platform=iOS Simulator,name=iPhone 17' test

If iPhone 17 is unavailable, choose an installed simulator from:

xcodebuild -showdestinations -project bitchat.xcodeproj -scheme "bitchat (iOS)"

Option 2: Using just

brew install just
just check
just run

just build and just run use the current bitchat (macOS) scheme and keep Xcode output in the ignored .DerivedData/ directory. They never patch source, project, configuration, or entitlement files.

just clean removes only .DerivedData/ and .build/. It does not invoke Git or restore tracked files, so uncommitted work is preserved. just test runs the SwiftPM suite and just test-ios runs the iPhone 17 simulator suite.

Localization

bitchat (permissionlesstech/bitchat)

Searching Database…

36.6K ·GitHub
这是什么?BitChat 是一款去中心化的点对点聊天应用,通过蓝牙网状网络实现离线的本地聊天,并通过 Nostr 协议实现基于互联网的全球连接,无需账号、手机号或中心服务器。
这是一个聊天应用,还是我可以基于它开发的协议或库?它是一款成品原生应用,适用于 iOS 和 macOS,不是库或 SDK。你可以直接安装并运行,内置了类似 IRC 的命令,比如 /slap 和 /msg。
我该怎么把它运行起来?可以从 App Store 或 Play Store 安装,也可以用 Xcode 从源代码构建(需填入你自己的 Apple Developer Team ID),或者使用 'just' 命令运行器(just build、just run),它会封装 Xcode 的构建过程。
网上找到的任何构建版本都可以放心用吗?不可以。只有 App Store 的版本,或你亲自对照发布哈希清单验证过的源代码才可信,因为该代码仓库曾收到下架要求,其他地方也出现过无法验证的镜像版本。
完全没有网络的情况下,它真的能用吗?可以。蓝牙网状网络传输层完全离线工作,消息通过附近的设备点对点转发,最多可经过 7 跳,因此在灾难现场或没有网络覆盖的地区也能使用。
网状网络会留下能识别我身份的痕迹吗?应用不需要账号和手机号,但每台设备都会保存一个由其身份密钥派生的持久标识符,附近的无线电设备可能观察到它。另外,存储转发类消息不具备前向保密。
对于一条消息,它如何决定使用蓝牙还是 Nostr?当可以建立直连的 Noise 加密会话时,它优先使用蓝牙(最快,也最私密);蓝牙不可用时,则使用接收方的公钥通过 Nostr 发送;如果两种传输方式都无法连通,则将消息排队,等待自动送达。
什么是基于位置的频道?它们是基于 Nostr 中继服务器上的 geohash 坐标建立的地理聊天室,精度从城市街区级(#dr5rsj7)到国家或地区级(#dr)不等,让用户无需蓝牙范围即可加入本地或区域讨论。
BitChat 的加密与其他 Nostr 客户端兼容吗?不兼容。BitChat 的私密信封格式是专有的,在 kind-1059 事件中使用 BitChat 专属的 XChaCha20-Poly1305 结构,而不是标准的 NIP-44 加密,因此它只能与其他 BitChat 客户端互通,尽管它运行在 Nostr 中继服务器之上。
如果我触发紧急擦除会怎样?三击即可立即清除设备上的所有本地数据,适用于在抗议活动等敏感场合快速保护信息。
Size
113.6 MB
Stars
36.6K
Age
1y
Commits · 90 Days