A family chat app with its own server at home, connected over iroh, and the project I'm learning Rust with.
Tribe is built for one family and will be shared over TestFlight, not the App Store. The Rust hub and a command-line client work today: members join with an invite link, the hub tracks who's connected, and the owner manages it all through a local admin API. The iPhone app comes next.
Highlights at a Glance#
DMs and an Everyone Room
Join with One Tap
End-to-End Encrypted
Push That Decrypts on the Phone
AI Personas
A Home Server, No Port Forwarding
Why Tribe?#
No real reason, honestly. Everybody in my family is in the Apple ecosystem and iMessage is fine. Not really scriptable and extensible, but fine. I don’t have major privacy needs or concerns. And to be frank, it will be hard to convince my family to even install this new chat app, let alone use it. But then again, I always wanted a “lightweight family Slack” that also supports bots and scripts but preserves privacy.
Tribe is my attempt at that:
- A chat that’s ours: one small server at home that we control, with nothing in anyone else’s cloud but encrypted push notifications.
- AI that’s part of the family chat: a coding helper, a recipe assistant, or a grocery-list helper that sits in the contact list next to my wife, with a system prompt I write, instead of yet another app.
- No setup for the family: install the app, tap a link, done.
And last but not least, I wanted a real project as a vehicle to learn Rust. The hub is written in Rust, one exercise at a time, with Claude as my mentor and reviewer.
How It Works#
1. The Hub#
The hub is a Rust program that runs all the time on a Mac at home. It has an identity (a key) instead of an address, and every phone keeps one connection to it while the app is open. Since iOS suspends apps shortly after they leave the screen, two phones are rarely online at the same moment, so every message goes through the hub: delivered at once if the recipient is connected, otherwise queued, with a push notification.
2. Joining#
The owner runs tribe-hub invite --label Mom and sends the link it prints. The link’s secret is in the #fragment, which browsers and iMessage previews never send to a server, so it only ever exists in the message, on the phone, and at the hub. It works once and expires after a week.
3. Messages#
Each message is sealed to its recipient’s key and sent to the hub, which stores it until the recipient’s phone confirms it has it. A message to the Everyone room is sealed once per member. Delivery shows the usual ✓ (the hub has it) and ✓✓ (it arrived).
4. Personas#
Messages to a persona stop at the hub, which sends the conversation to the Claude API and streams the reply back into the chat. Each persona is a folder with a persona.toml and a system.md, so adding one is editing two small files.
Privacy#
- What the hub sees: who messages whom, when, and how large each message is. It needs that much to route and queue.
- What it can’t see: the content of messages between people, and it can’t forge them.
- Personas are the exception: the hub is every persona, so it reads what members send to them and sends it to the Claude API to answer. The admin interface deliberately has no way to show those conversations.
- Keys are pinned: each phone remembers every member’s key the first time it sees it and warns if it ever changes, so a compromised hub can’t quietly swap in a key of its own.
- Admin stays private: the hub’s admin API listens only on the Mac itself; remote admin goes through Tailscale.
Technology Stack#
- Hub & CLI: Rust, tokio, iroh, axum (admin API), SQLite via rusqlite
- iPhone App: Swift and SwiftUI, iroh through its Swift bindings, CryptoKit for HPKE
- Notifications: APNs, with a Notification Service Extension that decrypts on the device
- Personas: the Claude Messages API, streamed
- Targets: iOS 27+, hub on macOS 27+ (Apple Silicon)
Following Along#
I write about learning Rust on this project in the Crab Walks series.