Loading portfolio
Prem Sai KotaSoftware Engineer
Projects
9 / 11
2025·Real-time quiz platform·View Website

QuizWhiz

A competitive quiz application exploring real-time game-state synchronization with Firestore and AI-assisted quiz generation.

Next.js
Firebase
TypeScript
Google Gemini
Tailwind CSS

Live Multiplayer Quizzing Without Signups

Organizing live interactive quizzes for university tech clubs or classroom sessions typically requires either expensive commercial subscriptions or cumbersome sign-up processes that frustrate participants. Our team built QuizWhiz to solve this friction, creating a real-time, serverless quiz application where attendees simply scan a QR code and join live sessions with a nickname. Working alongside Lakshya Chitkul and Eeshitha Gone, I contributed roughly a third of the codebase, focusing on the AI quiz generation pipeline, administrative authentication, gameplay synchronization logic, and production deployment.

Real-Time Game Synchronization via Firestore

Rather than maintaining dedicated WebSocket servers to coordinate live game state, we designed QuizWhiz around Firebase Cloud Firestore snapshot listeners. The entire multiplayer lifecycle—from lobby waiting rooms to active question countdowns, answer reveals, and final podium rankings—is synchronized through structured Firestore documents and subcollections. When the quiz host advances to the next question, the document update is pushed to every connected participant's device through its Firestore listener. This architecture allowed us to support concurrent classroom players reliably without managing server infrastructure or connection pools.

Automated Quiz Generation with Genkit

Manually researching and writing dozens of technical trivia questions before every club meetup was a major administrative bottleneck. I engineered an automated quiz generation workflow using Google Genkit and the Gemini API. Organizers enter a topic—such as JavaScript internals, cloud fundamentals, or operating systems—and specify difficulty levels. The Genkit flow generates structured multiple-choice questions validated against Zod schemas, producing verified options, correct answer indices, and time limits within seconds. I also built manual editing controls allowing organizers to tweak or replace generated questions before launching sessions.

Securing Scoring Against Client Tampering

In competitive campus environments, client-side tampering is a genuine concern. If answer keys are shipped to client browsers alongside question payloads, technically inclined students can easily inspect network frames or DOM states to score perfect rounds. We eliminated this vulnerability by. Participant answer submissions are processed by serverless Firebase Cloud Functions that record each answer and update the participant's score and answered count.

What QuizWhiz Taught Us

Building QuizWhiz gave us practical insights into designing real-time serverless applications. While Firestore snapshot listeners make multiplayer synchronization straightforward to set up, unmanaged listener churn and rapid document writes can quickly trigger quota limits if not planned carefully. Learning to structure subcollections cleanly, enforce atomic document updates, and handle mobile network drops during live events taught us how to build dependable collaborative software on top of serverless primitives.