Skip to content

amitgupta7061/blockchat

Repository files navigation

🌐 ChainTalk - Decentralized Web3 Messaging

ChainTalk Banner

ChainTalk is a secure, wallet-to-wallet messaging application powered by the XMTP protocol. It provides a decentralized, end-to-end encrypted chat experience directly between Ethereum addresses, ensuring privacy and ownership of your conversations.

"Your keys, your messages." No central servers, no data silos. Just pure, encrypted communication.


✨ Features

  • 🔐 End-to-End Encryption: All messages are encrypted using XMTP, readable only by the sender and recipient.
  • 🆔 Wallet-Based Identity: Sign in with MetaMask or WalletConnect. Your wallet address is your identity.
  • ⚡ Real-Time Messaging: Instant message delivery with live streaming support.
  • 📱 Fully Responsive: A beautiful, modern UI that works seamlessly on desktop, tablet, and mobile.
  • 🎨 Dark Mode Optimized: Sleek, glassmorphism-inspired design with a rich dark theme.
  • 📂 Clean Architecture: Built with Next.js 14, TypeScript, and TailwindCSS for performance and maintainability.

🛠️ Tech Stack


🚀 Workflow

The application follows a simple, secure 3-step workflow:

graph TD
    A[Start] --> B(Connect Wallet)
    B --> C{XMTP Identity?}
    C -- No --> D[Sign to Enable XMTP]
    C -- Yes --> E[Load Conversations]
    D --> E
    E --> F[Select / Start Chat]
    F --> G[Send Encrypted Message]
    G --> H[Recipient Decrypts & Reads]
Loading
  1. Connect Wallet: Users connect their Ethereum wallet (MetaMask or WalletConnect).
  2. Enable Identity: The user signs a signature request to generate their XMTP identity keys. This happens entirely client-side.
  3. Chat: Once authenticated, the user can:
    • View existing conversations.
    • Start a new chat by entering an Ethereum address (0x...).
    • Send and receive encrypted messages in real-time.

📂 Folder Structure

blockchat/
├── src/
│   ├── app/                 # Next.js App Router pages
│   │   ├── layout.tsx       # Root layout with providers
│   │   └── page.tsx         # Main entry component
│   ├── components/          # Reusable UI components
│   │   ├── Layout.tsx       # Main app shell (Header/Footer)
│   │   ├── ChatPanel.tsx    # Core chat interface
│   │   ├── MessageList.tsx  # Scrollable message view
│   │   └── ...
│   ├── context/             # React Contexts for global state
│   │   ├── WalletContext.tsx # Wallet connection logic
│   │   ├── XMTPContext.tsx   # XMTP client lifecycle
│   │   └── ChatContext.tsx   # Messaging state & logic
│   ├── lib/                 # Utilities and constants
│   └── services/            # External service integrations
│       └── xmtp.ts          # XMTP SDK wrapper & types
├── public/                  # Static assets
└── ...config files          # (tailwind, postcode, next, etc.)

🏁 Getting Started

Prerequisites

  • Node.js 18+
  • Bun, Yarn, or npm
  • A WalletConnect Cloud Project ID (for WalletConnect support)

Installation

  1. Clone the repository:

    git clone https://github.com/amitgupta7061/blockchat.git
    cd blockchat
  2. Install dependencies:

    bun install
    # or
    npm install
  3. Configure Environment: Create a .env file in the root directory:

    NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_project_id_here
    NEXT_PUBLIC_XMTP_ENV=dev # or production
  4. Run Development Server:

    bun dev
  5. Open http://localhost:3000 in your browser.


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is open source and available under the MIT License.


Built with ❤️ by Amit Gupta

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published