Skip to content

AllStars101-sudo/Aurora

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,125 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Aurora: Next-gen web3 and AI Messaging

AuroraIcon

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.

Quick Links

Get started

Configure Infura

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.

Install the package

npm install

Run the development server

npm run dev

Open http://localhost:5173 with your browser to see the app.

Functionality

Aurora combines the power of web3 messaging with AI capabilities:

  1. Secure, decentralized messaging using the XMTP protocol
  2. AI-assisted conversations
  3. Web3 wallet integration for user authentication

Generative AI. Now in your messages.

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.

Network environment

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:

Wallet connections

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 in main.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:

  1. A one-time signature that is used to generate the account's private XMTP identity
  2. A signature that is used on app startup to enable, or initialize, the XMTP message API client with that identity

Chat conversations

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.

Accessibility

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.

Localization

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

Tests will be run with any pull request. To run tests locally, you may use the following commands:

Unit tests:

npm run test

End-to-end Cypress tests:

npm run e2e:headless

Component tests:

npm run cypress:component

Considerations

You 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.

About

Next-gen messaging platform built using web3 and AI.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors

Languages

  • TypeScript 98.1%
  • CSS 1.4%
  • Other 0.5%