A modern web application built with Next.js that generates interactive quizzes using AI. This project leverages OpenAI's API to create engaging quiz content with a beautiful, responsive UI.
You can read the blog post here
- 🤖 AI-powered quiz generation using OpenAI API
- 🎨 Modern, responsive UI with Tailwind CSS and DaisyUI
- ⚡ Fast development with Next.js 15 and Turbopack
- 🔔 Real-time notifications with React Hot Toast
- 📝 Type-safe development with TypeScript and Zod validation
- 🎯 Interactive quiz experience
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS + DaisyUI
- AI Integration: OpenAI API
- Validation: Zod
- Notifications: React Hot Toast
- Development: Turbopack for faster builds
- Node.js 18+
- npm, yarn, pnpm, or bun
- OpenAI API key
- Clone the repository:
git clone <your-repo-url>
cd quiz-generator
- Install dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install
- Set up your environment variables:
Create a
.env.local
file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
- Open http://localhost:3000 with your browser to see the result.
- Navigate to the application in your browser
- Enter your quiz topic or subject
- Configure quiz settings (number of questions, difficulty, etc.)
- Generate your quiz using AI
- Take the interactive quiz
npm run dev
- Start development server with Turbopacknpm run build
- Build the application for productionnpm run start
- Start the production servernpm run lint
- Run ESLint for code quality
quiz-generator/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── components/ # React components
│ ├── utils/ # Utility functions
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── lib/ # Library code
├── public/ # Static assets
├── data/ # Data files
└── ...config files
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
To learn more about the technologies used in this project:
- Next.js Documentation - learn about Next.js features and API
- Tailwind CSS - utility-first CSS framework
- OpenAI API - AI model integration
- TypeScript - type-safe JavaScript
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details.