Skip to content

Shaurya-Dwivedi/poll

Repository files navigation

Classroom Polling Meter

A real-time polling system that integrates ESP32 hardware with a web-based dashboard for interactive classroom voting and attendance tracking, built under the guidance of Dr. Binod Kumar.

Overview

This project enables instructors to create live polls that students can participate in using ESP32 devices with physical buttons. The system provides real-time feedback and analytics through a web dashboard.

Features

  • Real-time poll creation and management
  • ESP32 hardware integration for physical voting
  • Web-based instructor dashboard
  • Student attendance tracking
  • Live vote counting and results display
  • MongoDB data persistence
  • CORS-enabled API for cross-origin requests

Architecture

  • Backend: Node.js with Express.js framework
  • Database: MongoDB with Mongoose ODM
  • Frontend: HTML/CSS/JavaScript with real-time updates
  • Hardware: ESP32 microcontroller with WiFi connectivity
  • Deployment: Render-ready configuration

Getting Started

Prerequisites

  • Node.js 14.0.0 or higher
  • MongoDB database
  • ESP32 development board
  • Arduino IDE for ESP32 programming

Installation

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Configure environment variables:

    cp .env.example .env
    # Edit .env with your MongoDB connection string
  4. Seed sample student data:

    npm run seed
  5. Start the server:

    npm start

ESP32 Setup

  1. Open esp_code/esp_code.ino in Arduino IDE
  2. Update WiFi credentials and server URL
  3. Upload code to ESP32 device
  4. Monitor serial output for connection status

API Endpoints

  • GET /health - Health check endpoint
  • POST /poll - Create new poll
  • POST /vote - Submit vote
  • GET /poll - Get current active poll
  • POST /end-poll - End current poll
  • POST /register - Register new user
  • POST /login - User authentication

Default Access

Instructor Access

  • Register with master code: IITJPM2025

Sample Student Codes

  • DDDDDD - Shaurya Dwivedi
  • BBBBBB - Samruddha Jadhav
  • AAAAAA - Atharva Ajmera
  • CCCCCC - Kushagra Khare
  • ABCDDD - Kunal Singh

Project Structure

├── server/              # Backend application
│   ├── models/         # MongoDB data models
│   ├── config/         # Database configuration
│   └── scripts/        # Utility scripts
├── public/             # Frontend files
├── esp_code/           # Arduino code for ESP32
├── docs/               # Documentation
└── config/             # Application configuration

Development

  • npm start - Start production server
  • npm run dev - Start development server
  • npm run seed - Populate database with sample data
  • npm test - Run tests (not configured)

Deployment

The project includes Render deployment configuration. See QUICKSTART.md for detailed deployment instructions.

Documentation

  • docs/DEPLOYMENT.md - Deployment guide
  • docs/CONFIG.md - Configuration details
  • docs/DATABASE_SCHEMA.md - Database schema
  • docs/MONGODB_SETUP.md - MongoDB setup guide

License

ISC

About

A real-time polling system that integrates ESP32 hardware with a web-based dashboard for interactive classroom voting and attendance tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors