Skip to content

Transform any PDF document into an interactive, multilingual quiz in seconds with AI.

License

Notifications You must be signed in to change notification settings

reblox01/pdf-2-quiz

Repository files navigation

PDF2Quiz - AI-Powered Quiz Generator

PDF2Quiz Screenshot

Overview

PDF2Quiz is an AI-powered application that transforms any PDF document into an interactive quiz. Using Google's Gemini Pro AI model through the Vercel AI SDK, this tool automatically generates intelligent, multiple-choice questions based on the content of uploaded PDF documents.

Live Demo | GitHub Repository

Features

  • PDF Processing: Upload any PDF document (up to 15MB) and transform it into a quiz
  • Multiple Language Support: Generate quizzes in 6 languages (English, Arabic, Spanish, French, German, Chinese)
  • Adjustable Difficulty Levels: Choose between Easy, Normal, and Hard difficulty settings
  • Dynamic Question Count: Automatically adjusts number of questions based on difficulty level
  • Interactive Quiz Interface: Clean UI with score tracking and answer review
  • Theme Support: Toggle between light and dark mode
  • Regenerate Functionality: Create new questions from the same PDF
  • Responsive Design: Works flawlessly on mobile and desktop
  • Real-time Progress: Visual feedback during quiz generation process

Technologies Used

  • Next.js: React framework for the frontend
  • Vercel AI SDK: For AI model integration
  • Google Gemini Pro: AI model for content processing and quiz generation
  • TypeScript: For type safety and better developer experience
  • Tailwind CSS: For styling and responsive design
  • shadcn/ui: For UI components
  • Framer Motion: For smooth animations and transitions
  • Zod: For schema validation

My Contribution

For this project, I developed a comprehensive AI-powered quiz generation system that demonstrates the practical application of large language models in education. My key contributions include:

  • Designed and implemented the full-stack application using Next.js and TypeScript
  • Integrated Google's Gemini Pro AI model for intelligent quiz generation
  • Built a responsive, accessible UI with both light and dark mode support
  • Implemented multi-language support for greater accessibility
  • Created an adaptive difficulty system that generates appropriate questions based on user selection
  • Added interactive feedback systems and animations for better user experience
  • Developed a custom PDF parsing system that works efficiently with the AI model
  • Implemented proper error handling for failed uploads and generation attempts
  • Optimized the application for performance and deployment on Vercel

This project showcases my ability to work with cutting-edge AI technology, create intuitive user interfaces, and build practical applications that solve real-world problems in education and learning.

Installation and Setup

# Clone the repository
git clone https://github.com/reblox01/pdf-2-quiz.git

# Navigate to the directory
cd pdf-quiz-generator

# Install dependencies
npm install

# Set up environment variables
# Create a .env or .env.local file with:
# GOOGLE_GENERATIVE_AI_API_KEY=your_api_key_here

# Run the development server
npm run dev

Usage

  1. Upload a PDF document
  2. Select your preferred difficulty level
  3. Choose the language for your quiz
  4. Click "Generate Quiz"
  5. Answer the questions and get your score
  6. Review your answers or generate a new quiz

Support

If you find this project helpful, consider:

  • Starring the repository
  • Reporting issues
  • Contributing to the code
  • Sharing the project

Support My Work

If you find this project valuable and would like to support its continued development:

  • 💖 One-time Donations

  • 🌟 Recurring Support

Your support helps maintain this project and enables new features. Thank you! 🙏

Acknowledgements

I would like to express my gratitude to the following individuals and organizations:

  • Vercel for their incredible AI SDK that made this project possible
  • Google for providing the powerful Gemini Pro language model
  • Next.js team for creating such a robust and developer-friendly framework
  • shadcn/ui for their beautiful and accessible UI components
  • The open source community for creating the libraries and tools that power this application
  • Tailwind CSS team for their utility-first CSS framework
  • Framer Motion for enabling smooth animations
  • All the testers and users who provided valuable feedback during development

Special thanks to the AI community for pushing the boundaries of what's possible with generative AI in education.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Created by 0x8D | @reblox01

About

Transform any PDF document into an interactive, multilingual quiz in seconds with AI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published