This project is a real-time, QR-based attendance system built with Node.js, Express, Socket.IO, and Google Sheets integration. It ensures secure and verifiable attendance by requiring students to:
- ✅ Scan a rotating QR code (refreshes every few seconds)
- ✅ Fill a form with Name, Roll Number, Admission ID, Location, and Selfie
- ✅ Stay in fullscreen mode (attendance is cancelled if they exit or minimize)
- ✅ Wait for teacher’s verification
Teachers (admins) can:
- 🖥️ Create a room and display the QR code
- 👩🏫 View live submissions (selfie, student details, location)
- ✅ Verify or reject attendance
- 📤 Sync verified data directly to Google Sheets with class name & date
- Scan QR to join attendance session
- Auto enter fullscreen mode
- If fullscreen is exited / app minimized → attendance is cancelled
- Submit form with selfie + live location
- Wait in verification screen until teacher approves
- Create room & generate QR code (rotates every few seconds)
- View all student submissions in real-time
- See selfie (not stored, only displayed) + location + roll number
- Verify student → entry confirmed
- Export verified attendance data to Excel or Google Sheets
-
Attendance data (excluding selfies) can be exported to:
- Excel (downloadable)
- Google Sheets (teacher pastes sheet link, data synced with date & class name)
- Frontend: EJS, HTML, CSS, JavaScript
- Backend: Node.js, Express
- Real-time: Socket.IO
- Storage/Export: Excel (xlsx), Google Sheets API
- Location Services: HTML5 Geolocation + Reverse Geocoding
- Camera Access: HTML5 Media API
git clone https://github.com/your-username/attendance-system.git
cd attendance-system
npm install
- Create a Google Cloud project
- Enable Google Sheets API
- Create a Service Account and download credentials JSON
- Share your Google Sheet with the service account email
- Place credentials in
config/credentials.json
npm start
http://localhost:3000
- Attendance only valid with QR + form + fullscreen
- Entry key generated per student to prevent duplication
- Admin verified with JWT before room creation
- Local storage auto-cleared after submission
- Teacher creates a room → QR displayed on screen
- Student scans QR → form opens in fullscreen
- Student submits selfie + location → goes to waiting room
- Teacher verifies entry → attendance recorded
- Data synced/exported to Google Sheet