Repository navigation
mChat
mChat is a native iOS chat app built on the Nostr protocol — a privacy-first, open messaging system with no central server and no phone number required. Identity is a cryptographic keypair.
mChatCore is the underlying Swift library that implements the Nostr protocol. It is the shared communication backbone for the entire HomeNode ecosystem — used by the iOS app, the HomeNode Agent, and any future component that needs to exchange messages.
mChatCore is not just a chat library — it is the universal message bus that connects humans and agents:
mChat (iOS) ←── users chat with each other
HomeNode Agent ←── bot participates in group chats
Future components ←── any Nostr identity can join
│
└──► Nostr Relay ──► delivered to all participants
A mChat group chat can include both human users and the HomeNode Agent bot. The Agent sends home automation notifications and responds to natural language commands — all within the same conversation.
- Cryptographic identity — secp256k1 keypair, stored in iOS Keychain
- 1:1 encrypted messaging — NIP-04 (AES-256-CBC + ECDH)
- Group chat — NIP-28 channel support
- Multi-relay — broadcasts to multiple independent relays simultaneously
- iOS Contacts integration — link Nostr pubkeys to address book entries
- Local persistence — full message history via SwiftData
-
NostrKeyPair— secp256k1 identity generation and signing -
NostrBackend— connects to relays, sends and receives events -
MessagingBackendprotocol — abstraction for adding future protocols (Matrix, XMPP, SimpleX) - NIP-04 encryption — cross-platform (iOS, macOS, Linux)
-
mCLIChat— command-line client for testing and server-side use (Linux-compatible)
mCLIChat is an interactive command-line executable built from mChatCore. It runs on Linux and is the foundation for the HomeNode Agent's Nostr connectivity — the Agent uses the same library to connect to relays and participate in group chats.
| Repository | Description |
|---|---|
| zehrer/mChat | iOS app + mChatCore Swift package |
- Architecture — full system diagram
- HomeNode Agent — uses mChatCore to participate in group chats
- mHomeNode — iOS companion app for device control
(c) Stephan Zehrer 2025