⚔️ CodeDuel - Competitive Coding Battles in VS Code
CodeDuel is a VS Code extension that lets you challenge your friends to real-time competitive programming duels — without ever leaving your editor.
🚀 Compete head-to-head by solving the same Codeforces problem
⏱ See who submits first and wins — results shown live in VS Code
👤 Log in with your Codeforces ID to get started
✨ Features
🔧 Start a Duel
Use the VS Code Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and run the Start Duel command. Share the generated Room ID with a friend.
🤝 Join a Duel
Your friend runs the Join Duel command and enters the shared Room ID. Once both players are in, the duel begins.
💻 Same Problem, Same Time
A random Codeforces problem is fetched for both players — everyone gets the exact same challenge.
📤 Codeforces Integration
When you submit your solution on Codeforces, CodeDuel tracks the verdicts and updates the VS Code interface.
🏆 Live Winner Detection
The first person to get an Accepted verdict wins the duel. A win/loss message is shown right in VS Code.
🔧 Setup
Install the extension from the VS Code Marketplace (Coming soon)
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
Search for and run either:
CodeDuel: Start Duel
CodeDuel: Join Duel
You'll be prompted to enter your Codeforces handle (only once per session)
Let the games begin!
🖼️ Example Flow
Player A runs Start Duel → gets Room ID → shares it with Player B
Player B runs Join Duel → enters Room ID
Both receive the same Codeforces problem in their editor
They code and submit on Codeforces
CodeDuel checks every 10 seconds who got an AC first
Winner is announced inside VS Code 🎉
🛠️ Technologies Used
VS Code Extension API
Node.js backend (Socket.IO + Redis)
Codeforces API
Puppeteer/Selenium for Codeforces submission (optional automation)
📝 Notes
Make sure you’re logged in to Codeforces before submitting your code.
Extension does not store your credentials — only your Codeforces handle.
You can continue solving the problem even after one player wins — great for practice!
📦 Future Plans
Leaderboards & rating system
Support for more platforms (e.g., LeetCode, AtCoder)
Voice/chat feature during duels
Custom problem difficulty filter
🤝 Contributing
Contributions and suggestions are welcome! Feel free to fork this repo, open issues, or submit pull requests.
🧠 Author
Made with ❤️ by Gourav Chourasiya
Built for focused growth in competitive programming 💪