04

Practice · Judge · C++ / Python / JS

CodeMech

You can explain DP — but can you type the table?

RoleSolo — design & build
Year2026
StackNext.js · Prisma · Judge0
StatusLive
web-production-4173a.up.railway.app/problems
CodeMech problems index with grouped drills by category and difficulty
The problems index — grouped drills across arrays, graphs, DSU, and prefix structures, each judged on submit.

01 Problem

Interview prep drills whole algorithms, but failures usually sit one level lower: the constructions every solution starts with. Sizing a 2D vector, building an adjacency list, path-compressing a DSU, querying a Fenwick tree. Fumble those mechanics and the clever part never gets written.

02 Approach

CodeMech is a drill site for exactly that layer: 54 small judged exercises across vectors, difference arrays, two pointers, graphs, DSU, Fenwick and segment trees, tries, and monotonic structures. Each problem ships a statement, a starter, a harness, and reference solutions, in C++, Python, or JavaScript wherever the mechanic applies.

Submissions compile and run through Judge0 in production, with a sandbox-free local judge for zero-key dev loops. Problems are file-defined under problems/<slug>/ and seeded into Postgres, grouped into assessment sets with free-tier and repeat-gap rules. A per-user daily judge quota, auth with verified-email admin gating, password reset, and Stripe passes round out the site.

03 Tech stack

Frontend

Next.js 16 (App Router)React 19Monaco editorTailwind

Backend

PrismaPostgresNextAuthJudge0Zod

Infrastructure

RailwayStripeVitestPlaywright e2e

04 Outcome

54

judged drills across arrays, graphs, DSU, and range structures

3

languages — C++, Python, and JavaScript with per-language limits

It is live with signup, judging, assessment sets, and premium passes. The catalog is validated by a problem-layout gate, unit tests, and e2e specs, and a two-minute local setup (no API keys) keeps adding a drill as cheap as adding a directory.