End-to-End Encrypted β’ Peer-to-Peer β’ Zero Knowledge
SecureP2P Messenger is a cutting-edge, end-to-end encrypted messaging application built as a capstone project. It demonstrates advanced secure communication technologies, ensuring that your messages remain private and can only be read by you and your intended recipient.
|
Messages are encrypted on your device using AES-256-GCM before being transmitted. The server cannot read your messages - it only relays encrypted data. |
Connect via mobile hotspot without internet! Perfect for private communication in areas with limited connectivity. |
|
Instant messaging with typing indicators, read receipts, and live connection status using WebSocket technology. |
Share files of any type with the same military-grade encryption. Files are chunked and encrypted before transfer. |
π Security Features
| Feature | Description |
|---|---|
| AES-256-GCM | Military-grade symmetric encryption |
| PBKDF2 | 100,000 iterations for key derivation |
| Unique IV | Each message uses a unique initialization vector |
| Zero-Knowledge | Server cannot decrypt messages |
| Bcrypt Hashing | Secure password storage |
| JWT Authentication | Secure session management |
π¬ Messaging Features
| Feature | Description |
|---|---|
| Real-time Chat | Instant message delivery |
| Typing Indicators | See when peer is typing |
| Message Status | Sent, delivered, read receipts |
| Room Codes | Easy 6-character room codes |
| QR Code Sharing | Scan to join rooms |
| Emoji Support | Full emoji picker |
π File Transfer
| Feature | Description |
|---|---|
| Any File Type | Support for all formats |
| Chunked Transfer | Reliable large file support |
| Progress Tracking | Real-time progress bar |
| Encrypted Transfer | E2E encrypted files |
π¨ User Experience
| Feature | Description |
|---|---|
| Modern Dark UI | Sleek cyberpunk design |
| Responsive | Works on all devices |
| Animations | Smooth Framer Motion transitions |
| Toast Notifications | Clear user feedback |
| P2P Visualization | Real-time network status |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HOW IT WORKS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π± Device A π₯οΈ Server π» Device B
ββββββββββββ ββββββββββββ ββββββββββββ
β β β β β β
β "Hello" β β ?????? β β "Hello" β
β β β β β β β β β
β ENCRYPT β βββββββββββββββΊ β RELAY β βββββββββββββββΊ β DECRYPT β
β AES-256 β Encrypted β (Can't β Encrypted β AES-256 β
β β Gibberish β Read) β Gibberish β β
ββββββββββββ ββββββββββββ ββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β KEY DERIVATION β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Room Code: "ABC123" + PeerID_A + PeerID_B
β
βββββββββββββββββββ
β PBKDF2 β
β 100,000 rounds β
β SHA-256 β
ββββββββββ¬βββββββββ
β
βββββββββββββββββββ
β SAME KEY ON β
β BOTH DEVICES β β Never transmitted!
βββββββββββββββββββ
Node.js >= 18.0
npm or yarn# 1. Clone the repository
git clone https://github.com/Vixcy300/securep2p-messenger.git
cd securep2p-messenger
# 2. Install dependencies
npm install
# 3. Set up environment
cp .env.example .env.local
# 4. Start the servers
# Terminal 1:
node server/index.js
# Terminal 2:
npm run dev
# 5. Open in browser
# http://localhost:3000# Just double-click:
start.batWant to use on mobile or without internet? Easy!
# 1. Find your computer's IP
ipconfig # Windows
ifconfig # Mac/Linux
# 2. Update .env.local
NEXT_PUBLIC_SIGNALING_SERVER=http://YOUR_IP:3001
NEXT_PUBLIC_APP_URL=http://YOUR_IP:3000
# 3. Restart servers and access from mobile
http://YOUR_IP:3000|
Next.js 14 |
TypeScript |
Tailwind |
Node.js |
Socket.IO |
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 14, React 18 | UI Framework |
| Styling | Tailwind CSS, Framer Motion | Design & Animations |
| State | Zustand | Global State Management |
| Backend | Node.js, Express | API Server |
| Real-time | Socket.IO | WebSocket Communication |
| Security | Web Crypto API | Browser-native Encryption |
| Auth | JWT, Bcrypt | Authentication |
securep2p-messenger/
βββ π app/ # Next.js App Router
β βββ π layout.tsx # Root layout
β βββ π page.tsx # Main page
β βββ π globals.css # Global styles
βββ π components/ # React components
β βββ π chat-interface.tsx # Chat UI
β βββ π disclaimer.tsx # Attribution (protected)
β βββ π dashboard.tsx # Main dashboard
β βββ π ui/ # Reusable components
βββ π lib/ # Core utilities
β βββ π crypto.ts # Encryption functions
β βββ π p2p.ts # P2P connection logic
β βββ π store.ts # Zustand state
β βββ π utils.ts # Helpers
βββ π server/ # Backend
β βββ π index.js # Express + Socket.IO
βββ π public/ # Static assets
Message Input β UTF-8 Encode β AES-256-GCM Encrypt β Base64 β Transmit
β
Random 12-byte IV
+
PBKDF2 Derived Key
| β Protected | β Visible to Server |
|---|---|
| Message content | Message timestamps |
| File contents | Room codes |
| Encryption keys | Connection status |
Capstone Project β’ 2025
This project is licensed under the MIT License - see the LICENSE file for details.
β οΈ Attribution Required: The disclaimer component must remain intact when using or distributing this project.
- Next.js - The React Framework
- Socket.IO - Real-time Engine
- Tailwind CSS - Styling
- Framer Motion - Animations
- Lucide Icons - Beautiful Icons
β If you found this project helpful, please give it a star!
Made with β€οΈ and β by Vignesh


