Inspiration Passive consumption is the enemy of actual learning. We spend hours watching video essays, scrolling technical deep-dives, and reading complex documentation—only to forget 80% of it three days later because our brains weren't forced to recall the information.

Traditional quiz apps solve this problem, but they are limited by static, pre-built decks. If you want to test yourself on a highly niche topic, you are usually out of luck. We wanted to build an antidote to passive scrolling: an on-demand testing engine that meets human curiosity exactly where it wanders. If you can think it, our app can test you on it.

What it does Our application turns any string of text into a fully interactive, personalized micro-exam in under three seconds.

Dynamic Generation: Users input any topic imaginable—from “Cellular Mitosis” to “The Lore of the 1998 Furby.”

Tailored Parameters: The app adjusts question count, difficulty tier (Casual, Intermediate, or Expert), and question styles on the fly.

Interactive Testing Loop: Renders questions in a sleek, distraction-free flashcard interface that tracks real-time progress.

Instant Feedback Mechanics: Instead of just showing a score at the end, the app provides a tailored explanation for every missed concept, shifting the experience from a simple test to an active learning session.

How we built it We prioritized a lightweight, ultra-responsive architecture capable of handling highly structured data:

Frontend: Built with Next.js (App Router) and Tailwind CSS for a responsive, clean user experience. We used Framer Motion to handle fluid layout animations and card-swapping transitions.

AI Core: Powered by the Vercel AI SDK to manage streaming inputs and prompt orchestration with underlying language models.

Data Validation: To ensure the AI never breaks the UI, we used Zod to strictly enforce a JSON schema output. The API guarantees that the client always receives a clean data structure containing the question text, multiple-choice options, correct index, and contextual explanation.

State Management: Handled locally via Zustand to ensure zero lagging or unnecessary re-renders during the test loop.

Challenges we ran into The JSON Parsing Nightmare LLMs love to chat. Early iterations frequently failed because the AI would add polite wrappers (e.g., "Sure! Here is your quiz about frogs...") or wrap its data in markdown backticks. This instantly caused JSON.parse() crashes on the client side. We solved this by implementing strict system prompts combined with runtime schema validation at the edge.

Staring at the Loading Screen Generating a complete 10-question quiz with high-quality, plausible wrong answers takes an AI roughly five seconds. In web design, five seconds of static waiting feels like a broken app. We resolved this by streaming the JSON structure. The moment Question 1 is formed on the backend, it renders on the user's screen while the remaining questions silently stream into the background state.

The Gibberish Input Problem Users will always test boundaries. Inputting random strings like "asdfghjkl" or offensive topics either broke the AI's logic or generated nonsense quizzes. We had to build a rapid, low-latency pre-flight check that forces the AI to evaluate the input safety and legibility before attempting to draft the test.

Accomplishments that we're proud of Sub-Second Perceived Latency: By implementing streaming arrays, we dropped the time-to-first-question from 5.2 seconds to under 800ms.

High-Fidelity Distractors: We successfully engineered the prompts to generate "distractors" (wrong answer options) that are highly plausible and genuinely challenge the user, avoiding dead giveaways.

Bulletproof Type Safety: Achieving a 100% successful parsing rate over hundreds of wildly varied user prompts during our internal stress testing.

What we learned Prompts are Source Code: Treat prompts with the same rigor as typed functions. Vague instructions yield variable results. Clean constraints, explicit examples, and strict type schemas yield reliable software.

Perceived Performance > Raw Performance: You cannot magically make an LLM run at instantaneous speeds, but you can build a user experience that makes waiting engaging through smart micro-interactions and skeleton loaders.

What's next for Quiz app

  1. Multi-Modal Inputs Moving past simple text boxes. We want users to be able to upload a PDF textbook chapter, snap a photo of a museum placard, or drop a YouTube link and say: "Quiz me on this."

  2. Spaced Repetition Integration Integrating an algorithmic review system (like Anki). The application will automatically track the specific concepts a user misses and build a custom, cumulative "review deck" that prompts them via notifications 24 and 72 hours later to lock in the long-term memory.

  3. Real-Time Head-to-Head Duel A multiplayer lobby system where two users can type in a shared niche topic, launch a synchronous room code, and compete live on the exact same freshly generated exam to see who finishes faster with the highest accuracy.

Built With

Share this project:

Updates

Submission history