A Scratch-style, block-based Python learning tool. Drag blocks, watch readable Python appear in real time, run it entirely in the browser, and see the result — no backend server required.
Core loop: drag blocks → generated Python updates live → click Run → Python executes via Pyodide in a Web Worker → output shows in the Console and the themed Stage panel → errors are caught and explained in plain language → save, load, or export the project.
- Custom Python-focused Blockly blocks — print, variables, math, logic,
control flow, and a
waitblock for timing/animation — each with a deterministic, readable Python generator (seesrc/blockly/). - Pluggable runner abstraction —
BrowserPyodideRunneris the first implementation ofRunnerInterface;LocalPythonRunnerandDockerSandboxRunnerare documented future targets (seeARCHITECTURE.md). - Beginner-friendly error messages — tracebacks are normalized into plain language with an "advanced" toggle for the raw traceback.
- Project persistence — save/load via
localStorage, export to.pyor a portable.jsonproject file, import it back. - Live demo splash screen — on first load, the app demonstrates itself: real blocks drag in from the real palette, assemble a working program, run it, and save it, before handing control to you.
npm install
npm run devThen open the printed local URL. npm run build produces a static
production build (dist/) — the whole app is client-side, so it can be
hosted anywhere that serves static files.
| Command | Description |
|---|---|
npm run dev |
Start the Vite dev server |
npm run build |
Type-check (tsc -b) and build for production |
npm run preview |
Preview the production build locally |
npm run lint |
Run Oxlint |
src/
blockly/ Custom block definitions, Python generators, toolbox
runner/ RunnerInterface, BrowserPyodideRunner, Pyodide worker
project/ Save/load/export (localStorage + file-based)
demo/ The live block-building demo script + player
components/ React UI: editor, code/console/stage panels, toolbar
See ARCHITECTURE.md for the deeper technical rationale
behind the runner abstraction and future backend-execution targets.