Quickstart: Build an app with XMTP
This quickstart provides a map to building a secure messaging app with XMTP, including support for:
- End-to-end encrypted direct message and group chat conversations
- Rich content types (attachments, reactions, replies, and more)
- Real-time push notifications
- Spam-free inboxes using user consent preferences
🏗️ Phase I: Setup
-
Select the XMTP SDK that matches your platform.
-
Mobile development
-
Web development
- Browser SDK (for web apps)
- Node SDK (for servers)
Need an SDK for a different platform? Let us know in Ideas & Improvements in the XMTP Community Forums.
-
-
Run a local XMTP node for development and testing.
-
You can use llms-full.txt to provide the full text of the XMTP developer documentation to an AI coding assistant.
💬 Phase II: Build core messaging
-
Create a group chat or direct message (DM) conversation.
With XMTP, "conversation" refers to both group chat and DM conversations.
-
Send messages in a conversation.
-
Manage group chat permissions and metadata.
📩 Phase III: Manage conversations and messages
-
List existing conversations from local storage.
-
Stream new conversations from the network.
-
Stream new messages from the network.
-
Sync new conversations from the network.
-
Sync a specific conversation's messages and preference updates from the network.
💅🏽 Phase IV: Enhance the user experience
-
Implement user consent, which provides a consent value of either unknown, allowed or denied to each of a user's contacts. You can use these consent values to filter conversations. For example:
- Conversations with allowed contacts go to a user's main inbox
- Conversations with unknown contacts go to a possible spam tab
- Conversations with denied contacts are hidden from view.
-
Support rich content types.
- Attachments
- Single remote attachment
- Multiple remote attachments
- Attachments smaller than 1MB
- Reactions
- Replies
- Read receipts
- Onchain transaction references
- Attachments
🧪 Phase V: Test and debug
-
Stress and burn-in test your inbox app.
-
Found a bug or need support? Please file an issue in the relevant SDK repo: