
A high-performance competitive coding platform for real-time 1v1 battles and global tournaments. Features a custom Docker-based sandboxed judge.
BitFight is a real-time competitive programming platform designed for speed and reliability. It enables developers to compete in head-to-head 1v1 coding battles, participate in scheduled contests, and track their progress through an ELO-based ranking system. The platform focuses on low-latency interactions and a seamless developer experience with an integrated Monaco-powered IDE.
The architecture is built for high concurrency and low latency. The Next.js 16 frontend uses the App Router and shadcn/ui for a premium, responsive interface, with TanStack Query managing server state. The backend is a high-performance Go service using the Fiber framework, leveraging Redis for real-time messaging and WebSocket state management. PostgreSQL with GORM provides reliable persistence for user data, problems, and match results.
One of the primary challenges was ensuring consistent match state across distributed WebSocket nodes. I implemented a robust synchronization protocol using Redis Pub/Sub to handle real-time events like code submissions and verdicts. Additionally, building a secure and fast code execution sandbox required careful Docker orchestration and parallel test case execution to minimize "Time to Verdict" for the users.
Duration
1 month
Date
2025
Technologies