A full-stack Quiz Application built with React (frontend), Express & Node.js (backend), and MongoDB (database).
This app allows users to take quizzes, fetch questions dynamically from the database, and view results at the end.
- 🎯 Take interactive quizzes with multiple-choice questions
- 🗄️ Questions fetched from MongoDB
- 📊 Result evaluation & score display
- 🎨 Responsive UI with HTML, CSS, JS, and React
- ⚡ RESTful API powered by Express & Node.js
- 🌱 Database seeding script for adding initial quiz data
Frontend:
- React.js
- HTML, CSS, JavaScript
Backend:
- Node.js
- Express.js
Database:
- MongoDB (Mongoose ODM)
Quiz-App/
│── models/ # MongoDB models (Question, Quiz, Result)
│ ├── Question.js
│ ├── Quiz.js
│ └── Result.js
│
│── public/ # Frontend files
│ ├── app.js # React app entry
│ ├── index.html # Main HTML file
│ └── styles.css # Stylesheet
│
│── node_modules/ # Dependencies
│── .env.example # Environment variables example
│── package.json # Project dependencies & scripts
│── package-lock.json # Lock file
│── seed.js # Script to seed database with sample data
│── server.js # Express server entry point
git clone https://github.com/sourav81R/quiz-app.git
cd quiz-app
npm install
Create a .env file in the root directory based on .env.example:
MONGO_URI=mongodb://127.0.0.1:27017/quizApp
PORT=5000
node seed.js
node server.js
Server will start on: http://localhost:5000
If using CRA or Vite setup inside public/, start with:
npm start
- 🔐 User authentication (login/signup)
- 🏆 Leaderboard for top scores
- ⏳ Timer for quizzes
- 📱 Progressive Web App (PWA) support
Contributions are welcome! Feel free to fork this repo and submit a pull request.
Sourav
This project is licensed under the MIT License.