https://github.com/user-attachments/assets/e62a0f8f-b508-4d1d-be6a-222cc9136fdd
Instruction-level JavaScript execution visualizer mapping the call stack, heap memory, and event loop in real time.
⭐ If Vivix helps you understand JavaScript, a star helps other developers find it.
"I was using Python Tutor — it's really good but it was only showing the bones. I needed to see the muscles and flesh."
Vivix was built to move beyond high-level syntax explanations. While existing tools provide a logical overview, Vivix provides a physical narrative of how the engine processes code.
Vivix is the only tool that visualizes instruction-level execution alongside simultaneous heap memory. Existing tools often lack support for modern asynchronous patterns or physical memory states.
| Feature | Vivix | Python Tutor | Loupe | JSV9000 |
|---|---|---|---|---|
| Instruction-level stepping | Yes | Yes | No | No |
| Heap memory visualization | Yes | Partial | No | No |
| Async/Await support | Yes | No | No | No |
| Event loop visualization | Yes | No | Yes | Yes |
| Free-form input | Yes | Yes | Yes | No |
| No account required | Yes | Yes | Yes | Yes |
Free-Form Mode — Paste any JavaScript and watch the engine narrate every step. Pattern detection identifies recursion, closures, async/await, scope chains, hoisting, and prototype patterns automatically.
Vivix runs entirely in the browser at vivix.dev. Works in all modern browsers — Chrome, Firefox, Safari, and Edge. No account. No install. No configuration.
To run the repository locally:
git clone https://github.com/HenryOnilude/vivix.git
cd vivix
npm install
npm run dev
The development server will start at http://localhost:5173.
The interpreter runs once per edit inside a Web Worker (src/lib/interpreter.worker.js) and produces a flat, immutable array of step snapshots — one per stack push, heap write, loop iteration, or branch evaluation. The UI never re-executes. Scrubbing the timeline, jumping to step 47, or hitting ⟵ at step 300 is a constant-time array index swap into reactive Svelte 5 $state.
That separation is what makes the animation layer possible. When the step index advances, computeVarDiff (src/lib/shell-logic.js) diffs the current step's vars against the previous step's, tagging each binding new, changed, or same. GSAP is then fired imperatively from that diff — a three-stage causal flourish (100 ms source-line pulse → 300 ms particle travel → 200 ms landing with back.out(1.4) + 600 ms glow fade, defined in src/lib/animations.js). Animations describe cause rather than clock time, so scrubbing backwards through an await resolution or a microtask-queue drain stays visually consistent instead of unwinding a linear timeline.
Two smaller decisions fell out of this shape:
postMessage attempts the raw step array first (zero cost); only on DataCloneError does the worker run a needsSanitize probe and replace functions / symbols / regexps with descriptive placeholders. Closures-in-loops pay the sanitization cost; a for over primitives doesn't.prefers-reduced-motion branch that collapses to a single fade.npm run testVivix is an educational interpreter, not a full JavaScript engine. These trade-offs keep visualizations clear and focused on the concepts that matter most for learning.
let/const inside blocks (if, for, while) share the outer scope. The classic "closure in a loop with let" pattern behaves like var.this in standalone functions — this is only supported for class method calls, not general this binding.push, pop, map, filter, reduce, Object.keys, Math.*) but not the full standard library.new outside classes — use class syntax instead of constructor functions with new.Contributions are welcome across all 12 modules. If you are interested in improving the visualization logic or pattern detection, please follow the tech stack guidelines (Svelte 5 / Acorn) and ensure all tests pass before submitting a PR.
MIT — Free and open source.