A secure, decentralized peer-to-peer messaging application built on Solana blockchain with end-to-end encryption and file sharing capabilities.
-
🔐 Secure Messaging
- End-to-end encryption using TweetNaCl
- Messages stored locally with IPFS integration
- Solana wallet-based authentication
-
👥 User Management
- Custom usernames and profiles
- Recent peers list with activity status
- Nickname support for contacts
-
📎 File Sharing
- Support for images and documents
- Built-in image preview
- Local file storage with IPFS integration
-
💫 Modern UI/UX
- Real-time message status updates
- Responsive design
- Image preview modal
- Intuitive peer selection
-
Frontend
- React 18 with TypeScript
- Tailwind CSS for styling
- Vite for development and building
-
Blockchain
- Solana Web3.js
- Wallet Adapter for Phantom integration
-
Storage & Encryption
- IPFS/Helia for decentralized storage
- TweetNaCl for encryption
- LocalStorage for persistent data
- Node.js 18 or higher
- A Solana wallet (e.g., Phantom)
- Git (optional)
- Clone the repository:
git clone https://github.com/AP3X/SOL-CHAT.git
cd solana-p2p-messenger
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
Create a .env
file in the root directory:
VITE_WEB3_STORAGE_EMAIL=your_email@example.com
VITE_WEB3_STORAGE_SPACE=your_space_did
-
Connect Wallet
- Click "Select Wallet" to connect your Solana wallet
- Set up your username when prompted
-
Send Messages
- Enter recipient's Solana address or select from recent peers
- Type your message and/or attach files
- Click send button to encrypt and transmit
-
Manage Contacts
- Click the users icon to view recent peers
- Set nicknames for easy identification
- Monitor peer activity status
-
Share Files
- Click the paperclip icon to attach files
- Supported formats: images, PDFs, documents
- Preview images before sending
- Encryption: All messages are encrypted using TweetNaCl's box encryption
- Authentication: Wallet-based authentication ensures message integrity
- Storage: Messages are stored locally with optional IPFS backup
- Privacy: Direct peer-to-peer communication with no central server
src/
├── components/ # React components
├── lib/ # Core functionality
│ ├── crypto.ts # Encryption utilities
│ ├── ipfs.ts # IPFS integration
│ ├── peers.ts # Peer management
│ ├── profile.ts # User profiles
│ └── storage.ts # Data persistence
├── types/ # TypeScript definitions
└── App.tsx # Main application
npm run build
The built files will be in the dist
directory.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add 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.
- Solana Foundation for blockchain infrastructure
- IPFS for decentralized storage capabilities
- The Web3 community for inspiration and support
For support, please open an issue in the GitHub repository or reach out to the maintainers.
Built with ❤️ by AP3X