Technical details

Tech Stack

Built with Tailwind CSS. The static HTML/CSS layouts were generated using Stitch to speed up UI development, allowing me to focus on the logic like chat interaction, quiz generation and parsing, and progress tracking. Chart.js was used to make the beautiful and interactive charts.

Why use AI for the static HTML and CSS? I already know HTML and CSS, using AI to generate it sped up the process and ensured I had time for the backend logic, demo, and documentation, which is crucial as I am doing the hackathon solo.


Quiz Generation Flow Diagram

1

User uploads their study material

This can be in the form of a PDF, .docx file, .txt file, or just plain text in the text area

2

Content gets parsed

After they click the button to generate the quiz, the backend uses format-specific libraries to produce the chunks of text that can be passed to the LLM. As said above,

  1. PDF - PyMuPdf

  2. .docx - Python-docx

  3. .txt file - Python's file handling (with open())

  4. Text from the text area - Direct string concatenation

3

Sent to Gemini 2.5 flash lite

Tweaking the config parameters ensure it only returns a JSON object which can easily be converted into a dictionary-containing list using json.loads()

4

Rendered in the frontend

By using Jinja, the empty "take_quiz.html" is easily populated with quiz blocks using a for loop and Jinja variables.

5

User takes quiz

The quiz persists in the session as long as the user does not click the submit button, so they can come back after a break and maybe forget about the quiz, but Saathi won't

6

Results generated + saved

The results are calculated instantly and the user is taken to a results page, showing their score and the prompt they can use for understanding where they went wrong and how to improve.

7

Visualized using Chart.js

Whether they performed well or not, seeing how underwater you really are is a motivational boost for a lot of people which keeps them going, even when STEM is throwing complex math at your face. Specifically, the page has,

  • Line graph showing accuracy trends over last 10/15/20/25/30 quizzes

  • Overall stats card displaying: total quizzes, questions answered, current streak, improvement %, average accuracy, best accuracy (in the last 30 days)

Last updated