How irdkwmnsb/visualizer works
Project type and purpose
• This is a front‑end algorithm‑visualization toolkit/library, built with React + TypeScript, packaged via Vite and delivered as both a standalone “app” and an embeddable plugin.
• Its goal is to provide core data structures, rendering components, and a manifest of visualizers (bubble‑sort, k‑means, Turing machine) that can be launched in a browser or integrated into other pages via the plugin templates.
File structure
• Top level:
• Configuration & CI: .eslintrc.cjs, tsconfig.json, vite.config.ts, GitHub Actions workflows for build/deploy.
• plugin/: HTML/TSX templates and entrypoint (plugin/index.ts) for generating embeddable visualizer pages.
• src/: the heart of the library
– Entry points: Index.tsx, App.tsx + SCSS modules
– core/: registration & runtime (manifest of visualizers, a React wrapper, global store)
– visualizers/: one folder per algorithm, each with its own start, render, logic modules
– data/, utils.ts, temp.ts: shared data models and helpers
README for additional insights
• Although the English README is sparse, the TODO list emphasizes:
• a “core library” with typed APIs
• rendering and editing components
• efficient data structures for algorithms
• auto‑discovery of visualizers via decorators
• integration with consumer applications via the plugin system
Detail without overcomplicating
• How the manifest auto‐discovers visualizers and how the store mediates state
• Plugin’s role as the bridge between external pages and internal core