A full-stack quiz application built with React.js, Node.js, Express, and MongoDB. This application allows users to take quizzes, track their progress, and includes an admin dashboard for quiz management.
- Frontend (Vercel): https://quiz-app-sand-alpha.vercel.app
- Backend (Render): https://quiz-app-y3h8.onrender.com/api
-
User Authentication
- JWT-based authentication
- Role-based access control (User/Admin)
- Secure password storage with bcrypt
- Password strength validation
-
Quiz Management
- Multiple quiz types (single choice, multiple choice, true/false)
- Real-time score calculation
- Progress tracking
- Immediate feedback on answers
-
Admin Dashboard
- Comprehensive quiz management (CRUD operations)
- User management
- Score tracking
- Performance analytics
-
User Interface
- Responsive design for all devices
- Dark/Light mode support
- Modern UI with Tailwind CSS
- Smooth animations with Framer Motion
- Intuitive navigation
- React.js 18 (Vite)
- Tailwind CSS for styling
- React Router v6 for navigation
- Axios for API requests
- Context API for state management
- Framer Motion for animations
- Heroicons for icons
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT for authentication
- Bcrypt for password hashing
- CORS for cross-origin requests
- Clone the repository:
git clone https://github.com/prabhaspaddana/quiz-app.git
cd quiz-app
- Install backend dependencies:
cd backend
npm install
- Create a
.env
file in the backend directory:
PORT=5000
MONGODB_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
- Install frontend dependencies:
cd ../frontend
npm install
- Start the development servers:
Backend:
cd backend
npm run dev
Frontend:
cd frontend
npm run dev
The application is deployed using the following services:
- Repository connected to Vercel for automatic deployments
- Environment variables configured in Vercel dashboard
- Build command:
npm run build
- Output directory:
dist
- Web service configured on Render
- Environment variables set in Render dashboard
- Automatic deployments from main branch
- Database hosted on MongoDB Atlas
POST /api/auth/register
- Register new userPOST /api/auth/login
- User loginGET /api/auth/me
- Get current user
GET /api/quiz
- Get all quizzesGET /api/quiz/:id
- Get specific quizPOST /api/quiz/:id/submit
- Submit quiz answers
POST /api/admin/quiz
- Create quizPUT /api/admin/quiz/:id
- Update quizDELETE /api/admin/quiz/:id
- Delete quizGET /api/admin/users
- Get all usersPUT /api/admin/users/:id
- Update userDELETE /api/admin/users/:id
- Delete userGET /api/admin/scores
- Get all scores
- Username: addedadmin
- Email : [email protected]
- Password: Password@123
- Username: addeduser
- Email : [email protected]
- Password: Password@123
The private repository has been shared with:
- Quiz categories and tags
- User profile customization
- Social sharing features
- Advanced analytics
- Quiz timer functionality
- Certificate generation
For any queries regarding the application, please contact:
- Email: [email protected]
- GitHub: https://github.com/prabhaspaddana