Skip to content

Rextro-Exhibition-2025/Rextro-Shcool-Quiz-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

183 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Rextro School Quiz Platform

Faculty of Engineering Logo

A Comprehensive Quiz Competition Management System for Educational Institutions

Developed at University of Ruhuna | Faculty of Engineering

License Next.js Node.js TypeScript MongoDB

Features β€’ Architecture β€’ Getting Started β€’ Documentation β€’ Contributing


πŸ“‹ Table of Contents


🌟 Overview

The Rextro School Quiz Platform is an advanced, real-time quiz competition management system designed to facilitate inter-school academic competitions. Built with modern web technologies at the University of Ruhuna Faculty of Engineering, it provides a seamless experience for administrators, teachers, and students while maintaining the highest standards of academic integrity through comprehensive anti-cheating mechanisms.

🎯 Mission

To create an engaging, fair, and technologically advanced platform that enables educational institutions to conduct large-scale quiz competitions efficiently while ensuring complete transparency and security.


πŸ” Problem Statement

Traditional quiz competitions face several challenges:

  • πŸ” Security Concerns: Preventing cheating and unauthorized access during online assessments
  • πŸ“Š Manual Tracking: Time-consuming manual score calculation and violation monitoring
  • ⏱️ Time Management: Difficulty in synchronizing quiz timing across multiple participants
  • πŸ“ˆ Real-time Monitoring: Lack of live tracking and instant result compilation
  • πŸŽ“ Team Coordination: Managing multiple team members and their individual performances
  • πŸ“± Accessibility: Need for a platform that works seamlessly across devices
  • πŸ” Violation Detection: Manual monitoring of student behavior during assessments

πŸ‘₯ Target Audience

Primary Users

  1. 🏫 School Administrators

    • Register school teams
    • Monitor team performance
    • Track violations
    • Access comprehensive analytics
  2. πŸ‘¨β€πŸ« Teachers/Coordinators

    • Manage student teams
    • Monitor quiz progress
    • View real-time results
    • Generate reports
  3. πŸŽ“ Students

    • Participate in timed quizzes
    • View personal scores
    • Access leaderboards
    • Compete fairly

Secondary Users

  1. πŸ› οΈ System Administrators

    • Create and manage quizzes
    • Configure platform settings
    • Monitor system health
    • Manage user access
  2. πŸ“Š Event Organizers

    • Track competition progress
    • Generate reports
    • Analyze participation data
    • Monitor platform performance

πŸ’‘ Solution

Comprehensive Quiz Management Platform

A full-stack web application that addresses all challenges through:

For Administrators

  • Question Bank Management: Create, edit, and organize quiz questions with support for text and images
  • Team Management: Register and manage school teams with multiple members
  • Real-time Monitoring: Live dashboard showing active quizzes and participant status
  • Violation Tracking: Automated detection and logging of suspicious activities
  • Analytics Dashboard: Comprehensive insights into performance and participation

For Teachers/Coordinators

  • Team Registration: Simple interface to register school teams with student details
  • Progress Tracking: Monitor team members' quiz progress in real-time
  • Result Access: Instant access to scores and rankings
  • Violation Reports: View detailed violation logs for each team member

For Students

  • Secure Authentication: Token-based login system for each team member
  • Timed Quizzes: 45-minute quiz sessions with countdown timer
  • Fullscreen Mode: Immersive quiz experience with anti-cheat measures
  • Instant Results: Immediate score calculation and ranking display
  • Leaderboard: Real-time ranking system showing top performers

πŸ—οΈ Architecture

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Client Layer                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚   Admin     β”‚  β”‚   Teacher   β”‚  β”‚   Student   β”‚         β”‚
β”‚  β”‚  Dashboard  β”‚  β”‚   Portal    β”‚  β”‚    Quiz     β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚ HTTPS/REST API
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Application Layer                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              Next.js Frontend (SSR/CSR)              β”‚   β”‚
β”‚  β”‚  β€’ React Components  β€’ Context API  β€’ Interceptors   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                             β”‚  β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚          Express.js Backend (REST API)               β”‚   β”‚
β”‚  β”‚  β€’ Controllers  β€’ Routes  β€’ Middleware  β€’ Services   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚ Mongoose ODM
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Data Layer                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                  MongoDB Database                     β”‚   β”‚
β”‚  β”‚  β€’ SchoolTeams  β€’ Questions  β€’ Quizzes  β€’ Violations β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

