An decentralized messaging application built with OnchainKit that allows users to send messages directly through Base blockchain transactions. Built with privacy and decentralization in mind - no central server, no message storage, just pure blockchain communication.
- 💬 Send and receive messages directly through blockchain transactions
- 🔒 No central server or database - all messages are stored on-chain
- 🌐 Works on Base network for fast and low-cost messaging
- 👥 Easy-to-use contact management
- ⚡ Real-time message updates
- 🎨 Clean and intuitive UI
- 🔐 Connect with any Web3 wallet
Instead of using a traditional smart contract, this messenger uses transaction data to send messages:
- Messages are encoded into transaction data
- Transactions are sent with 0 ETH value
- Recipients can decode messages from transaction data
- Messages are permanently stored on the blockchain
This approach has several benefits:
- Lower gas costs (no contract deployment needed)
- Simpler architecture
- True decentralization
- Message permanence
To run this project locally, you'll need to set up the following environment variables in your .env
file:
# See https://portal.cdp.coinbase.com/products/onchainkit
NEXT_PUBLIC_CDP_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM"
# See https://cloud.walletconnect.com
NEXT_PUBLIC_WC_PROJECT_ID="GET_FROM_WALLET_CONNECT"
# Base network configuration
NEXT_PUBLIC_NETWORK="base"
# Install dependencies
bun install
# Run the development server
bun run dev
The application is built using:
- Next.js 13+ with App Router
- TypeScript for type safety
- Viem for blockchain interactions
- OnchainKit for Web3 components
- TailwindCSS for styling
- Base network for transactions
Key components:
MessageUtils
: Handles message encoding/decodingConversationList
: Manages contact list and chat historyMessageInput
: Handles message sendingMessageList
: Displays conversation threads
- All messages are public on the blockchain
- Anyone can read the message history
- Addresses are publicly visible
- No encryption (yet) - future versions may include E2E encryption
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or need help, you can: