Case studies

Code Forge: Python running in the browser, with 81 levels and spaced review

Code Forge is a platform for learning Python in depth: 9 chapters and 81 levels, each with a short lesson and a task checked by real tests. Python runs in the browser itself via WebAssembly (Pyodide), with no server, and what was learned comes back as spaced-review cards.

Client
Gomes Code product
Sector
Web product · education

Client and context

Practice platforms usually need a server to run students' code, which is expensive and exposes infrastructure. And what is learned one day is gone the next week.

The problem

“I want to practice real Python, with tests, without installing anything and without forgetting it all a week later.”

Constraints

  • No server to run code.
  • Infinite loops cannot freeze the page.
  • Progress saved with no account.

Decisions and trade-offs

  1. Python in a Web Worker with Pyodide

    Why: Real execution in the browser, no backend and no cost per student. A run longer than 15 seconds terminates the worker and a fresh runtime boots automatically.

  2. YAML content validated against the real harness

    Why: Every reference solution, starter and quiz runs against the real tests before publishing.

  3. Spaced review (Leitner)

    Why: Completed levels become cards returning after 1, 3, 7, 16, 35 and 80 days; skill measures what was recalled, not time spent.

What we built

  • A Python track with 9 chapters and 81 levels, including a boss per chapter and a chapter on programming with AI.
  • Monaco editor with tests run by Ctrl + Enter.
  • Review cards, interleaved sessions, skills and rank based on what was recalled.
  • Portuguese and English, light and dark themes.

Results

  • 81levels in 9 chaptersSource: Live site
  • 361automated tests across the track's exercisesSource: Repository content, Oct 13, 2026
  • 0servers to run students' codeSource: Project architecture

This case's tile

Number of tests grading the exercises of each of the 9 Python track chapters.

Automated tests per chapter
Automated tests per chaptertests
Foundations34
Functions and iteration38
Classes and objects43
Data structures30
Files, data and tests40
Advanced Python48
Traps42
Under the hood46
Programming with AI40

Source: Code Forge content · 2026-10-13

Technologies

  • React
  • Pyodide
  • WebAssembly
  • Monaco Editor
  • Web Workers
  • Jest

See it live: danillogomes.com/code-rpg

Want something at this level?

Send the problem, not a spec.