WEB-PROJECT-SmartTrivia
SmartTrivia is a web application that helps users play trivia games.

π― Smart Trivia: Advanced Learning Platform
Smart Trivia is a high-performance, full-stack quiz application designed to make learning interactive and competitive. Built with React 19 and Node.js, it offers a robust environment for students to test their knowledge and for administrators to manage educational content with precision.
π Project Overview
This platform is engineered using a modern MERN (MongoDB, Express, React, Node.js) architecture. It features a sophisticated role-based access control system, ensuring that students and administrators have tailored experiencesβfrom real-time quiz taking to complex data analytics.
Why Smart Trivia?
Traditional quiz tools often lack the security and granular management needed for academic environments. Smart Trivia solves this with JWT-based authentication, OTP verification, and a modular question management system.
β¨ Core Feature Set
π For Students
- Interactive Quiz Player: A sleek, timed interface supporting multiple-choice, multi-select, and true/false questions.
- Performance Analytics: Visual progress tracking and detailed historical data on all quiz attempts.
- Daily Challenges: Automated module-based quizzes to keep learning consistent.
- Responsive Dashboard: A mobile-first personalized hub for quick access to new and previous quizzes.
π For Administrators
- Content Engine: Granular control over Modules, Quizzes, and individual Questions.
- User Governance: Full lifecycle management of student accounts and roles.
- System Insights: An analytics dashboard to monitor overall system health and user performance metrics.
- Security Protocols: Management of OTP delivery and secure session tokens.
π οΈ Technical Stack
Frontend (Client)
- Library: React 19.1.1 (Vite-powered for ultra-fast builds)
- State Management: Zustand (Lightweight and performant)
- Routing: React Router DOM 7.9.4
- Styling & UI: Custom CSS with React Toastify for real-time notifications.
Backend (Server)
- Runtime: Node.js with Express 4.21.1
- Database: MongoDB with Mongoose ODM
- Security: JWT (Access/Refresh tokens), Bcryptjs, and Helmet
- Communication: Nodemailer for secure OTP delivery
[Image of MERN stack architecture diagram]
π Project Architecture
The repository is structured as a monorepo for ease of development and deployment coordination.
smart-trivia/
βββ client/ # React frontend (Vite)
β βββ src/
β β βββ api/ # Axios configurations
β β βββ store/ # Zustand state slices
β β βββ pages/ # Student & Admin views
βββ server/ # Node.js backend
β βββ models/ # Mongoose Schemas (User, Quiz, Attempt)
β βββ routes/ # RESTful API endpoints
β βββ middleware/ # Auth & Role-based gates
βββ package.json # Unified dependency management