A National Level Mathematics E-Quiz application built with React, Node.js, and MongoDB.
- User registration and authentication
- Real-time quiz with auto-save functionality
- Live leaderboard with real-time updates
- Admin dashboard for managing participants and results
- Google Sheets integration for data export
- Anti-cheat mechanisms
- Responsive design with Tailwind CSS
- Node.js (v16 or higher)
- MongoDB (local or cloud)
- Redis (optional, falls back to in-memory cache)
- Clone the repository
- Install dependencies:
npm install
npm run dev:fullnpm run devnpm run dev:server- Start MongoDB
- Run the seeder to populate sample questions:
npm run seed
- Create admin user:
npm run seed:admin
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/verify- Verify token
GET /api/quiz/questions- Get quiz questionsPOST /api/quiz/save-progress- Save quiz progressPOST /api/quiz/submit- Submit quiz
GET /api/leaderboard- Get leaderboardGET /api/leaderboard/rank- Get user rank
GET /api/admin/stats- Get admin statisticsGET /api/admin/registrations- Get registrationsPOST /api/admin/sync-sheets- Sync to Google Sheets
├── src/ # Frontend source code
│ ├── components/ # React components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ ├── services/ # API and socket services
│ ├── context/ # React context providers
│ └── styles/ # CSS styles
├── server/ # Backend source code
│ ├── routes/ # Express routes
│ ├── models/ # MongoDB models
│ ├── middleware/ # Express middleware
│ ├── services/ # External services
│ ├── utils/ # Utility functions
│ └── seeders/ # Database seeders
└── package.json # Project dependencies
- React 18
- React Router DOM
- Tailwind CSS
- Lucide React (Icons)
- Socket.io Client
- Node.js
- Express.js
- MongoDB with Mongoose
- Socket.io
- JWT Authentication
- Redis (optional)
- Google Sheets API
- JWT-based authentication
- Rate limiting
- Input validation
- Anti-cheat mechanisms
- CORS protection
- Helmet.js security headers
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request