The problem
Practicing competitive programming with friends usually means juggling separate judge accounts and manually comparing who solved what. CodeCompanions collapses that into one place: create a contest, share an ID, and compete in real time.
Approach
The app follows a client-server model with a dedicated real-time layer so every participant sees the same leaderboard state without refreshing.
- Frontend: a React single-page app with Redux for state and React Router for navigation.
- Backend: a Node.js / Express server with MongoDB persistence.
- Real-time: Socket.IO pushes submission and ranking updates to every connected client.
Tech deep-dive
Contests and live ranking
A contest is created with custom parameters and a unique ID; participants join with that ID. The server syncs problems and submission verdicts from the Codeforces API and broadcasts scoring changes over Socket.IO, so leaderboards refresh the instant someone solves a problem.
Authentication
Secure auth includes email verification and password reset, implemented with Nodemailer and JWT tokens for the verification flows, plus editable user profiles.
Outcomes & learnings
The result is a self-contained contest platform — create, invite, compete, and rank — backed by live external data. Building the Socket.IO layer made the cost of real-time state concrete: every event needs a single source of truth on the server, or clients quietly drift apart.