ChitChat is a decentralized, end-to-end encrypted messaging platform that prioritizes privacy without sacrificing usability. Built on blockchain technology and IPFS, ChitChat ensures your conversations remain private, secure, and free from central control.
- True End-to-End Encryption — Messages are encrypted and decrypted locally using AES-256-GCM
- Decentralized Architecture — No central servers storing your messages or metadata
- Blockchain-Powered — Friend relationships and message references managed on-chain
- IPFS Storage — Encrypted messages and profile data stored on the InterPlanetary File System
- Key Recovery — Export/import system for symmetric and private keys
- Modern UI — Built with Next.js 15 for a responsive, fast user experience
ChitChat employs a sophisticated hybrid cryptographic approach:
graph TD
A[New User] -->|Create Account| B[Generate RSA Key Pair]
B -->|Store Private Key| C[Local Storage]
B -->|Publish Public Key| D[Blockchain]
A -->|Set Display Name & Picture| E[IPFS via Pinata]
graph TD
A[User A] -->|Generate AES symmetric key| B[Symmetric Key]
B -->|Store locally| C[User A's Local Storage]
A -->|Retrieve User B's public key| D[Blockchain]
A -->|Encrypt symmetric key| E[Encrypted Symmetric Key]
E -->|Share on-chain| F[Smart Contract]
G[User B] -->|Fetch encrypted key| F
G -->|Decrypt with private key| B2[Symmetric Key]
B2 -->|Store locally| H[User B's Local Storage]
graph TD
A[User A] -->|Encrypt with symmetric key| B[Encrypted Message]
B -->|Upload to IPFS| C[IPFS Hash]
C -->|Store reference on-chain| D[Blockchain]
E[User B] -->|Get IPFS hash| D
E -->|Retrieve encrypted message| B
E -->|Decrypt with symmetric key| F[Plaintext Message]
- Node.js (v18+)
- NPM or Yarn
- Web3 wallet (MetaMask recommended)
- Pinata API keys
-
Clone the repository
git clone https://github.com/yourusername/chitchat.git cd chitchat -
Install dependencies
npm install # or yarn install -
Configure environment variables
cp .env.example .env.local # Edit .env.local with your Pinata API keys and blockchain endpoint -
Run development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
- Connect your Web3 wallet
- Create your profile with display name and optional profile picture
- Export and securely store your private and symmetric keys
- Search for friends by their wallet address
- Send friend requests
- Accept incoming requests to establish secure communication
- Select a friend from your contacts
- Start sending end-to-end encrypted messages
- Messages are encrypted locally, stored on IPFS, and only referenced on-chain
- Export keys after initial exchange
- Import keys if you switch devices
- Securely back up keys to prevent message loss
- Frontend: Next.js 15, React, TailwindCSS
- Blockchain: Ethereum/Polygon Smart Contracts
- Storage: IPFS via Pinata Cloud
- Deployment: Vercel
- Encryption: AES-256-GCM (messages), RSA-2048 (key exchange)
ChitChat combines decentralized technologies with modern web practices:
- Client-Side: Handles all encryption/decryption locally in the browser
- Blockchain Layer: Manages user relationships and references to encrypted content
- IPFS Layer: Stores encrypted messages and profile data
- Cloud Services: Vercel for app hosting, Pinata for IPFS pinning
We welcome contributions! Please read our Contributing Guide to get started.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Project Link: https://github.com/roudra323/chitchat
Built with ❤️ for a decentralized future