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