Sparkd
Inspiration
We've all been there — staring at a pile of lecture notes the night before an exam, re-reading the same pages over and over, and retaining almost nothing. Traditional studying is passive, repetitive, and frankly, boring. Games are engaging by design, so what if studying felt less like a chore and more like a boss battle?
What it does
Sparkd lets students upload a PDF of their lecture notes and instantly generates a personalized multiple-choice quiz powered by Gemini AI. The quiz is played as a gamified RPG battle — answer correctly, and you deal damage to the enemy, answer wrong and you take a hit. Players can have questions read aloud to them and even answer using their voice, making the experience accessible. A score history lets users track their progress over time.
How I built it
I built Sparkd as a full-stack web app using Next.js 15 for both the frontend and backend API routes. Firebase handles authentication, and Firestore handles the database. The quiz generation pipeline extracts text from uploaded PDFs using pdf2json, then sends it to the Gemini API with a structured prompt to generate questions. The game screen features custom sprite animations, sound effects, and health bars to bring the RPG feel to life. The voice answer feature uses the ElevenLabs speech-to-text API, and text-to-speech is handled via the browser's native Web Speech API.
Challenges we ran into
Getting the PDF text extraction to work reliably in a Next.js server environment was trickier than expected — most PDF libraries rely on browser APIs or web workers that don't exist server-side. We went through several libraries before landing on one that worked cleanly in an API route. Turbopack compatibility with certain packages also caused unexpected crashes during development.
Accomplishments that we're proud of
I'm proud of how complete and polished the end-to-end experience feels. The voice answer feature in particular came together really well. I'm also proud of the sprite animation system, which was built entirely from scratch using canvas and sprite sheets.
What I learned
I learned about how fast and useful Next.js is for web applications, because you forgo the need to manage separate servers for frontend and backend. I also gained a deeper appreciation for prompt engineering and how much the quality of output depends on how precisely you ask.
What's next for Sparkd
There are several directions to go in. I'd want to increase engagement by adding a leaderboard and adding more enemy characters to fight. I also want to focus on the learning, diving deeper into progress tracking and improvement analytics.
Log in or sign up for Devpost to join the conversation.