A terminal-style, code-based peer-to-peer communication platform with real-time chat, voice calls, and video calls. Built for users who value privacy and control.
- No Account Linking - Code-based pairing system, no friend lists
- Ephemeral Data - Messages auto-delete after 24 hours
- P2P Encrypted Media - Voice and video never touch the server
- Stateless Auth - JWT tokens, no session tracking
- Instant Messaging - WebSocket-powered chat with typing indicators
- Voice Calls - Crystal-clear P2P audio with WebRTC
- Video Calls - HD video (1280x720) with picture-in-picture layout
- Code-Based Pairing - Connect via 6-character session codes
- Command-Driven Interface - PowerShell-inspired terminal UI
- Dynamic Tab System - Chrome/Arc-style tab management
- Color-Coded Output - Visual distinction for users, system messages, errors
- Gamer Aesthetic - RGB neon design with smooth animations
- Node.js 18+ and npm 9+
- Java 17+ and Maven 3.8+
- MongoDB 7.0+
- Google OAuth credentials
# Clone repository
git clone <repository-url>
cd clype
# Frontend setup
npm install
cp .env.local.example .env.local
# Edit .env.local with your Google Client ID
# Backend setup
cd backend
mvn clean install
cp .env.example .env
# Edit .env with MongoDB URI and secrets
# Start services
npm run dev # Frontend on :3000
mvn spring-boot:run # Backend on :8080# Copy environment files
cp .env.local.example .env.local
cp backend/.env.example backend/.env
# Edit both .env files with your credentials
# Start all services
docker-compose up -d
# Access at http://localhost:3000- Click "Sign in with Google"
- Complete OAuth flow
- Set your display name
- Enter workspace
# User A: Generate session code
my-address
# Returns: ALPHA-7234K
# User B: Connect with code
connect-mate ALPHA-7234K
# Both users can now chat in real-time# Voice call
## User A: Generate session code
my-address
## Returns: ALPHA-7234K
## User B: Connect with code
connect-mate ALPHA-7234K
Command : call
# Video call
Same as voice call : my-address, connect-mate
Command : call
# Commands work after pairing via connect-mate- Next.js 16 (App Router)
- React 19 with TypeScript
- Tailwind CSS v4 for styling
- Zustand for state management
- WebSocket (STOMP) for real-time messaging
- WebRTC for P2P media
- Spring Boot 3.2 (Java 17)
- Spring WebSocket (STOMP protocol)
- MongoDB 7.0 with TTL indexes
- JWT for stateless authentication
- Google OAuth 2.0 integration
- Docker for containerization
- MongoDB Atlas (production database)
- Vercel (frontend hosting)
- AWS EC2 (backend hosting)
- Coturn (TURN server for NAT traversal)
- Google OAuth 2.0 for secure login
- JWT tokens with 24-hour expiration
- Server-side authorization checks
- Room participant validation
- End-to-end encrypted media (DTLS-SRTP)
- Ephemeral messaging (24-hour TTL)
- Session auto-expiration (60 minutes)
- MongoDB TTL indexes for automatic cleanup
- No media storage on server
- HTTPS/WSS in production
- CORS protection
- Rate limiting (Nginx)
- Input validation and sanitization
clype/
βββ app/ # Next.js pages & layouts
βββ components/ # React components
β βββ auth/ # Authentication UI
β βββ calls/ # Voice/video call components
β βββ terminal/ # Terminal workspace UI
β βββ ui/ # Shared UI components
βββ lib/ # Utilities & state management
β βββ auth-store.ts # Zustand auth state
β βββ terminal-store.ts # Terminal session state
β βββ websocket-client.ts # WebSocket wrapper
β βββ webrtc-client.ts # WebRTC peer connection
βββ backend/
β βββ src/main/java/com/terminalchat/
β βββ domain/ # Entities & repositories
β βββ service/ # Business logic
β βββ web/ # REST controllers
β βββ websocket/ # WebSocket handlers
β βββ security/ # JWT & auth
β βββ config/ # Spring configuration
βββ docs/ # Documentation
POST /api/auth/google-login # OAuth login
POST /api/auth/update-display-name # Update username
GET /api/auth/me # Get current user
POST /api/rooms/my-address/{type} # Generate session code
POST /api/rooms/connect/{code} # Connect with peer
GET /api/rooms/{roomId} # Get room details
POST /api/rooms/{roomId}/close # Close room
/ws/chat # Real-time chat messaging
/ws/signaling # WebRTC signaling (offer/answer/ICE)
See API.md for complete API documentation.
help # Show all available commands
my-address # Generate 6-character session code
connect-mate <code> # Connect with peer using their code
call # Initiate voice call & Video Call in Individual Tab (Voice || Video)
exit # Close current session- Message Delivery: <100ms end-to-end
- WebSocket Latency: <50ms typical
- JWT Validation: <1ms per request
- MongoDB Queries: <10ms average
- Video Quality: Up to 1280x720 @ 30fps
- Audio Quality: 48kHz Opus codec
# Terminal 1 (User A)
1. Login with Google
2. Create chat tab
3. Type: my-address
4. Share code: ALPHA-7234K
# Terminal 2 (User B)
1. Login with Google
2. Create chat tab
3. Type: connect-mate ALPHA-7234K
4. Send messages back and forth
# Test voice call
1. Go to Voice tab
2. Type: my-address
3. Share code: ALPHA-7234K
4. Command call
# Test video call
1. Go to Video tab
2. Type: my-address
3. Share code: ALPHA-7234K
4. Command call- Update Google OAuth credentials (production domains)
- Configure MongoDB Atlas connection string
- Generate strong JWT secret (32+ characters)
- Set up SSL certificates (Let's Encrypt)
- Configure TURN server (Coturn)
- Enable MongoDB TTL indexes
- Configure CORS for production domains
- Set up monitoring (CloudWatch/Datadog)
- Configure backups (MongoDB Atlas)
See DEPLOYMENT.md for complete deployment guide.
- ARCHITECTURE.md - System design, flows, WebRTC deep dive
- DEPLOYMENT.md - Production deployment guide
- DEVELOPMENT.md - Local development setup
- API.md - Complete API reference
- CALLING.md - Voice & video calling guide
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to 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.
- WebRTC - For P2P communication standards
- Spring Boot - For robust backend framework
- Next.js - For exceptional frontend DX
- MongoDB - For flexible data storage with TTL support
For issues, questions, or feature requests:
- Open an issue on GitHub
- Check existing documentation
- Review the ARCHITECTURE.md for system design
Built with privacy and user control in mind.
Last updated: January 2026