Competitive programming platforms face two major challenges: scalability during contests and the tedious process of creating test cases. We built CodeSphere, a full-stack platform, to tackle these issues head-on. To handle high submission loads, I designed and implemented a distributed master-slave architecture that processes code executions in parallel, ensuring high scalability and significantly cutting submission wait times. The platform features a secure contest mode with tab-switch detection and auto-submission, reducing cheating. One of the most impactful features is an AI-powered test case generator I developed using the Gemini API. This tool slashed the manual effort for contest creators. The entire backend is built on a suite of modular REST APIs for maintainable and decoupled management of problems, contests, and scoring