GopherOmegle
High-performance P2P video chat application with Go backend and React frontend, using WebRTC for low-latency communication.
GopherOmegle is a high-performance, open-source 1:1 video chat application inspired by the classic Omegle platform. Built with modern technologies, simplify real-time communication with a robust Go backend and a sleek React frontend.
Architecture
The system follows a client-server architecture with peer-to-peer (P2P) WebRTC connections for media streaming.
- Frontend (React + Vite): Connects via HTTPS/WSS to the Load Balancer.
- Backend (Go + Gin): Handles API and WebSocket signaling.
- Backend Services:
- JWT Auth Middleware: Secure session management.
- PostgreSQL: Persistent data storage.
- WebSocket Hub: Manages real-time signaling.
- P2P Media Stream: Direct WebRTC video/audio stream between users.
Flow
- Authentication: Users login/register via REST API to receive a JWT.
- Connection: Client connects to WebSocket with the JWT.
- Matchmaking: Backend places user in a queue. When 2 users are available, a Room is created.
- Signaling: Backend facilitates the exchange of SDP offers/answers and ICE candidates via WebSocket.
- Streaming: Once signaled, clients establish a direct P2P WebRTC connection for low-latency video and audio.
Tech Stack
- Backend: Go (Golang), Gin, Gorilla WebSocket, PostgreSQL, GORM, JWT.
- Frontend: React 19, Vite, Tailwind CSS v4, Zustand, WebRTC.
Key Features
- Professional UI: Sleek design with a "Hair Screen" lobby.
- Real-time Matching: Efficient queue-based matchmaking.
- P2P Video/Audio: High-quality, low-latency communication.
- Secure: JWT-based auth and secure WebSocket connections.
- UX: "Stranger is typing..." indicators, chat auto-scroll.
- Interactive: Emoji picker support.
Related Projects
Kahoot Quiz Clone
2023A real-time multiplayer quiz application with synchronized game state, built with Go (Gin) backend and Svelte frontend.
Master Chess
2023A full-stack, real-time multiplayer chess application with Stockfish AI integration, ELO matchmaking, and live WebSocket gameplay.
Gopher Vercel
2024A simplified clone of the Vercel deployment platform built with Go, allowing users to deploy static websites from Git repositories.