A secure, interactive Quizzy application built with the MERN stack (MongoDB, Express.js, React, Node.js). It allows users to take subject-wise quizzes, track their scores, and ensures fair play with anti-cheating measures like full-screen enforcement, tab-switch detection, and developer tools prevention.
- π Subject-wise Quizzes β Choose from multiple categories (MERN, Java, Web Development, etc.).
- π Score Tracking β View real-time results after each quiz.
- π Security Measures β Prevent cheating with:
- Full-screen mode enforcement
- Tab switch detection
- Right-click & copy prevention
- DevTools detection & blocking
- π₯ Responsive Design β Works seamlessly on desktop & mobile.
- β‘ Fast & Smooth β Powered by the MERN stack for optimal performance.
- Frontend: React.js, Vite, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Icons: Lucide React for consistent iconography
- Styling: Tailwind CSS
- Charts: Recharts for interactive data visualization
- Authentication: JWT authentication for secure access
- Security: Secure API endpoints β only Admin can create quizzes
- Dashboard with chart-wise progress tracking
- Quiz filtering based on category, difficulty, or subject
- Real-time score updates
- Create and manage quizzes
The project follows Atomic Design Principles for the frontend and a Modular MVC Pattern for the backend, ensuring scalability, maintainability, and clear separation of concerns.
client/
βββ public/ # Static assets (icons, images, etc.)
βββ src/
β βββ api/ # API request logic
β β βββ api.ts
β βββ components/ # Reusable UI components (Atoms, Molecules, Organisms)
β β βββ ErrorDisplay.tsx
β β βββ Footer.tsx
β β βββ Navbar.tsx
β β βββ ResultChart.tsx
β β βββ SuccessDisplay.tsx
β βββ context/ # Global state providers
β β βββ authContext.tsx
β β βββ ErrorContext.tsx
β β βββ SuccessContext.tsx
β βββ pages/ # Application pages (Templates)
β βββ AuthPage.tsx
β βββ CreateQuiz.tsx
β βββ Explore.tsx
β βββ Home.tsx
β βββ QuizList.tsx
β βββ Result.tsx
β βββ TakeQuiz.tsx
β βββ UserDashboard.tsx
server/
βββ src/
βββ config/ # Database & environment setup
β βββ db.ts
βββ controllers/ # Business logic for API endpoints
β βββ authController.ts
β βββ quizController.ts
β βββ userController.ts
βββ middleware/ # Request handling middlewares
β βββ authMiddleware.ts
βββ models/ # Mongoose schemas
β βββ Quiz.ts
β βββ Result.ts
β βββ User.ts
βββ routes/ # API endpoint definitions
β βββ authRoutes.ts
β βββ quizzes.ts
βββ utils/ # Helper utilities
β βββ generateToken.ts
βββ validators/ # Request validation
βββ index.ts
This structure ensures:
- Frontend: A clean separation between UI components, global state, and page-level templates.
- Backend: A modular approach with distinct layers for configuration, routing, logic, and data management.
- Node.js: v18.0 or higher
- Package Manager: npm or yarn
git clone https://github.com/tsujit74/online-quiz-maker.git
cd online-quiz-makerBackend (Server)
cd server
npm installFrontend (Client)
cd ../client
npm installCreate a .env file in server directory:
PORT=4000
MONGO_URI=mongodb://localhost:27017/quizzes
JWT_SECRET=tsujitCreate a .env file in client directory:
VITE_API_BASE=http://localhost:4000Note: In Vite, all environment variables must start with
VITE_.
Open two separate terminals:
Terminal 1 β Backend
cd server
npm run devTerminal 2 β Frontend
cd client
npm run devOnce both servers are running, open:
http://localhost:5173
In both client and server directories:
npm run devβ Start development servernpm run buildβ Build for productionnpm run startβ Start production servernpm run lintβ Run ESLint for code quality
Quizzy is a secure and comprehensive platform for creating and taking quizzes, with a strong focus on user experience, analytics, and fair play.
- Quiz Results & Feedback β After completing a quiz, users can view detailed performance reports and feedback.
- User Dashboard β Displays progress over time with interactive charts, allowing users to track scores and identify areas for improvement.
- Secure Quiz Taking β Prevents cheating by enforcing full-screen mode, disabling right-click, and blocking DevTools.
- Code Protection β Implements measures to prevent code inspection and manipulation.
- Quiz Creation Page β Secure admin-only interface for creating and managing quizzes.
- Full Control β Admins can define quiz structure, content, and difficulty levels.
- Responsive Design β Works seamlessly across desktops, tablets, and mobile devices.
- Filter-Based Search β Easily locate quizzes by category, difficulty, or keyword.
npm run build
npm run startHereβs a well-formatted "Future Enhancements" section you can paste directly into your README file:
Here are some planned improvements and advanced features for future releases:
-
User Authentication & Profiles
- Allow users to create accounts, log in, and track their quiz history and scores.
- Enable profile customization with avatars and badges.
-
Timed Quizzes & Leaderboards
- Introduce countdown timers for each quiz.
- Global and category-wise leaderboards to encourage competition.
-
Advanced Analytics
- Show performance graphs, strengths/weakness analysis, and progress tracking over time.
-
Custom Quiz Creation
- Let users create, edit, and share their own quizzes with the community.
-
Multimedia Support
- Include images, audio, and video in questions to make quizzes more interactive.
-
Mobile App Version
- Develop Android & iOS apps for a better on-the-go quiz experience.
-
Gamification
- Add XP points, achievements, streaks, and levels to keep users engaged.
-
AI-Powered Question Generation
- Use AI to automatically generate new questions and quizzes based on selected topics.
We welcome contributions to make Quizzy even better!
-
Fork the repository
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Commit your changes
git commit -m "Add some amazing feature" -
Push to the branch
git push origin feature/amazing-feature
-
Open a Pull Request and describe your changes in detail.
For questions, issues, or contributions, please reach out via:
- GitHub: Sujit Thakur
- LinkedIn: Sujit Thakur
- GitHub Issues: Open an issue in the repository.
- Documentation: Check for common solutions before raising new issues.
Thank you for your interest in Quizzy! Your support and contributions help improve the platform for everyone.
With Gratitude, Sujit Thakur β€οΈ




