Skip to content
Back to work

KCode

Competitive coding platform with weekly challenges, automatic grading and live leaderboards.

Write-up in progress: some sections are still draft copy.

Role
Full Stack Engineer
Duration
—
Team
Solo Project
Status
Production
Platform
Web Platform
Completed
September 2026
KCode interface

01

Overview

KCode is a platform for competing, learning and levelling up through weekly coding challenges. Users solve problems in an in-browser editor, submissions are graded against test cases, and results feed a progress dashboard and live leaderboard.

02

Problem

Practising for coding interviews and competitions is more motivating with regular challenges, instant feedback and people to compete against.

03

Objectives

  • Grade real code submissions against test cases.
  • Track progress, accuracy and streaks over time.

04

Solution

  • Weekly coding challenges by difficulty
  • In-browser Monaco code editor
  • Automatic grading for Python and JavaScript submissions
  • Progress dashboard and live leaderboard
  • Groups and discussions

05

Technology

ReactMonaco EditorTanStack QueryZustandTailwind CSSExpressSQLite

06

Architecture

React SPA + Express REST API

React 19 SPA built with Vite, talking to an Express 5 REST API. Server state is handled by TanStack Query and client state by Zustand.

Data. SQLite via better-sqlite3, created and seeded automatically on first run.

API. REST endpoints for auth, challenges, code submissions, leaderboard and groups, plus an admin API for challenge CRUD, groups, user roles and submissions.

Auth. JWT auth with jsonwebtoken, passwords hashed with bcryptjs, and role-based access to the admin API.

07

Key engineering decisions

Performance. One grader process handles every test case for a submission, rather than spawning a process per case.

Accessibility. Keyboard shortcut search and labelled navigation.

Security. Submissions run with a timeout; OS-level isolation (containers, seccomp) is the next step for running untrusted code at scale.

Trade-offs. Ran grading locally with the machine's own python3 and node rather than depending on an external sandbox service.

08

Challenges

Building a test harness that converts inputs and outputs, including linked lists, between JSON and each language.

Grading untrusted code is as much a security problem as a correctness one.

11

Gallery

KCode
KCode

12

Links

Have a problem worth building?

Tell me what the software needs to do and who has to use it. If it is a good fit, I will come back with scope, a build order and a realistic timeline.