It's live at quizzine.jyunth.tech. I'll personally add the quiz questions as soon as the NPTEL season begins!
Quizzine is an easier way to study the questions and answers for NPTEL examinations. I simply scraped all the questions, options and the correct answers and made a large JSON file. This JSON file is what’s used to generate the quiz components inside the application. I specifically opted for this instead of some hardcoded nightmare because I wanted this to be modular, the JSON file could just be switched the app should still work seamlessly with the new set of questions, as long as the JSON schema is the same.
Another thing to note is the fact that I didn’t use a database for this. The user stats and configuration was stored in the local storage of the user’s browser. Since this is specific to each user, I isolated these variables and dumped them into the localstorage so that this object is used whenever they load the website again. The whole experience is very seamless thanks to this.
It’s important to be lean and mean for these kind of applications, so the questions are stored in the public folder as a JSON file and is served to people when the load the website. This way I retain control over the question bank and make any edits if I have to. This helped a lot when I realized I had accidentally marked an option wrong for a question and I had to immediately change it out for the right one. Had I put the question bank in the user local storage, it would’ve never gotten updated.
More upgrades I made along the way were memoizing the questions. This bumped the speed of loading the next question from the JSON question bank a minimum of 20x faster. It is blazing fast to go from one question to another, and you feel how snappy it is thanks to this. I then made this website into a PWA, which meant people could install this as an app on their mobile phone and use it as one. It was very interesting figuring this out and was very gratifying seeing a near native app run on my phone seamlessly.
This final addition was very much an unnecessary one, but I added a confetti animation when you finish a quiz with 100% accuracy. What I thought would be a very unnoticed feature which would at most incite a small smirk in the user turned out to be something everyone appreciated a lot. The dopamine rush of seeing confetti fly seemed to have had a very positive effect on people taking the quiz.
I plan to make more updates to the app this semester, making it faster and adding a couple of new revision modes.