You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Correct live-demo URL (anksharma11 -> beingmartinbmc GitHub Pages)
- Bump documented Node requirement to 22+ to match CI
- Add the test/test:watch/test:coverage npm scripts to Quick start
- Replace stale 'Tests: none yet' with the real Vitest suite + 85% CI coverage gate
- Fix nonexistent useTones reference -> shared useSound hook
Co-authored-by: beingmartinbmc <beingmartinbmc@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
An interactive, browser-based playground for learning algorithms, data structures, and Git through animation. Every algorithm runs in the browser as pure TypeScript — no backend, no telemetry, no tracking.
@@ -27,14 +27,17 @@ An interactive, browser-based playground for learning algorithms, data structure
27
27
28
28
## Quick start
29
29
30
-
Requires Node 20+.
30
+
Requires Node 22+.
31
31
32
32
```bash
33
33
npm install
34
-
npm run dev # Vite dev server with HMR
35
-
npm run lint # ESLint (strict; CI blocks on errors)
36
-
npm run build # tsc + vite build → docs/ for GitHub Pages
37
-
npm run preview # serve the production build locally
34
+
npm run dev # Vite dev server with HMR
35
+
npm run lint # ESLint (strict; CI blocks on errors)
36
+
npm test# run the Vitest suite once
37
+
npm run test:watch # Vitest in watch mode
38
+
npm run test:coverage # run tests with v8 coverage report
39
+
npm run build # tsc + vite build → docs/ for GitHub Pages
40
+
npm run preview # serve the production build locally
38
41
```
39
42
40
43
## Architecture
@@ -60,7 +63,7 @@ The pure-TS layer (`algorithms/` or `engine/`) returns arrays of `Step` objects
60
63
61
64
1. Create `src/features/myThing/`.
62
65
2. Write `algorithms/myThing.ts` — a pure function from input → `MyThingStep[]`.
63
-
3. Write `hooks/useMyThing.ts` — `useState` for the step pointer, `setTimeout` (or shared `useTones`) for playback.
66
+
3. Write `hooks/useMyThing.ts` — `useState` for the step pointer, `setTimeout` (or the shared `useSound` hook) for playback.
64
67
4. Write `components/MyThingCanvas.tsx` and `MyThingControls.tsx`.
65
68
5. Add a `MyThingPage.tsx` that composes the above.
66
69
6. Lazy-import the page in `src/App.tsx` and add a `<Route>`.
@@ -98,7 +101,7 @@ npm run build
98
101
99
102
-**TypeScript:**`tsc -b` passes with zero errors. Strict mode, `verbatimModuleSyntax`, `noUnusedLocals`, `noUnusedParameters`, `erasableSyntaxOnly`.
100
103
-**ESLint:** zero errors, zero warnings.
101
-
-**Tests:**none yet — pure step-builders in `engine/`and `algorithms/` are the natural targets when added.
104
+
-**Tests:**Vitest suite covering the pure step-builders in `algorithms/`(sorting, graph pathfinding, tree traversals, tree generation, linked-list algorithms, random-input helpers). CI runs `vitest run --coverage` and blocks merges below an 85% coverage gate.
102
105
-**Bundle:** initial route loads only landing-page + section-index chunks; feature pages are code-split.
0 commit comments