Back to docs
Part I · AlgoLens Whitepaper

Vision, Philosophy, and Future Architecture

Run once. Understand forever.

AlgoLens is not another animation website. It is a trace-first platform for making algorithm execution portable, replayable, explainable, and visual everywhere.
Single-section article

The trace-first thesis

For decades, developers have learned algorithms by reading code, stepping through IDE breakpoints, or watching prebuilt animations. These approaches remain useful, but they all leave the hardest work to the human brain: reconstructing the state transitions, invariants, comparisons, recursive boundaries, and structural mutations that make the algorithm meaningful.

AlgoLens reverses the usual model. Code is no longer the primary artifact. The primary artifact is the state of the algorithm over time. Every execution becomes a Universal Trace: a language-independent record of what actually happened, designed to be rendered on the web, replayed through an API, inspected in a CLI, exported to static formats, and interpreted by AI without guessing from source text alone.

This architecture treats the engine as the single source of truth. The web application, the public API, and the CLI are not separate products with duplicated logic. They are clients of the same Universal Trace Engine. That is the central architectural decision that makes AlgoLens viable as a long-term platform rather than a collection of visual demos.

Code
  ↓
Execution
  ↓
Universal Trace
  ↓
Any Renderer
  ↓
Web · API · CLI · GIF · PDF · SVG · Notebook · IDE
The engine never knows whether React, Next.js, Monaco, a terminal, or an external client exists.
A trace is portable because it describes execution, not presentation.
A renderer can evolve independently from the algorithm that produced the trace.
The north star for every future decision is whether it makes the trace more universal.