Quizzy is a platform that enables users to create, take, and manage quizzes. Users can sign up, log in, create their own quiz in any domain area and make it available for the world, take part in quizzes, and see their scores. The platform is built with a Node.js backend, a MongoDB database, and a React frontend styled with Tailwind CSS.
- User authentication with JWT
- Create quizzes with multiple-choice questions
- Take quizzes and see scores
- User profile with quizzes taken and created
- Node.js and npm installed
- MongoDB installed and running
-
Clone the repository:
git clone https://github.com/yourusername/quizzy.git cd quizzy
-
Install backend dependencies:
cd backend npm install
-
Install frontend dependencies:
cd ../frontend npm install
-
Create a .env file in the backend directory:
PORT=5000 MONGO_URI=your_mongo_uri JWT_SECRET=your_jwt_secret
- Start the backend server:
cd backend
node ./server.js
- Start the frontend development server:
cd frontend
npm start
- Open your browser and go to:
http://localhost:5173
- POST /api/auth/signup - Sign up a new user
- POST /api/auth/login - Log in a user
- POST /api/quizzes - Create a new quiz
- GET /api/quizzes - Get all quizzes
- GET /api/quizzes/:id - Get a quiz by ID
- POST /api/quizzes/:id/submit - Submit a quiz
- GET /api/users/:userId/profile - Get user profile