JuMingle

The free, verified alternative to Omegle and Chatroulette. Meet new people, talk to strangers, and make real friends online.

JuMingle Cover Image

Building JuMingle: How We Built a Real-Time Video Chat Platform from Scratch

Most random video chat sites are laggy, overrun with bots, and careless with user privacy. We wanted to build the opposite: a fast, private space where real people connect face-to-face in one tap without bios or matchmaking algorithms.

Choosing the Stack

SvelteKit (Svelte 5): Fine-grained reactivity with runes, zero virtual DOM overhead, and clean file-based routing.

Cloudflare Workers: Edge deployment across global data centers for zero cold starts and millisecond response times.

Supabase: Postgres, Row Level Security, realtime channels, and one-tap Google OAuth in a single backend.

Direct Peer-to-Peer Connections

Your audio and video never pass through our servers. Once matched, streams travel directly between devices with end-to-end encryption.

Ephemeral Lobby: Supabase Realtime presence pairs users the moment they enter the queue, without database writes or central coordinators.

Self-Closing Signaling: Matched browsers swap connection details over a private broadcast channel that closes as soon as the stream locks in.

Direct Data Channel: Text chat, typing indicators, and timestamps move directly between peers without touching a database.

Solving the Matchmaking Race Condition

If two browsers try to initiate a call at the exact same millisecond, the connection fails. We fixed this by sorting user IDs alphabetically at match time: the lower ID always initiates the handshake, and both sides generate the exact same match ID.

To handle flaky mobile networks, connections time out and re-queue silently after 8 seconds. If your partner drops off, you go straight back into the lobby automatically.

Adapting to Different Hardware

A lightweight runtime profiler checks CPU cores and available RAM to match video quality to the device:

High-end: 720p at 30fps

Mid-range: 720p at 24fps

Low-end: 360p at 20fps

During a call, if packet loss crosses 10%, the encoder throttles the video bitrate so older phones do not choke, scaling back up once the signal clears.

Keeping Devices Cool

Tab visibility pause: Switching tabs pauses video encoding immediately without dropping the call.

Camera release between skips: Powering down the camera sensor and encoder while searching lets the phone cool down.

720p/30fps ceiling: Prevents excessive heat and battery drain on mobile browsers.

Toggleable noise suppression: Users can disable audio filtering on the fly to save CPU cycles in quiet rooms.

A Verified-Only Community

Google-Only Sign-In: Eliminates throwaway accounts and automated bot floods by pulling verified names and avatars straight from Google.

JWT Role Permissions: Postgres functions and a custom auth hook bake user, moderator, and admin roles directly into the JWT for instant checks without extra database queries.

enphth