A full-stack quiz application inspired by Mentimeter, enabling admins to create and edit quizzes, and users to attempt quizzes and view leaderboards. Built with React, Node.js, Express, MongoDB, and Zod validation.
- Admin panel for creating, editing, and managing quizzes
- User interface to view, attempt quizzes, and see leaderboards
- User authentication & role-based access control (admin/user)
- Real-time input validation with Zod on backend
- Responsive UI built with React and Tailwind CSS
- Secure API endpoints with JWT authentication
- React (with Hooks & React Router)
- Tailwind CSS for styling and responsive design
- Axios for API calls
- Node.js with Express.js
- MongoDB + Mongoose for data storage
- Zod for schema validation
- JWT-based authentication and middleware
- dotenv for environment configuration
- Node.js v14+
- MongoDB database (local or cloud)
- npm
git clone https://github.com/Aparnamol-KS/Mentimeter.git
cd Mentimeter
- Navigate to backend folder
- Install dependencies:
npm install
- Create .env file with required environment variables:
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
- Start backend server
node server.js
-
Go to frontend directory (e.g., /client or root if combined)
-
Install dependencies
npm install
- Start the React development server
npm start
-
POST /signup— Register a new user -
POST /login— Authenticate and obtain JWT token -
Admin routes (require admin token):
POST /admin/createQuizPOST /admin/updateQuiz/:quizIdGET /admin/quiz/:quizIdGET /admin/viewQuizzes
-
User routes (require user token):
GET /user/view_quizGET /user/attempt_quiz/:quizIdPOST /user/attempt_quiz/:quizIdGET /leaderboard/:quizId