Student Login β†’ Authentication β†’ Token Generation β†’ Quiz Access
     ↓              ↓                   ↓                ↓
Quiz Start β†’ Fullscreen Mode β†’ Answer Selection β†’ Violation Check
     ↓              ↓                   ↓                ↓
 Timer Tick β†’ Progress Save β†’ Score Calculation β†’ Result Display

πŸš€ Key Features

πŸ” Security & Anti-Cheating

  • Fullscreen Enforcement: Automatic detection when students exit fullscreen mode
  • Copy/Paste Prevention: Disabled clipboard operations during quiz
  • Tab Switching Detection: Alerts and logs when students switch tabs
  • Activity Monitoring: Tracks user activity and flags extended inactivity
  • Device Fingerprinting: Unique identification of quiz-taking devices
  • Token-based Authentication: Secure JWT tokens for session management
  • Violation Logging: Comprehensive database of all suspicious activities

πŸ“Š Quiz Management

  • Dynamic Question Bank: Support for text and image-based questions
  • Multiple Answer Formats: Text-only, image-only, or combined answers
  • Timed Sessions: Configurable quiz duration (default: 45 minutes)
  • Auto-submission: Automatic submission when time expires
  • Progress Tracking: Real-time progress indicators
  • Answer Review: Students can navigate between questions before submission

πŸ‘₯ Team Management

  • Multi-member Teams: Support for 4 students per school team
  • Individual Tracking: Separate authentication and scoring for each member
  • Team Aggregation: Automatic calculation of team total scores
  • School Information: Store educational zone and teacher contact details
  • Member Status: Track login status and quiz completion for each member

πŸ“ˆ Real-time Leaderboard

  • Live Rankings: Automatic ranking based on scores
  • School-wise Display: Show performance by school and team
  • Individual Scores: Display each team member's contribution
  • Violation Indicators: Flag teams/members with violations
  • Responsive Design: Works seamlessly on all screen sizes

🎨 User Experience

  • Responsive Design: Mobile-first approach with beautiful UI
  • Intuitive Navigation: Easy-to-use interface for all user types
  • Visual Feedback: Clear indicators for selections and progress
  • Loading States: Smooth transitions and loading indicators
  • Error Handling: User-friendly error messages
  • Accessibility: Keyboard navigation and screen reader support

⚑ Performance & Caching

  • Support Backend Layer: Dedicated caching server to reduce main backend load
  • Response Caching: Intelligent caching of quiz data, questions, and leaderboards
  • Optimized API Calls: Reduces redundant database queries
  • Scalable Architecture: Easy horizontal scaling with caching layer

πŸ“± Admin Dashboard

  • Question Management: CRUD operations for quiz questions
  • Team Overview: View all registered school teams
  • Violation Monitoring: Dashboard for tracking all violations
  • Analytics: Comprehensive statistics and insights
  • Bulk Operations: Import/export questions and teams
  • System Logs: Detailed activity logs for auditing

πŸ“– User Stories

As a School Administrator

βœ“ I want to register my school team with student details
βœ“ I want to view my team's performance in real-time
βœ“ I want to see which students have completed the quiz
βœ“ I want to check if any violations were detected
βœ“ I want to compare my team's ranking with other schools

As a Student

βœ“ I want to login securely with my school credentials
βœ“ I want to take the quiz in a distraction-free fullscreen mode
βœ“ I want to see my remaining time clearly
βœ“ I want to navigate between questions freely
βœ“ I want to see my score immediately after submission
βœ“ I want to view my ranking on the leaderboard

As a System Administrator

βœ“ I want to create and manage quiz questions easily
βœ“ I want to upload images for questions and answers
βœ“ I want to monitor all active quiz sessions
βœ“ I want to view comprehensive violation reports
βœ“ I want to export results and analytics
βœ“ I want to ensure system security and performance

As a Teacher/Coordinator

βœ“ I want to help my students login to the quiz
βœ“ I want to monitor their progress during the quiz
βœ“ I want to ensure they follow the rules
βœ“ I want to view detailed results after completion
βœ“ I want to identify areas for improvement

