Skip to content

ManthanKadhare/Secure-Quiz-Application

Repository files navigation

๐ŸŽ“ SecureQuiz Pro

A modern, secure quiz application built with React and TypeScript, featuring advanced security measures and real-time monitoring capabilities.

SecureQuiz Pro TypeScript Tailwind CSS License

๐ŸŒŸ Features

๐Ÿ”’ Security Features

  • Tab Switching Detection: Automatic disqualification on tab switching
  • Keyboard Shortcuts Disabled: F12, Ctrl+Shift+I, Ctrl+U, Ctrl+P, Ctrl+C, Ctrl+V, Ctrl+X
  • Right-click Protection: Context menu disabled
  • Text Selection Disabled: Prevents copying of questions
  • Secure Authentication: Email validation with college domain verification
  • Session Management: Secure student session handling

๐Ÿ‘จโ€๐ŸŽ“ Student Features

  • Secure Login System: College email validation (upluniversity.ac.in domain)
  • Interactive Quiz Interface: Clean, modern UI with smooth transitions
  • Real-time Timer: 60-minute countdown with visual warnings
  • Progress Tracking: Visual progress bar and question indicators
  • Navigation Controls: Previous/Next question navigation
  • Instant Results: Immediate score calculation and display
  • Responsive Design: Works on all devices and screen sizes

๐Ÿ‘จโ€๐Ÿซ Teacher Features

  • Secure Authentication: Password-protected teacher panel
  • Question Management: Add, edit, and manage quiz questions
  • Student Monitoring: View registered students (max 70 per session)
  • Results Analytics: Comprehensive quiz results with statistics
  • CSV Export: Download results in CSV format
  • Real-time Dashboard: Live statistics and performance metrics

๐Ÿš€ Live Demo

Visit the live application: SecureQuiz Pro

๐Ÿ› ๏ธ Technology Stack

  • Frontend: React 18.3.1 with TypeScript
  • Styling: Tailwind CSS 3.4.1
  • Icons: Lucide React
  • Build Tool: Vite 5.4.2
  • Deployment: Netlify

๐Ÿ“ฆ Installation

  1. Clone the repository

    git clone https://github.com/yourusername/securequiz-pro.git
    cd securequiz-pro
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev
  4. Build for production

    npm run build

๐ŸŽฏ Usage

For Students

  1. Access the Application: Navigate to the application URL
  2. Student Login: Click "Student Panel" and enter your details:
    • Full Name
    • Enrollment Number
    • College Email (format: 230102103005.name@upluniversity.ac.in)
  3. Take the Quiz:
    • Answer questions within the 60-minute time limit
    • Use Previous/Next buttons to navigate
    • Submit when complete or time expires

For Teachers

  1. Access Teacher Panel: Click "Teacher Panel"
  2. Authentication: Enter password: UPLHOD123
  3. Manage Questions: Add new questions with multiple choice options
  4. Monitor Students: View registered students and their status
  5. View Results: Access comprehensive analytics and download CSV reports

๐Ÿ”ง Configuration

Teacher Password

The default teacher password is UPLHOD123. To change it:

  1. Open src/components/TeacherPanel.tsx
  2. Find the authentication function
  3. Update the password in the condition:
    if (password === 'YOUR_NEW_PASSWORD') {

Email Domain Validation

To change the accepted email domain:

  1. Open src/components/StudentLogin.tsx
  2. Update the email pattern:
    const emailPattern = /^[0-9]{12}\.[a-z]+@yourdomain\.ac\.in$/;

Quiz Timer

To modify the quiz duration:

  1. Open src/components/QuizPanel.tsx
  2. Change the initial timer value:
    const [timeLeft, setTimeLeft] = useState(3600); // 3600 seconds = 60 minutes

Student Limit

To change the maximum number of students:

  1. Open src/components/StudentLogin.tsx
  2. Update the limit check:
    if (students.length >= 70) { // Change 70 to your desired limit

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ MainMenu.tsx          # Landing page with panel selection
โ”‚   โ”œโ”€โ”€ StudentLogin.tsx      # Student authentication form
โ”‚   โ”œโ”€โ”€ QuizPanel.tsx         # Main quiz interface
โ”‚   โ””โ”€โ”€ TeacherPanel.tsx      # Teacher dashboard and management
โ”œโ”€โ”€ App.tsx                   # Main application component
โ”œโ”€โ”€ main.tsx                  # Application entry point
โ””โ”€โ”€ index.css                 # Global styles and Tailwind imports

๐Ÿ” Security Measures

Client-Side Protection

  • Disabled right-click context menu
  • Blocked common keyboard shortcuts (F12, Ctrl+Shift+I, etc.)
  • Text selection prevention
  • Tab switching detection with automatic disqualification

Data Validation

  • Email format validation with domain checking
  • Enrollment number uniqueness verification
  • Input sanitization and trimming
  • Session limit enforcement (70 students max)

Session Management

  • Local storage for data persistence
  • Secure student session handling
  • Teacher authentication with password protection
  • Automatic quiz submission on security violations

๐Ÿ“Š Data Storage

The application uses browser localStorage for data persistence:

  • students: Array of registered student information
  • quizData: Array of quiz questions and answers
  • quizResults: Array of completed quiz submissions
  • currentStudent: Current logged-in student session

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ› Known Issues

  • Local storage data persists across browser sessions (by design)
  • Security measures can be bypassed by disabling JavaScript (inherent web limitation)
  • Timer continues running in background tabs (by design for security)

๐Ÿ”ฎ Future Enhancements

  • Backend integration with database storage
  • Advanced analytics and reporting
  • Question categories and difficulty levels
  • Bulk question import from CSV/Excel
  • Real-time proctoring features
  • Mobile app version
  • Multi-language support

๐Ÿ“ž Support

For support, email manthankadhare@gmail.com or create an issue in this repository.

๐Ÿ™ Acknowledgments


โš ๏ธ Security Notice: This application implements client-side security measures. For production use in high-stakes environments, consider implementing additional server-side security and proctoring solutions.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published