Interesting to see a completely custom renderer. Look at the page through dev tools inspector - it's just a single canvas inside body. Everything is drawn using the Canvas API. Not even WebGl, just a regular old 2d context, bunch of fillRect's and drawImage's.
You can write validation schemas using zod library [1]. They end up looking pretty similar to typescript definitions (same vocabulary, same methods for combining/intersecting/filtering). And if you migrate to typescript you'll get type definitions for free out of those schemas.