This is my first update in a while. In this update, I have massively refactored the code and project structure of GitGud. For context, GitGud was initially intended to help people learn Git in an interactive way (in celebration of Git’s birthday). However, it turned out much better than I expected, so I decided to transform it into a fully customizable platform to help people learn any topic.
To make the whole project more maintainable/scalable, I refactored the project to use engine.js and config.js files instead of the prior script.js and chapters.js. The task splitting between those two files remains largely similar; the engine.js file handles the main computing and logic of the game, while the config.js file handles the content and learning materials.
The key difference is in the config.js file because it now stores styling data, such as CSS variables and colour palettes, in addition to stories and questions. This means anyone can use the project as a learning platform template by only modifying the config.js file to create their own questions and stories. (No need to modify the base JS logic or HTML document besides some minor changes)
Another change I made in this update is the improved onboarding tour highlight to dynamically adapt to the highlighted UI element (the previous version was not neat and had inconsistent border-radius). For the next update, I plan to improve some of the UX and UI to make the flow more seamless and more customizable (e.g., advanced controls like typing animation speed, and on/off in the settings panel). I’m also still continuously doing bug fixes to make the site more reliable.