Back to Home
built a stranger chat app from scratch — and what we learned

built a stranger chat app from scratch — and what we learned

B
Blizine Admin
·2 min read·0 views

jithu baiju Posted on May 30 built a stranger chat app from scratch — and what we learned # javascript # node # webdev # showdev My friend and I just launched Sparq — an anonymous stranger chat app with interest-based matching. This is the story of how we built it, what broke, what we learned, and the scrappy solutions we used when things didn't go as planned. What we built and why Omegle shut down. Every alternative we tried was either full of bots, had terrible mobile UX, or felt abandoned. So we decided to build something ourselves — clean, mobile-first, face verification ,games and actually fun to use. Sparq matches strangers by shared interest tags. Free users get interest-based matching. VIP users unlock location-based matching — city first, then state, then country. The idea is that when two people share interests or location, conversations actually go somewhere instead of dying in 10 seconds. The tech stack Frontend —HTML, CSS, JavaScript. Backend — Node.js with Socket.io for real-time chat and matchmaking Database — Supabase (free tier, saved us completely) Hosting — Vercel for frontend, Render for backend Auth — JWT tokens, custom implementation The matching algorithm This was the hardest part to get right. The queue system works like this — when a user joins the search, we put them in a Map with their interests, location, and gender filter. Every new user who joins triggers a findMatch() scan across the entire queue. For free users we match purely by shared interest tags. The more tags in common, the higher priority the match. For VIP users we first try to match within the same city with shared interests, then same city without interests, then same state, then same country, then fall back to global matching. This way VIP users almost always meet someone nearby. We also built a boost system — users who have been waiting longer get priority in the queue so nobody waits forever. What broke along the way Render's free tier sleeps — our backend goes to sleep a

📰Dev.to — dev.to

Comments