πŸ› οΈ Technology Stack

Frontend

Technology Purpose Version
Next.js React Framework with SSR/CSR 15.x
React UI Library 19.x
TypeScript Type Safety 5.x
Tailwind CSS Utility-first CSS Framework 3.x
Lucide React Icon Library Latest
Axios HTTP Client Latest

Backend

Technology Purpose Version
Node.js Runtime Environment 20+
Express.js Web Framework 5.x
TypeScript Type Safety 5.x
MongoDB NoSQL Database 7.x
Mongoose ODM for MongoDB 8.x
JWT Authentication Latest
Bcrypt Password Hashing Latest

Support Backend (Caching Layer)

Technology Purpose Version
Node.js Runtime Environment 20+
Express.js Web Framework 5.x
TypeScript Type Safety 5.x
node-cache In-Memory Caching 5.x

DevOps & Tools

Tool Purpose
Git Version Control
Docker Containerization
Artillery Load Testing
ESLint Code Linting
Prettier Code Formatting
Swagger API Documentation

πŸ“ Project Structure

Rextro-School-Quiz-Platform/
β”‚
β”œβ”€β”€ πŸ“‚ frontend/                 # Next.js Frontend Application
β”‚   β”œβ”€β”€ πŸ“‚ app/                  # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ admin/            # Admin dashboard pages
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ quiz/             # Quiz interface
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ leaderboard/      # Rankings display
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ login/            # Authentication pages
β”‚   β”‚   └── πŸ“‚ api/              # API routes
β”‚   β”œβ”€β”€ πŸ“‚ components/           # Reusable React components
β”‚   β”œβ”€β”€ πŸ“‚ contexts/             # React Context providers
β”‚   β”œβ”€β”€ πŸ“‚ interceptors/         # Axios interceptors
β”‚   β”œβ”€β”€ πŸ“‚ lib/                  # Utility functions
β”‚   β”œβ”€β”€ πŸ“‚ types/                # TypeScript type definitions
β”‚   β”œβ”€β”€ πŸ“‚ public/               # Static assets
β”‚   └── πŸ“„ package.json          # Frontend dependencies
β”‚
β”œβ”€β”€ πŸ“‚ backend/                  # Express.js Backend API
β”‚   β”œβ”€β”€ πŸ“‚ config/               # Configuration files
β”‚   β”‚   └── πŸ“„ db.ts             # Database connection
β”‚   β”œβ”€β”€ πŸ“‚ controllers/          # Request handlers
β”‚   β”‚   β”œβ”€β”€ πŸ“„ authController.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ questionController.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ quizController.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ schoolTeamController.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ uploadController.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ userController.ts
β”‚   β”‚   └── πŸ“„ violationController.ts
β”‚   β”œβ”€β”€ πŸ“‚ models/               # Mongoose schemas
β”‚   β”‚   β”œβ”€β”€ πŸ“„ SchoolTeam.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Question.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Quiz.ts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ User.ts
β”‚   β”‚   └── πŸ“„ Violation.ts
β”‚   β”œβ”€β”€ πŸ“‚ routes/               # API routes
β”‚   β”œβ”€β”€ πŸ“‚ middleware/           # Custom middleware
β”‚   β”œβ”€β”€ πŸ“‚ utils/                # Utility functions
β”‚   └── πŸ“„ index.ts              # Application entry point
β”‚
β”œβ”€β”€ πŸ“„ README.md                 # Project documentation
β”œβ”€β”€ πŸ“„ .gitignore                # Git ignore rules
└── πŸ“„ LICENSE                   # License file

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v20 or higher)
  • npm or yarn
  • MongoDB (v7.0 or higher) or MongoDB Atlas account
  • Git

Installation

1️⃣ Clone the Repository

git clone https://github.com/yourusername/Rextro-School-Quiz-Platform.git
cd Rextro-School-Quiz-Platform

2️⃣ Backend Setup

# Navigate to backend directory
cd backend

# Install dependencies
npm install

# Create environment file
cp .env.example .env

# Configure environment variables
nano .env

Backend Environment Variables (.env):

# Server Configuration
PORT=5000
NODE_ENV=development

