Skip to content

React.js frontend for an AI-powered quiz web app. Allows users to upload files, generate quizzes via Gemini AI, take quizzes, view detailed answers and explanations, and track quiz history. Features JWT authentication, dynamic dashboard, and real-time user interactions.

Notifications You must be signed in to change notification settings

VictoriousWealth/quiz-app-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Frontend – AI-Powered Quiz Web App

This is the React.js frontend for the AI-powered quiz generation app. Users can sign up, upload documents, generate quizzes using AI, and review quiz results – all in a clean, responsive, and dark/light mode interface.


Related Repositories

πŸš€ This project is powered by a FastAPI backend. Check it out here: quiz-app-backend


πŸš€ Tech Stack

  • React.js (with React Router)
  • Bootstrap 5
  • Fetch API for backend integration
  • JWT Authentication (stored in localStorage)
  • Confetti + Toasts for fun user experience
  • Dark Mode Toggle throughout

πŸ“ Project Structure

frontend/
β”œβ”€β”€ public/ 
β”‚   └── index.html 
β”œβ”€β”€ src/ 
β”‚   β”œβ”€β”€ api/           # Axios/fetch logic
β”‚   β”œβ”€β”€ components/    # Page & UI Components
β”‚   β”œβ”€β”€ App.js         # Routing logic
β”‚   └── index.js       # ReactDOM root

βš™οΈ Setup Instructions

  1. Clone the repo:
git clone git@github.com:YourUsername/quiz-frontend.git
cd quiz-frontend
  1. Install dependencies:
npm install
  1. Create a .env file:
REACT_APP_API_URL=https://your-backend-url
  1. Start the frontend:
npm start

Access the app at: http://localhost:3000


πŸ” Auth Flow

  • JWT tokens are stored in localStorage
  • Protected routes require valid token
  • Header format:
Authorization: Bearer <token>

🌍 Live App

You can try the frontend live on Heroku here: πŸ‘‰ https://quiz-frontend-nick-b973ee3e10ba.herokuapp.com


🧠 Pages & Routing

Page Path Auth Required Description
Login /login ❌ No User login
Register /register ❌ No New account signup
Dashboard / βœ… Yes List of uploaded files + quizzes
File Upload /upload βœ… Yes Upload DOCX, PDF, or TXT files
Quiz Page /quiz βœ… Yes Take quiz generated by AI
Results /results βœ… Yes View correct answers and explanations
History /history βœ… Yes View past quiz attempts

AI-Powered Quiz Web App

Welcome to the AI-Powered Quiz Web App, a full-stack web application that transforms any uploaded document into an interactive quiz using Google's Gemini AI. Users can upload PDF, DOCX, or TXT files, take generated quizzes, and receive instant feedback, all within a modern, responsive interface.


🌟 Features

  • πŸ“„ Smart Uploads: Upload PDF, DOCX, or TXT files.
  • πŸ€– AI Quiz Generation: Uses Gemini AI to generate accurate multiple-choice questions.
  • 🧠 Instant Feedback: Get answers and explanations right after quiz submission.
  • πŸ—‚ Progress Tracking: View quiz history and reattempt previous quizzes.
  • πŸ”’ JWT Authentication: Secure signup/login with protected routes.
  • πŸŒ— Dark Mode: Full dark/light theme support.

πŸŒ™ Dark Mode Support

  • Toggle applied globally to all pages and components
  • Affects card themes, button variants, backgrounds, text, overlays, etc.

πŸ“Έ Demo & Screenshots

44 detailed screenshots have been uploaded to showcase user flow, dark/light mode, quiz results, and dashboard views. Here are some visual highlights of the app in both light and dark modes:

πŸ” Login

Login Light with no details Login Light with details filled in Login Dark with no details Login Dark with details filled in

πŸ“‚ Upload File & Generate Quiz

Upload Light with no file chosen Upload Light with file chosen Upload Dark with no file chosen Upload Dark with file chosen Upload Dark now uploading file Upload Dark now generating quiz

🧠 Quiz Page

Quiz Light with no quiz data Quiz Light with quiz data Top section Quiz Light with quiz data Bottom section Quiz Dark with no quiz data Quiz Dark with quiz data Top section Quiz Dark with quiz data Bottom section Quiz Dark with quiz data loading section

πŸ“Š Results Page

Results Light with no results data Results Light with results data Top Section Results Light with no results data Bottom Section Results Dark with no results data Results Dark with no results data Top Section Results Dark with no results data Bottom Section

πŸ—‚οΈ Dashboard & History

Dashboard Light with no files data Dashboard Light with files data Dashboard Light with files data showing one or more section Dashboard Dark with no files data Dashboard Dark with files data Dashboard Dark with files data showing one or more section
History Light History Light show view attempts History Dark History Dark show view attempts

πŸ§ͺ Testing

No frontend tests have been written yet. You can add tests using React Testing Library or Cypress.


πŸ“Œ Notes

  • Uses React Bootstrap for rapid prototyping.
  • Works seamlessly with FastAPI backend at localhost:8000.
  • Accessible, responsive, and optimized for both desktop and mobile.

Related Docs

  • Overview: High-level description of system components.
  • Data Flow: Describes how data moves from upload to evaluation.
  • API Design: RESTful endpoints powering the system.
  • General System Diagram (PDF): Visual architecture representation.
  • User Stories: Features from a user perspective.
  • System Architecture: Direct access to all technical documentation related to the system design, architecture, and data flow of the AI-Powered Quiz Web App.

πŸ“¬ Contact

Built with πŸ’™ by Nick Efe Oni.

Feel free to fork, star, and share your feedback!

✍️ Author

Nick Efe Oni
GitHub β€’ LinkedIn
βœ‰οΈ efeoni10@gmail.com

About

React.js frontend for an AI-powered quiz web app. Allows users to upload files, generate quizzes via Gemini AI, take quizzes, view detailed answers and explanations, and track quiz history. Features JWT authentication, dynamic dashboard, and real-time user interactions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published