Skip to content

rmccbit/equiz_rmc

Repository files navigation

RMC E-Quiz 2025

A National Level Mathematics E-Quiz application built with React, Node.js, and MongoDB.

Features

  • User registration and authentication
  • Real-time quiz with auto-save functionality
  • Live leaderboard with real-time updates
  • Admin dashboard for managing participants and results
  • Google Sheets integration for data export
  • Anti-cheat mechanisms
  • Responsive design with Tailwind CSS

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (local or cloud)
  • Redis (optional, falls back to in-memory cache)

Installation

  1. Clone the repository
  2. Install dependencies:
    npm install

Running the Application

Development Mode (Both Frontend and Backend)

npm run dev:full

Frontend Only

npm run dev

Backend Only

npm run dev:server

Database Setup

  1. Start MongoDB
  2. Run the seeder to populate sample questions:
    npm run seed
  3. Create admin user:
    npm run seed:admin

API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • GET /api/auth/verify - Verify token

Quiz

  • GET /api/quiz/questions - Get quiz questions
  • POST /api/quiz/save-progress - Save quiz progress
  • POST /api/quiz/submit - Submit quiz

Leaderboard

  • GET /api/leaderboard - Get leaderboard
  • GET /api/leaderboard/rank - Get user rank

Admin

  • GET /api/admin/stats - Get admin statistics
  • GET /api/admin/registrations - Get registrations
  • POST /api/admin/sync-sheets - Sync to Google Sheets

Project Structure

├── src/                    # Frontend source code
│   ├── components/        # React components
│   ├── pages/            # Page components
│   ├── hooks/            # Custom React hooks
│   ├── services/         # API and socket services
│   ├── context/          # React context providers
│   └── styles/           # CSS styles
├── server/               # Backend source code
│   ├── routes/           # Express routes
│   ├── models/           # MongoDB models
│   ├── middleware/       # Express middleware
│   ├── services/         # External services
│   ├── utils/            # Utility functions
│   └── seeders/         # Database seeders
└── package.json          # Project dependencies

Technologies Used

Frontend

  • React 18
  • React Router DOM
  • Tailwind CSS
  • Lucide React (Icons)
  • Socket.io Client

Backend

  • Node.js
  • Express.js
  • MongoDB with Mongoose
  • Socket.io
  • JWT Authentication
  • Redis (optional)
  • Google Sheets API

Security Features

  • JWT-based authentication
  • Rate limiting
  • Input validation
  • Anti-cheat mechanisms
  • CORS protection
  • Helmet.js security headers

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors