Architecture & Code Evolution

5 Generations of the Playground

Follow how our full-screen Monaco Editor workspace evolved from multiple imperative folders into a clean, zero-boilerplate declarative event delegation powerhouse.

From Wiring Spaghetti to Single Source of Truth

Each folder below represents a distinct evolutionary milestone. You can click Launch on any version to open its interactive Monaco Editor playground with live tabs (columns.json, template.json, output.json) and test raka, template, and build transformations in real-time.

Milestone 1 Imperative Handlers
v1
Modular Handlers

Separated buttons into dedicated folders (rakaBtn/, templateBtn/, buildBtn/). Each folder imported Monaco models and attached its own addEventListener directly to DOM IDs.

4 Folders Imperative Wiring
Launch v1
Milestone 2 Declarative Loop
v2
Instruction Bindings

All button folders vanished! Replaced with a human-readable bindings.json and clean actions.js, driven by a centralized container event delegation loop.

bindings.json Local Loop
Launch v2
Milestone 3 CDN Library (v4)
v3
CDN Delegation (v4)

The local delegation loop was removed entirely. In its place, bindEvents is imported directly from dom-primitive-bindings CDN (dist/v4/min.js) hosted on GitHub Pages.

CDN dist/v4 Zero Loop Code
Launch v3
Milestone 4 CDN Library (v5)
v4
CDN Delegation (v5)

Upgraded remote package to dist/v5/min.js of dom-primitive-bindings. Retains pure declarative configuration with enhanced event bubbling guards.

CDN dist/v5 Hardened Guards
Launch v4
Current · Production Recommended
v5
Production Workspace

The pinnacle of the architecture: Monaco Editor loaded with 3 synchronized JSON models, declarative instructions in bindings.json, clean actions in actions.js, and zero DOM boilerplate.

Full-Screen Monaco Declarative JSON Contract Single Source of Truth
Launch v5 Playground
Latest production build

Architectural Comparison Matrix

Version Wiring Paradigm Folder Count Code Density Delegation Layer Action
v1 Multiple folders with addEventListener on IDs 4 folders High (lots of boilerplate) None (direct listeners) Open
v2 Declarative bindings.json + actions.js 1 folder Medium (local loop in JS) Local custom loop Open
v3 Declarative JSON + CDN Import 1 folder Low (loop code vanished) dom-primitive-bindings CDN v4 Open
v4 Declarative JSON + CDN v5 1 folder Minimal dom-primitive-bindings CDN v5 Open
v5 Production Declarative Monaco Workspace 1 folder Pure Single Source of Truth dom-primitive-bindings CDN v5 Open