# Database Configuration
DEV_MONGO_URI=mongodb://localhost:27017/rextro_quiz_dev
PROD_MONGO_URI=mongodb+srv://user:password@cluster.mongodb.net/rextro_quiz

# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_here
JWT_EXPIRE=1h

# Cloudinary Configuration (for image uploads)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Run in development mode
npm run dev

# Run in production mode
npm run prod

# Build for production
npm run build
npm start

3️⃣ Frontend Setup

# Navigate to frontend directory
cd ../frontend

# Install dependencies
npm install

# Create environment file
cp .env.example .env.local

# Configure environment variables
nano .env.local

Frontend Environment Variables (.env.local):

# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:5000/api

# App Configuration
NEXT_PUBLIC_APP_NAME=Rextro Quiz Platform
NEXT_PUBLIC_QUIZ_DURATION=2700
# Run development server
npm run dev

# Build for production
npm run build
npm start

4️⃣ Access the Application


πŸ“š API Documentation

Authentication Endpoints

Login Member

POST /api/auth/login
Content-Type: application/json

{
  "schoolName": "Sunrise High School",
  "memberName": "Alice",
  "password": "secure123"
}

Response:

{
  "success": true,
  "message": "Login successful",
  "data": {
    "teamId": "68bf02d2004d8f942bdf2c45",
    "teamName": "Alpha Innovators",
    "memberName": "Alice",
    "schoolName": "Sunrise High School",
    "hasEndedQuiz": false,
    "authToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}

Logout Member

GET /api/auth/logout
Content-Type: application/json
Authorization: Bearer <token>

Get Current User

GET /api/auth/me
Authorization: Bearer <token>

Update Member State

PUT /api/auth/update-state
Content-Type: application/json
Authorization: Bearer <token>

{
  "schoolName": "Sunrise High School",
  "memberName": "Alice",
  "hasEndedQuiz": true
}

School Team Endpoints

Create School Team

POST /api/school-teams
Content-Type: application/json

{
  "teamName": "Alpha Innovators",
  "schoolName": "Sunrise High School",
  "password": "secure123",
  "educationalZone": "Central District",
  "teacherInCharge": "Ms. Sarah Johnson",
  "teacherContact": "+1-555-0123",
  "members": [
    { "name": "Alice", "marks": 0 },
    { "name": "Bob", "marks": 0 },
    { "name": "Charlie", "marks": 0 },
    { "name": "Diana", "marks": 0 }
  ]
}

Get All School Teams

GET /api/school-teams

Response:

{
  "success": true,
  "count": 6,
  "data": [
    {
      "_id": "68bf02d2004d8f942bdf2c45",
      "teamName": "Alpha Innovators",
      "schoolName": "Sunrise High School",
      "totalMarks": 85,
      "members": [
        {
          "name": "Alice",
          "marks": 26.67,
          "isLoggedIn": true,
          "hasEndedQuiz": true
        }
      ]
    }
  ]
}

Question Endpoints

Get All Questions

GET /api/questions
Authorization: Bearer <token>

Create Question

POST /api/questions
Content-Type: application/json
Authorization: Bearer <token>

{
  "question": "What is the capital of France?",
  "image": null,
  "answers": [
    { "id": "a", "text": "Paris", "image": null },
    { "id": "b", "text": "London", "image": null },
    { "id": "c", "text": "Berlin", "image": null }
  ],
  "correctAnswer": "a"
}

Quiz Endpoints

Get Quiz by ID

GET /api/quizzes/{id}
Authorization: Bearer <token>

Submit Quiz

POST /api/quizzes/submit-quiz
Content-Type: application/json
Authorization: Bearer <token>

{
  "quizId": 1,
  "answers": {
    "0": "a",
    "1": "b",
    "2": "c"
  }
}

Get Leaderboard

GET /api/quizzes/get-leaderboard

Check Quiz Published Status

GET /api/quizzes/check-quiz-published-status

Violation Endpoints

Report Violation

POST /api/violations
Content-Type: application/json

{
  "teamId": "68bf02d2004d8f942bdf2c45",
  "memberName": "Alice",
  "violationType": "copy & paste"
}

Get Violations for Team

GET /api/violations
Content-Type: application/json

{
  "teamId": "68bf02d2004d8f942bdf2c45"
}

Get Violation Count for Team Member

GET /api/violations/count
Content-Type: application/json

{
  "teamId": "68bf02d2004d8f942bdf2c45",
  "memberName": "Alice"
}

Get All Violations with School Details

GET /api/violations/get-all

For complete API documentation, visit the Swagger UI at http://localhost:5000/api-docs


πŸ”’ Security Features

Authentication & Authorization

  • JWT Tokens: Secure token-based authentication
  • Password Hashing: Bcrypt with salt rounds for password security
  • Token Expiration: Automatic session timeout after 1 hour
  • Role-based Access: Different permissions for students, teachers, and admins

Quiz Security

  • Fullscreen Lock: Forces fullscreen mode during quiz
  • Copy/Paste Prevention: Disables clipboard operations
  • Tab Switching Detection: Alerts when users switch tabs
  • Right-click Disable: Prevents context menu access
  • Text Selection Block: Prevents text highlighting
  • Device Fingerprinting: Unique device identification

Violation Tracking

  • Automated Logging: All violations logged to database
  • Real-time Alerts: Instant notifications for violations
  • Comprehensive Reports: Detailed violation history per student/team
  • Timestamped Records: Precise tracking of when violations occurred

Data Protection

  • Environment Variables: Sensitive data stored in .env files
  • Input Validation: Server-side validation for all inputs
  • NoSQL Injection Prevention: Mongoose ODM protects against NoSQL injection
  • XSS Protection: React's built-in XSS protection
  • CORS Configuration: Controlled cross-origin resource sharing
  • Rate Limiting: Support backend caching reduces attack surface

πŸ‘¨β€πŸ’» Development Workflow

Git Workflow

# Create feature branch
git checkout -b feature/your-feature-name

# Make changes and commit
git add .
git commit -m "feat: add your feature description"

# Push to remote
git push origin feature/your-feature-name

# Create pull request on GitHub

Commit Message Convention

Follow the Conventional Commits specification:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

Testing

# Backend tests
cd backend
npm test

# Frontend tests
cd frontend
npm test

# Load testing with Artillery
artillery run artillery-config.yml

Code Quality

# Lint code
npm run lint

# Format code
npm run format

# Type check
npm run typecheck

πŸš€ Deployment

Docker Deployment

# Build images
docker-compose build

# Start containers
docker-compose up -d

# View logs
docker-compose logs -f

# Stop containers
docker-compose down

Manual Deployment

Backend Deployment

cd backend

# Build TypeScript
npm run build

# Start production server
NODE_ENV=production npm start

# Build TypeScript
npm run build

# Start production server
NODE_ENV=production npm start

Frontend Deployment

cd frontend

# Build Next.js app
npm run build

# Start production server
npm start

Environment-specific Configurations

  • Development: npm run dev
  • Production: npm run prod

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

How to Contribute

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

Contribution Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

Code of Conduct

Please read our Code of Conduct before contributing.


πŸ™ Acknowledgments

  • University of Ruhuna - Faculty of Engineering
  • 25 Years of Innovation & Excellence
  • All contributors and testers
  • Open-source community for amazing tools and libraries

πŸ“ž Support

For support, questions, or feedback:


πŸ“„ License

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


πŸ—ΊοΈ Roadmap

Phase 1 - MVP (Completed)

  • βœ… User authentication system
  • βœ… Quiz management
  • βœ… Team registration
  • βœ… Basic violation detection
  • βœ… Leaderboard
  • βœ… Support Backend with caching

Phase 2 - Enhanced Features (In Progress)

  • πŸ”„ Advanced analytics dashboard
  • πŸ”„ Email notifications
  • πŸ”„ Bulk import/export
  • πŸ”„ Mobile app

Phase 3 - Future Enhancements

  • πŸ“ AI-powered question generation
  • πŸ“ Video proctoring
  • πŸ“ Multi-language support
  • πŸ“ Customizable themes
  • πŸ“ Redis-based distributed caching

πŸŽ“ Rextro 2025 - Empowering Engineering Excellence

University of Ruhuna | Faculty of Engineering

25 Years of Innovation & Excellence (2000-2025)

πŸ—οΈ Built with ❀️ by the Rextro Development Team


⬆ Back to Top

Releases

No releases published

Packages

 
 
 

Contributors

Languages