I once created a tower of hanoi solver in one index file. I since broke it up into 3: html, css, and js, but it doesn’t use any frameworks or non-standard magic. Wrote it years ago to help my son understand the Tower of Hanoi problem. And it still works!
https://ganchrow.com/andrew/towerofhanoi/
ETA: It’s kind of a pain to use, but it was fun to write.