How I created a modern quiz application that generates custom tests using Google's AI and deployed it to GitHub Pages.

Idea

Ever wanted to create quizzes on any topic instantly? That's exactly what I built - a React application that uses Google's Gemini AI to generate custom quizzes on any subject you can think of. Whether it's JavaScript programming, world history, or even obscure topics like "medieval cooking techniques," this app can create engaging multiple-choice questions in seconds.

What did I build?

The AI Quiz Generator is a modern web application that,

Try it live →

The Tech Stack

I chose modern, reliable technologies that work well together.

Frontend Technologies

AI and Deployment

How does it work?

The app has three main sections.

The Development Process

Building this was surprisingly straightforward. The biggest challenge was effectively integrating the Gemini AI API. I had to craft the right prompts to ensure the AI generates well-structured questions with clear explanations.

The UI was built with Material-UI, which made creating a professional-looking interface much more straightforward than starting from scratch. The responsive design ensures the app works great on phones, tablets, and desktops.

Deployment on GitHub Pages

One of the best aspects of this project was its ease of deployment. GitHub Pages provides free hosting for static sites, and with the gh-pages package, deployment is just one command away.

npm run deploy

The app automatically builds and pushes the static files to a special gh-pages branch, which GitHub serves at https://gourav8jain.github.io/react_gemini-quiz.

Key Features

What I Learned?

This project taught me several valuable lessons.

  1. AI Integration: Working with AI APIs requires careful engineering of prompts.
  2. Modern React: TypeScript and React 19's latest features make development much smoother.
  3. UI/UX Design: Material-UI's component library saves a significant amount of time while maintaining high quality.
  4. Deployment: GitHub Pages is perfect for React apps and completely free.

The Result

The final application is fast, beautiful, and genuinely helpful. You can create quizzes on literally any topic - from "React hooks" to "ancient Egyptian mythology" - and get well-structured questions with explanations.

The app has been deployed and is live at: https://gourav8jain.github.io/react_gemini-quiz.

Open Source

The entire project is open-source and available on GitHub: https://github.com/gourav8jain/react-gemini-quiz.

Feel free to fork it, contribute to it, or use it as a starting point for your own projects!

Next Steps

I'm planning to add more features like.

This project demonstrates the power of modern web technologies when combined with AI. In just a few days, I was able to build something that would have taken months just a few years ago.

Built with ❤️ using React, TypeScript, and Google Gemini AI.

Links