Quizzy is a quiz management system built with React for the frontend and Node.js with Express for the backend. It allows users to register, log in, create quizzes, and check their scores.
- User Registration and Login: Users can register and log in to access the application.
- Quiz Creation: Teachers can create quizzes with specified topics, durations, and questions.
- Quiz Attempt Checking: Users can check if they have already attempted a quiz.
- Score Submission: Users can submit their quiz scores along with answers.
- Mark Retrieval: Teachers can view marks for specific quiz topics and students can check their marks.
- Frontend:
- React
- React Router
- Axios for API calls
- Backend:
- Node.js
- Express
- Mongoose for MongoDB interaction
- Cors for handling cross-origin requests
- Database:
- MongoDB
- Node.js and npm installed on your machine.
- MongoDB installed and running.
git clone <repository-url>
cd quizzycd server
npm installcd client
npm install- Open a terminal.
- Navigate to the server directory:
cd server - Start the server:
The server will start on
node index.js
http://localhost:3001.
- Open a new terminal.
- Navigate to the client directory:
cd client - Start the client:
The client will open in your default web browser at
npm start
http://localhost:3000.
-
POST /register
- Register a new user.
- Request body:
{ name, email, password, role, dept, phone }
-
POST /login
- Log in an existing user.
- Request body:
{ email, password }
-
POST /addQuestions
- Add a new quiz.
- Request body:
{ quizTopic, duration, questions }
-
GET /questions/:topic
- Get questions for a specific quiz topic.
- URL parameter:
topic
-
POST /quiz-results
- Submit quiz results.
- Request body:
{ topic, name, email, dept, score, answers }
-
POST /check-quiz-attempt
- Check if a user has attempted a specific quiz.
- Request body:
{ email, topic }
-
POST /check-teacher-marks
- Get marks for a specific quiz topic.
- Request body:
{ quizTopic }
-
POST /check-student-marks
- Get marks for a specific student.
- Request body:
{ email }