<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chirashri Jagannatha Sapaliga</title>
    <description>The latest articles on DEV Community by Chirashri Jagannatha Sapaliga (@chira_26).</description>
    <link>https://dev.to/chira_26</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4093520%2Fde4d5f44-3d77-4573-b16a-d7c6c01e8722.png</url>
      <title>DEV Community: Chirashri Jagannatha Sapaliga</title>
      <link>https://dev.to/chira_26</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chira_26"/>
    <language>en</language>
    <item>
      <title>Building CodeArena: A Real-Time Competitive Coding Arena Powered by Gemini</title>
      <dc:creator>Chirashri Jagannatha Sapaliga</dc:creator>
      <pubDate>Tue, 25 Aug 2026 06:43:31 +0000</pubDate>
      <link>https://dev.to/chira_26/building-codearena-a-real-time-competitive-coding-arena-powered-by-gemini-2429</link>
      <guid>https://dev.to/chira_26/building-codearena-a-real-time-competitive-coding-arena-powered-by-gemini-2429</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Every competitive programmer knows the grind: solving problems alone on LeetCode or CodeChef, staring at a timer, with no one to push you when motivation runs low. Practice platforms are plentiful, but almost none of them capture what actually makes competitive programming addictive — the &lt;em&gt;live&lt;/em&gt;, head-to-head pressure of a real contest. As a final-year CS student who's spent hundreds of hours solving problems across LeetCode and CodeChef, I kept hitting the same wall: solo practice doesn't simulate the adrenaline of a real battle, and there was no lightweight platform where two or four coders could just jump in and duel in real time, with AI actually helping you learn rather than just judging your output.&lt;/p&gt;

&lt;p&gt;So I built one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What CodeArena Does
&lt;/h2&gt;

&lt;p&gt;CodeArena is a full-stack, real-time competitive coding platform where developers battle head-to-head — 1v1 or 2v2 — solving algorithmic problems live against opponents, with a Monaco-powered editor, an ELO rating system, badges, leaderboards, a friend system, and AI-generated hints when you're stuck.&lt;/p&gt;

&lt;p&gt;The core loop is simple but was technically anything but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time battles&lt;/strong&gt;: Two or four players get the same problem at the same time. Whoever solves it correctly and fastest wins. Socket.IO keeps everyone's state — code, submissions, opponent progress — in sync with near-zero latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI-generated questions&lt;/strong&gt;: Instead of a static problem bank, CodeArena uses &lt;strong&gt;Google Gemini&lt;/strong&gt; to generate fresh, varied coding challenges on the fly — with adjustable difficulty and topic focus — so battles don't get stale and the question pool scales infinitely.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI hints, not AI answers&lt;/strong&gt;: When a player is stuck mid-battle, Gemini can nudge them toward the solution without handing over the code, keeping the competitive integrity of the match intact while still making the platform genuinely useful for learning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live code execution&lt;/strong&gt;: Submissions are compiled and run through the Glot.io API across multiple languages, with results streamed back instantly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progression systems&lt;/strong&gt;: An ELO rating system tracks skill over time the way chess platforms do, badges reward milestones, and a leaderboard plus friend system add the social layer that turns "practice" into "community."&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: React + Vite&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Node.js + Express&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database&lt;/strong&gt;: MongoDB Atlas&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time layer&lt;/strong&gt;: Socket.IO&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code editor&lt;/strong&gt;: Monaco Editor (the same engine that powers VS Code)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code execution&lt;/strong&gt;: Glot.io API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI layer&lt;/strong&gt;: Google Gemini, for both question generation and in-battle hints&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Gemini Mattered
&lt;/h2&gt;

&lt;p&gt;The hardest part of building any coding practice platform isn't the UI or even the real-time infrastructure — it's content. A finite, hand-written question bank gets memorized and gamed fast. Plugging Gemini into the question-generation pipeline meant CodeArena could produce novel, difficulty-calibrated problems on demand, and use the same model conversationally to give context-aware hints during a live match — something a static hint system simply can't do. It turned an AI API call into the actual backbone of the product's core value: infinite, adaptive, real competition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building It — Warts and All
&lt;/h2&gt;

&lt;p&gt;This entire platform was built end-to-end in a single, intense development push — architecture, backend, real-time sync, AI integration, and UI — all from Windows PowerShell after running into persistent VS Code tooling issues. That constraint forced a much more deliberate, script-driven workflow than the usual point-and-click IDE experience, and surfaced (and forced fixes for) several non-trivial bugs in socket state management and match synchronization that a smoother dev environment might have let slide.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;CodeArena is still very much a work in progress — I'm actively iterating on it, not treating it as "done." Current focus areas on the roadmap: tournament brackets, a spectator mode, and deeper analytics on where players lose time mid-battle. Expect the live version to keep evolving as I add features and fix rough edges.&lt;/p&gt;

&lt;p&gt;If you're a competitive programmer tired of solo grinding, or a fellow builder curious how Gemini can power more than just chatbots, I'd love to hear from you.&lt;/p&gt;




&lt;p&gt;*Built by Chirashri Jagannatha Sapaliga,  CS Engineering Graduate at Alva's Institute of Engineering and Technology, Mangalore.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>googlecloud</category>
    </item>
  </channel>
</rss>
