Skip to content

Moodle Playground

Moodle Playground

Moodle running entirely in your browser, via WebAssembly. No server, no installation, no data leaves your machine.

Open the playground GitHub License GPL

What is this?

Moodle Playground lets you run a full Moodle LMS instance in your browser for learning, testing, and prototyping course experiences. Perfect for:

  • Teachers evaluating new activities without touching a production server
  • Plugin developers testing changes before pushing to a live site
  • Trainers giving workshops where every attendee gets a disposable Moodle
  • Researchers reproducing a specific Moodle version in an isolated environment

The runtime is fully ephemeral: everything lives in memory and resets when you close the tab.

Default credentials

Username admin, password password. Override them via a blueprint if needed.

How it works

The project is a layered architecture with clear boundaries:

┌─────────────────────────────────────────────────────────┐
│  Shell UI  (index.html · src/shell/main.js)             │
│     toolbar · URL bar · iframe host · runtime logs      │
├─────────────────────────────────────────────────────────┤
│  Runtime host  (remote.html · src/remote/main.js)       │
│     registers the service worker                        │
├─────────────────────────────────────────────────────────┤
│  Request routing  (sw.js · php-worker.js)               │
│     intercepts HTTP requests, routes to PHP runtime     │
├─────────────────────────────────────────────────────────┤
│  PHP / Moodle runtime  (src/runtime/*)                  │
│     boots Moodle via @php-wasm/web                      │
├─────────────────────────────────────────────────────────┤
│  Generated assets  (assets/moodle/)                     │
│     prebuilt ZIP bundle (extracted into MEMFS at boot)  │
└─────────────────────────────────────────────────────────┘

See the Architecture overview for the full picture.

Quick start

Nothing to install — just open the hosted instance:

https://moodle-playground.com

# Clone
git clone https://github.com/ateeducacion/moodle-playground.git
cd moodle-playground

# Install and build
npm install
make prepare
make bundle

# Start the dev server
make serve

Then open http://localhost:8080.

Provision a site with a custom name and a demo course in one go:

https://moodle-playground.com/?blueprint-url=/assets/blueprints/examples/demo-course.blueprint.json

See the Blueprint gallery for more.

Features

  • PHP 8.1 → 8.5

    Version depends on the Moodle branch; default 8.3.

  • Moodle 4.4 / 5.0

    Multiple upstream branches built at the same time.

  • SQLite via PDO

    Experimental driver patch — see MDL-88218.

  • Fast boot

    Pre-built install snapshot boots in ~3 s vs ~8 s for a full install.

  • Blueprints

    Step-based JSON to provision users, courses, enrolments, modules, and more.

  • Works on GitHub Pages

    Subpath-aware; deployable as a static site.

Where to go next

CI/CD and GitHub Actions

The project includes a reusable GitHub Action for live PR previews:

The main CI/CD pipeline (.github/workflows/ci.yml) handles linting, unit tests, Playwright E2E (Chromium + Firefox), and deployment to GitHub Pages on push to main.


Made with by Área de Tecnología Educativa