Skip to content

Repository files navigation

MedhaVIT

A full-stack AI-powered quiz platform (React, Supabase (DB & Auth), Groq AI, Netlify) with role-based dashboards for teachers and students, wrapped in a neobrutalist UI. Teachers generate quizzes via Bloom's taxonomy aware AI in seconds, students take them in a cheat-proof environment powered by a multi-layer anti-cheat system (DevTools detection, focus detection, clipboard disabling, browser extension detection, etc). Includes live/scheduled quiz management, extensive analytics for both teachers and students, and a gamified badge system tracking 10+ performance patterns.

Live Demo


Tech Stack

Layer Technology
Frontend React 19, React Router 7, Vite 8
Backend Supabase (Auth, Database, Edge Functions, Row Level Security)
AI Groq LLM via Supabase Edge Functions
Styling Neobrutalist CSS (custom design system)
Charts Recharts
Animations Framer Motion, Canvas Confetti
Icons Lucide React
Email EmailJS
Hosting Netlify

Features

For Teachers

Quiz Creation

  • AI Quiz Generator: Generate exam questions in seconds using Groq AI. Configure subject, subtopics, difficulty level, Bloom's taxonomy distribution per question type, and optional custom instructions.
  • Manual Quiz Creator: Build quizzes from scratch with full control over every question, options, correct answers, and explanations.
  • Question Types: Single-correct MCQ, multi-correct MCQ, and numerical (integer) problems.
  • Bloom's Taxonomy Integration: For each question type, teachers set the exact number of questions at each Bloom's level (Remember, Understand, Apply, Analyze, Evaluate, Create).
  • Difficulty Levels: Easy, Medium, Hard, and Extreme.
  • Course Outcomes: Tag quizzes with course outcome numbers for curriculum alignment.

Quiz Management

  • Dashboard: View all created quizzes in a card-based layout with live status indicators (Live, Scheduled, Ended, Offline).
  • Access Codes: Each quiz gets a unique 8-character code. Teachers can copy codes with one click.
  • Scheduling: Set a start and end time (IST) for automatic quiz availability. Quizzes auto-open and auto-close without manual intervention.
  • Manual Toggle: Start or stop quizzes instantly without scheduling.
  • Edit Quiz Settings: Modify title, timer, calculator, and partial marking after creation.
  • Delete Quizzes: Remove quizzes and all associated data.

Analytics

  • Teacher Analysis Page: Per-quiz performance breakdown with:
    • Score distribution bar chart
    • Time spent distribution
    • Correct vs. incorrect breakdown per question
    • Per-question accuracy pie charts
    • Student-level scatter plots (score vs. time)
    • List of all student attempts with scores and timestamps
  • Auto-recalculation: Scores are recalculated client-side on every load to reflect any answer key changes made by the teacher.

Profile

  • View username, role, email, and member-since date.

For Students

Taking Quizzes

  • Access Code Entry: Enter an 8-character code on the home page to join a live quiz.
  • Quiz Interface: Full-featured exam environment with:
    • Question-by-question navigation (Previous / Next)
    • Exam navigation sidebar with color-coded status grid (Attempted, Skipped, Review, Visited, Unvisited)
    • Mark for Review functionality
    • Optional countdown timer (auto-submits when time runs out)
    • Optional scientific calculator (per-quiz, teacher-enabled)
    • Question type indicator (MCQ Single, MCQ Multi, Numerical)
  • Scoring: Real-time partial marking support for multi-correct questions.
  • Completion: Confetti animation on scores of 90% or above. Redirect to results page.

Performance Tracking

  • Recent Attempts: Home page lists recent quiz attempts with scores and dates. Click any attempt for a full review.
  • Student Analysis Page: Per-attempt review with:
    • Score summary
    • Correct/incorrect/skipped breakdown
    • Pie chart of response distribution
    • Performance trend line chart across all attempts
    • Question-by-question review with correct answers and explanations
  • Score Auto-sync: If a teacher changes an answer key, the student's score updates automatically on their next visit.

Badge System (Achievements)

Students earn badges based on quiz performance to make the quizes more engaging. It includes badges like Perfect Score, On The Rise, Speed Demon, etc.

Badges are displayed on the student's profile page and the home page achievements panel.


Anti-Cheat System

MedhaVIT implements a multi-layered security system to maintain exam integrity:

Layer What it does
Fullscreen Enforcement Quiz requires fullscreen mode. Exiting fullscreen triggers auto-submit.
Tab Switch Detection Switching tabs or windows immediately auto-submits the quiz.
Window Focus Loss Losing window focus (Alt+Tab, Win+D) auto-submits.
Keyboard Shortcut Blocking F12, Ctrl+Shift+I/J/C/K/M, Ctrl+U, Ctrl+S, Cmd+Option+I/J/C, and other shortcuts are blocked.
Right-Click Blocking Context menu is fully disabled during the exam.
Copy/Paste/Cut Blocking Clipboard operations are intercepted and prevented.
Desktop Only Mobile and tablet devices (including desktop mode on mobile browsers) are blocked entirely.
Proctor Extension The MedhaVIT Proctor Guard browser extension is required. It detects and blocks prohibited third-party extensions (cheating tools, AI assistants, etc.) before allowing quiz access.
Global DevTools Detector A global detector runs app-wide (not just during quizzes). Opening DevTools signs the user out and shows a security alert.

When a violation is detected during a quiz, the current responses are saved and submitted automatically. The student is then redirected to their results page.


Authentication and Security

  • Supabase Auth: Email/password authentication with email confirmation on signup.
  • Role-Based Access Control: Teacher and student roles enforced via React Router protected routes and Supabase Row Level Security (RLS) policies.
  • Password Reset: Forgot-password flow sends a reset link via Supabase, redirecting to an in-app password update page.
  • Row Level Security: All database tables (profiles, quizzes, questions, quiz_attempts) have RLS policies ensuring:
    • Students can only see live quizzes and their own attempts.
    • Teachers can only manage their own quizzes and view attempts for those quizzes.
    • Profile data is publicly readable but only editable by the owner.

Contact

A built-in contact modal (powered by EmailJS) allows users to send messages directly to the developer from the footer.


Project Structure

Directory structure:
└── arhamshah01-medhavit/
    ├── README.md
    ├── eslint.config.js
    ├── index.html
    ├── netlify.toml
    ├── package.json
    ├── supabase_schema.sql
    ├── vite.config.js
    ├── .env
    ├── src/
    │   ├── App.css
    │   ├── App.jsx
    │   ├── index.css
    │   ├── main.jsx
    │   ├── components/
    │   │   ├── Calculator.jsx
    │   │   ├── ContactModal.jsx
    │   │   ├── ErrorBoundary.jsx
    │   │   └── Navbar.jsx
    │   ├── hooks/
    │   │   └── useAuth.jsx
    │   ├── pages/
    │   │   ├── AuthCallback.jsx
    │   │   ├── Login.jsx
    │   │   ├── Profile.jsx
    │   │   ├── QuizAttempt.jsx
    │   │   ├── StudentAnalysis.jsx
    │   │   ├── StudentHome.jsx
    │   │   ├── TeacherAnalysis.jsx
    │   │   ├── TeacherDashboard.jsx
    │   │   └── UpdatePassword.jsx
    │   └── utils/
    │       ├── badgeLogic.js
    │       ├── groq.js
    │       ├── quizStatus.js
    │       └── supabase.js
    └── supabase/
        └── functions/
            └── generate-quiz/
                └── index.ts


License

Developed by Arham Shah. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages