Rakshit.sol
Back to Projects

GopherOmegle

High-performance P2P video chat application with Go backend and React frontend, using WebRTC for low-latency communication.

GoGinReactWebRTCPostgreSQLDockerWebSocket
Play Demo Video

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

  1. Authentication: Users login/register via REST API to receive a JWT.
  2. Connection: Client connects to WebSocket with the JWT.
  3. Matchmaking: Backend places user in a queue. When 2 users are available, a Room is created.
  4. Signaling: Backend facilitates the exchange of SDP offers/answers and ICE candidates via WebSocket.
  5. 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.