Aurora is a web3-based messaging application with integrated AI capabilities, built on top of the XMTP protocol.
Aurora is developed by FrostWire, a team of two undergraduate students participating in their first blockchain-based hackathon. The app is built with React and the XMTP client SDK for JavaScript (xmtp-js).
This project is a fork of the XMTP Inbox web chat app, customized and enhanced to include AI features. It demonstrates both core and advanced capabilities of the XMTP client SDK while showcasing innovative ways of building with XMTP and AI.
- Website: aurorawire.vercel.app
- Ethereum Address: aurorachat.eth
Aurora uses Infura to enable wallet apps to connect to the Ethereum blockchain.
Add your Infura API key to .env.local at the root of the project:
INFURA_ID={YOUR_INFURA_API_KEY}
To learn how to create an Infura API key, see Getting started in the Infura docs.
npm installnpm run devOpen http://localhost:5173 with your browser to see the app.
Aurora combines the power of web3 messaging with AI capabilities:
- Secure, decentralized messaging using the XMTP protocol
- AI-assisted conversations
- Web3 wallet integration for user authentication
You can now directly chat with the world's bleeding edge generative AI models, right in your messages. Want to appear more professional to your boss? Use the "Tone" setting to sound like a senior executive. Want to sound sad but can't care less? Use the "Tone" setting to sound like a depressed teenager. You can even use it to write your messages for you, if you're too lazy to do it yourself.
By default, the app code in this repo is set to send and receive messages using the XMTP dev network environment. Use the XMTP_ENVIRONMENT variable to change the network the app uses. Other available network environments include production and local.
XMTP may occasionally delete messages and keys from the dev network, and will provide advance notice in the XMTP Discord community. The production network is configured to store messages indefinitely.
XMTP Labs hosts the following deployments of the XMTP Inbox chat app:
- https://dev.xmtp.chat/ on the
devnetwork - https://xmtp.chat/ on the
productionnetwork
Aurora uses RainbowKit to enable users to connect a Coinbase Wallet, MetaMask, Rainbow, Trust Wallet, or WalletConnect-compatible wallet app.
Note
As of WalletConnect v2, a project id is required. This is currently hardcoded with a placeholder value, but if you'd like to use WalletConnect, you can generate your own and edit the placeholder value inmain.tsx.
Aurora also uses a viem Account interface to sign transactions and messages with a given private key. The XMTP message API client needs this Account to enable and sign messages that create and enable their XMTP identity. This XMTP identity is what enables a user to send and receive messages.
Specifically, the user must provide two signatures using their connected blockchain account:
- A one-time signature that is used to generate the account's private XMTP identity
- A signature that is used on app startup to enable, or initialize, the XMTP message API client with that identity
Aurora uses the xmtp-js Conversations abstraction to list the available conversations for a connected wallet and to listen for or create new conversations. For each conversation, the app gets existing messages and listens for or creates new messages. Conversations and messages are kept in a lightweight store and made available through XmtpProvider.
Aurora is built with Web Content Accessibility Guidelines (WCAG) AA compliance guidelines in mind.
To learn more about WCAG and building accessible web apps, see WCAG 2 Overview.
Aurora supports localization in English, Hindi and Chinese currently. If you'd like to contribute a translation of XMTP Inbox UI text, use the existing JSON files in the locales folder as a starting point. Then, add your translated JSON file to the locales folder.
Tests will be run with any pull request. To run tests locally, you may use the following commands:
Unit tests:
npm run testEnd-to-end Cypress tests:
npm run e2e:headlessComponent tests:
npm run cypress:componentYou can't use an app built with XMTP to send a message to a blockchain account address that hasn't used XMTP. This app displays an error when it looks up an address that doesn't have an identity already registered on the XMTP network.
