We should break up the codebase into submodules for maintainability. I laid out a general idea of what we could do but am open to discussion. My high-level thoughts:
we should put all scripts in /lib
we should have a helpers folder of general-purpose functions (currently /lib/utils)
we should separate the remaining former main.ts file into separate sections. I did html/css/js but see a world where we split it by type so page/frame/span/text with multiple functions in them for css/js/html
We should break up the codebase into submodules for maintainability. I laid out a general idea of what we could do but am open to discussion. My high-level thoughts: