A full-stack quiz application built with the MERN stack (MongoDB, Express.js, React.js, Node.js) and styled with Tailwind CSS. The app allows users to register, login, take quizzes, and view their scores with a clean and responsive UI.
Try the app live here:
https://quiz-application-frontend-1.onrender.com/login
- User registration and authentication with JWT
- Create and take quizzes
- Responsive and modern UI powered by Tailwind CSS
- View quiz results and performance tracking
- Separate backend and frontend for scalability
| Layer | Technology |
|---|---|
| Frontend | React.js, Tailwind CSS, Axios, React Router |
| Backend | Node.js, Express.js |
| Database | MongoDB (via Mongoose ODM) |
| Authentication | JWT (JSON Web Tokens) |
- Node.js (v14 or higher recommended)
- MongoDB (local or Atlas)
- npm or yarn package manager
-
Navigate to the backend folder:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile in thebackendfolder with the following variables:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret PORT=5000
-
Start the backend server:
npm start
-
Navigate to the frontend folder:
cd ../frontend -
Install dependencies:
npm install
-
Start the React development server:
npm start
The frontend runs by default on http://localhost:3000 and will interact with the backend API on port 5000.
- Register a new account or login with existing credentials.
- Browse available quizzes.
- Attempt quizzes and submit answers.
- View quiz scores and history.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register |
Register a new user |
| POST | /api/login |
User login |
| GET | /api/quizzes |
Get list of quizzes |
| POST | /api/quizzes |
Create a new quiz (admin only) |
| PUT | /api/quizzes/:id |
Update a quiz (admin only) |
| DELETE | /api/quizzes/:id |
Delete a quiz (admin only) |
Note: Authentication tokens (JWT) are required for protected routes.
Currently, there are no automated tests configured. Future versions will include tests using Jest and React Testing Library.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
This project is licensed under the MIT License.
If you have any questions or feedback, feel free to open an issue or contact me.
Happy Quizzing! 🎉