<PS/>
Case StudyFeaturedLast updated: September 6, 2026

Codervai CP Platform

Competitive programming training platform for BUET CSE alumni and Googlers at Codervai. An admin-triggered chapter-publishing flow keeps 4,000+ students moving through curated modules. Atomic PostgreSQL upserts handle streak tracking without race conditions when thousands of students submit near midnight.

Next.jsReactTypeScriptTailwind CSSNode.jsPostgreSQL (raw SQL via node-postgres)HLS Video Streaming (BunnyCDN Stream + YouTube)
Client
Codervai / BUET CSE Alumni & Googlers
Role
Full-Stack Developer
Timeline
2024 – 2025
Stack
7 technologies
Gallery

A closer look

4 shots · click to expand
Codervai All Courses & Bundle Catalog
01 / 04Codervai All Courses & Bundle Catalog
Codervai Student Learning Cockpit, Streaks & Module Progression
02 / 04Codervai Student Learning Cockpit, Streaks & Module Progression
Enrolled Competitive Programming Courses & Course Bundles
03 / 04Enrolled Competitive Programming Courses & Course Bundles
Codervai Competitive Programming Academy Homepage
04 / 04Codervai Competitive Programming Academy Homepage
Stack
Next.jsReactTypeScriptTailwind CSSNode.jsPostgreSQL (raw SQL via node-postgres)HLS Video Streaming (BunnyCDN Stream + YouTube)
Key Features
  • Admin-triggered chapter publishing: instructors flip a chapter live from the CMS, which immediately notifies every enrolled student — a simple, reliable release mechanism instead of the more failure-prone cron-scheduled pacing it was pitched as
  • Atomic SQL UPSERT for streak tracking: a single INSERT ON CONFLICT DO UPDATE with CASE logic decides same-day/consecutive-day/reset in one database round-trip, with same-day idempotency and anti-backdating built into the WHERE clause
  • 300+ curated algorithmic problems from C++ STL fundamentals through Dynamic Programming, Graphs, and Trees
  • Live cohort leaderboard ranking students by problems solved and streak, backed by the same streak-tracking data
  • Video walkthroughs delivered via BunnyCDN Stream (HLS) or YouTube embeds — no custom encoding pipeline, because reinventing video infrastructure wasn't worth the engineering cost for this platform
  • Student dashboard tracking module completion, learning streaks, and leaderboard position
  • Problem solutions paired with video walkthroughs explaining the reasoning, not just the accepted code
Working Together

Need a similar delivery process for your product? I can help shape the scope and ship the implementation end to end.

Start a project
01Problem

Competitive programming has a well-known attrition problem: students get access to a large problem bank, attempt problems that are too advanced for their current level, get frustrated, and drop out. The knowledge dependency tree is real — you can't reason about graph algorithms if you're still shaky on recursion.

The Codervai team — BUET CSE alumni and Google engineers — wanted a structured training program that enforced the right learning sequence without feeling like a rigid lockdown. Engagement mechanics like daily streaks only work if they're trustworthy — a burst of near-midnight submissions, all racing to protect a streak before the day resets, will silently corrupt a naively-implemented counter under concurrent load.

02Approach

Course content ships as chapters that instructors publish explicitly from the admin CMS rather than on a fixed cohort calendar — a chapter goes live the moment it's ready, and every enrolled student is notified immediately. That's a deliberate trade: less "shared pacing" theater, more reliability, since a publish button doesn't silently fail the way a cron-scheduled unlock can.

The streak concurrency problem required moving all logic to the database level. The naive approach — read the current streak, compute the new value, write it back — has a race condition when two submissions arrive for the same user within milliseconds. The fix is a single atomic SQL INSERT ON CONFLICT DO UPDATE with CASE logic: check whether yesterday was active, whether today has already been counted, or whether the streak needs to reset, all inside one WHERE-guarded statement so a stale write can't clobber a newer one.

For video, we deliberately didn't build a custom encoding pipeline. Editorial walkthroughs are delivered through BunnyCDN Stream (HLS) or plain YouTube embeds — proven infrastructure for the actual problem, rather than an in-house transcoding stack that would mostly duplicate what a CDN already does well.

03Solution

The platform runs as a structured curriculum with a live problem bank and an admin-controlled publishing flow: students get access to a chapter the moment an instructor marks it live, with an immediate notification. Each module pairs curated problems with in-depth video editorial walkthroughs — delivered via a CDN, not custom video infrastructure — that explain reasoning and trade-offs rather than just showing the accepted solution. A cohort leaderboard, driven by the same streak-tracking data, gives students a live sense of where they stand.

04Results

The platform has enrolled 4,000+ students across training cohorts, working through a bank of 300+ curated algorithmic problems. Streak tracking runs correctly under concurrent midnight submissions without duplicate increments or missed streaks — the atomic SQL implementation handles concurrency transparently at the database level, with same-day idempotency and anti-backdating guards built into the query itself.