Inspiration

I love bettings apps like PrizePicks and their innovative approach to sports betting, but I wanted to take it a step further. While PrizePicks lets you make picks against the house, I thought - what if you could bet directly against your friends with custom lines? Watching games with friends, we'd constantly make predictions like "Ronaldo will score a goal today" or "This game will be a goal fest" - but there was no way to actually bet against each other with our own custom odds. I wanted to create a social extension of the PrizePicks experience where friends can set their own lines and compete directly against each other.

What it does

SideBet is a peer-to-peer betting platform that extends the traditional betting experience by letting friends create custom betting lines and bet directly against each other. Unlike apps with fixed odds, you can propose "Over 2.5 goals for 100 points" and your friend can accept or counter-offer. The magic happens when goals are scored - if you bet "over 2.5 goals" and the third goal goes in, you win immediately from your friend's points. It's like PrizePicks but with your friends as the house, creating a more personal and social betting experience.

How we built it

I built this as a React Native app with a Node.js backend. The real-time magic happens through Socket.IO - when the server detects a goal (or penalty, or own goal), it immediately checks all active bets and resolves them instantly. We integrated with a live sports API to get real-time match data and events. The tricky part was building the asymmetric betting system where different players can risk different amounts, and the point transfer system that persists across sessions.

Challenges I ran into

The biggest challenge was getting reliable real-time data from the sports API and keeping everything in sync across all connected devices. The API had inconsistent response times and unpredictable data structures - penalty goals were labeled differently in different responses. The real nightmare was syncing game room activity through Socket.IO. When a goal is scored, I need to instantly update the live score, resolve bets, transfer points, and broadcast all changes to every connected device. If one user's connection is slow, they could miss critical updates and see outdated information.

Accomplishments that I'm proud of

I'm really proud of creating a true peer-to-peer betting platform with live sports data feeds. Managing to integrate web sockets was also rewarding. The real-time resolution system works flawlessly - when a goal is scored, bets are resolved within seconds and points are transferred instantly between friends. I built a robust point system that persists across sessions, so your winnings actually follow you.

What I learned

I learned a ton about Socket.IO's event handling and the complexity of maintaining state consistency across multiple clients. Managing game room state became incredibly complex - I had to handle users joining mid-game, connection drops, and ensuring everyone sees the same live score and bet status. The sports API integration taught me about rate limiting, data normalization, and handling inconsistent event types (GOAL vs GOAL_PENALTY vs OWN_GOAL). I built a persistent user point system using in-memory Maps that survive server restarts, and learned how to handle race conditions when multiple bets resolve simultaneously. The React Native side taught me about real-time UI updates, managing Socket.IO connections, and keeping the UI in sync with server state. Most importantly, I learned that multiplayer real-time apps require bulletproof error handling - one missed event can break the entire experience for everyone in the room.

What's next for SideBet | Live Bets with Friends

I want to add more sports and expand the custom betting options. I'm considering unique betting lines like "First team to score" or "Player X scores before minute 30". I also want to link crypto wallets to the game to enable actual money transfer.

Share this project:

Updates