Secure attendance management with RFID-based identification, TOTP verification, role-based access control, and IoT attendance terminals.
SecureAttend is a full-stack attendance management system designed to address a fundamental weakness in traditional RFID attendance systems: an RFID card alone does not prove that the person holding it is the legitimate student.
The system combines RFID identification with Time-based One-Time Password (TOTP) verification and a centralized backend to provide a more reliable attendance workflow across both web and IoT-based terminals.
Traditional RFID attendance systems generally treat the RFID card as the identity of the student.
That creates a simple problem:
If someone else has your RFID card, the system may have no way of knowing that they are not you.
SecureAttend approaches the problem differently.
Instead of treating an RFID card as complete authentication, it uses the card to identify the student and TOTP to provide an additional verification factor.
RFID Card
β
Student Identification
β
Temporary Attendance Session
β
TOTP Verification
β
Attendance Recorded
The same backend can serve both browser-based clients and dedicated IoT attendance terminals.
Administrators can manage users and attendance-related operations, including:
- Create and manage students
- Create and manage teachers
- Assign RFID cards to students
- View attendance information
- Monitor attendance eligibility
- Manage system-level configuration
Teachers can:
- Authenticate through protected login
- View students
- Mark attendance manually
- Generate TOTP setup information for students
- Monitor attendance records
Students can:
- Authenticate through the system
- Configure TOTP-based verification
- Mark attendance through the web interface
- Use RFID-based attendance
- View attendance percentage
- Check attendance eligibility
SecureAttend can interface with an Arduino-based attendance terminal containing:
- Arduino UNO
- RC522 RFID reader
- 16Γ2 I2C LCD
- 4Γ4 matrix keypad
- Optional buzzer
- Optional status LEDs
The terminal communicates with the centralized backend over a local network.
SecureAttend separates identification from verification.
An RFID card identifies the student associated with the card, while TOTP provides an additional verification factor.
ββββββββββββββββ
β RFID Card β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββββββββ
β Identify Student β
βββββββββββ¬βββββββββββ
β
βΌ
ββββββββββββββββββββββ
β Create Temporary β
β Attendance Session β
βββββββββββ¬βββββββββββ
β
βΌ
ββββββββββββββββββββββ
β Request TOTP Code β
βββββββββββ¬βββββββββββ
β
βΌ
ββββββββββββββββββββββ
β Verify TOTP β
βββββββββββ¬βββββββββββ
β
Valid?
/ \
No Yes
β β
βΌ βΌ
Reject Record
Attendance
The temporary session prevents the RFID identification step from directly recording attendance.
The browser-based workflow follows the same authentication concept:
Student
β
βΌ
RFID / Student Identification
β
βΌ
Backend creates temporary session
β
βΌ
Student enters TOTP
β
βΌ
Backend verifies TOTP
β
βΌ
Attendance recorded
The IoT terminal performs the same process through dedicated hardware.
RFID Card
β
βΌ
RC522 Reader
β
βΌ
Arduino
β
βΌ
Backend API
β
βΌ
Temporary Attendance Session
β
βΌ
OTP entered through Keypad
β
βΌ
Backend verifies TOTP
β
βΌ
Attendance recorded
β
βΌ
LCD displays result
The Arduino terminal acts as a client of the backend, rather than maintaining an independent attendance database.
This keeps attendance processing centralized and allows multiple terminals to operate against the same system.
βββββββββββββββββββββββ
β MongoDB β
β Database β
ββββββββββββ²βββββββββββ
β
β
βββββββββββββββββ ββββββββ΄βββββββ βββββββββββββββββββ
β React Web App ββββββββΆβ Express βββββββββ Arduino Terminalβ
β β HTTP β Backend β HTTP β β
βββββββββββββββββ ββββββββ¬βββββββ ββββββββββ¬βββββββββ
β β
ββββββββΌβββββββ βββββββΌββββββ
β Auth / TOTP β β RC522 β
β JWT / RBAC β β RFID β
βββββββββββββββ βββββββββββββ
| Component | Responsibility |
|---|---|
| React frontend | User interface and web workflows |
| Express backend | API, authentication and business logic |
| MongoDB | Persistent application data |
| Arduino terminal | Physical attendance interface |
| RC522 | RFID card identification |
| TOTP | Additional verification factor |
| JWT | Protected web API authentication |
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT
- bcrypt
- Speakeasy
- dotenv
- React
- Vite
- JavaScript
- Fetch API
- CSS
- Arduino UNO
- RC522 RFID reader
- 16Γ2 LCD with I2C
- 4Γ4 matrix keypad
- Optional buzzer / LEDs
- Git
- GitHub
- Arduino IDE
SecureAttend/
β
βββ backend/
β βββ middleware/
β βββ models/
β βββ routes/
β βββ utils/
β βββ server.js
β βββ package.json
β
βββ frontend/
β βββ src/
β β βββ components/
β β βββ pages/
β β β βββ Admin/
β β β βββ Student/
β β β βββ Teacher/
β β βββ utils/
β β βββ App.jsx
β β βββ main.jsx
β βββ index.html
β βββ package.json
β
βββ iot/
β βββ ...
β
βββ .env.example
βββ .gitignore
βββ README.md
The exact structure may change as the project evolves. The repository should reflect the current implementation rather than planned architecture.
- Node.js 18+
- npm
- MongoDB database
- Git
- Arduino IDE for IoT development
git clone https://github.com/shubham-kain07/SecureAttend.git
cd SecureAttendcd backend
npm installCreate a .env file based on .env.example.
Example:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=replace_with_a_long_random_secret
ADMIN_USERNAME=your_admin_username
ADMIN_PASSWORD=your_admin_password
TOTAL_WORKING_DAYS=90| Variable | Purpose |
|---|---|
PORT |
Port used by the backend |
MONGO_URI |
MongoDB connection string |
JWT_SECRET |
Secret used for JWT authentication |
ADMIN_USERNAME |
Initial administrator username |
ADMIN_PASSWORD |
Initial administrator password |
TOTAL_WORKING_DAYS |
Number of working days used by attendance calculations |
Never commit your real .env file.
Credentials, database connection strings, JWT secrets, and other sensitive configuration must remain outside version control.
Start the development server:
npm run devThe backend will run on:
http://localhost:5000
Open another terminal:
cd frontend
npm install
npm run devVite will provide the local development URL.
The frontend communicates with the backend through the configured API endpoint.
The Arduino attendance terminal communicates with the backend through HTTP requests.
The terminal is responsible for:
- Reading the RFID card
- Sending the card identifier to the backend
- Receiving the attendance session response
- Collecting the TOTP code
- Sending the verification request
- Displaying the result on the LCD
Example API flow:
POST /api/rfid/tap
β
Temporary attendance session
β
POST /api/rfid/verify
β
TOTP verification
β
Attendance recorded
The backend must be reachable from the Arduino over the local network.
For local development, this normally means using the host machine's LAN IP rather than:
localhost
For example:
http://192.168.x.x:5000
The exact configuration depends on the network and Arduino connectivity method.
Attendance percentage is calculated using:
Attendance Percentage =
(Present Days / Total Recorded Days) Γ 100
The current eligibility threshold is:
β₯ 75% β Eligible
< 75% β Not Eligible
The calculation logic is handled by the backend so attendance results remain consistent across clients.
SecureAttend incorporates several security mechanisms.
User passwords are hashed before storage using bcrypt.
Protected backend routes use JSON Web Tokens for authenticated sessions.
Different user roles have access to different operations.
Admin
βββ User management
βββ RFID management
βββ Attendance management
Teacher
βββ Student access
βββ Attendance operations
Student
βββ Attendance
βββ Personal attendance records
Time-based One-Time Passwords provide an additional verification factor for attendance.
TOTP can be used with compatible authenticator applications such as Google Authenticator.
RFID identification does not directly mark attendance.
A temporary session is created first and must be successfully verified before attendance is recorded.
The backend prevents duplicate attendance records according to the configured attendance rules.
SecureAttend is being developed incrementally.
The general application flow follows:
Frontend / IoT Client
β
API
β
Business Logic
β
Database
Hardware-specific functionality communicates with the backend through defined API endpoints rather than directly manipulating database records.
This keeps the web application, IoT terminals, and database layers separated.
SecureAttend is being developed as the foundation for a larger institutional software platform.
The next generation of the physical attendance system is planned around ESP32-based attendance nodes.
Instead of treating each attendance terminal as an isolated Arduino device, future terminals will operate as a connected network of nodes communicating with the central backend.
Planned architecture:
βββββββββββββββββββββββ
β Central Backend β
β β
β Authentication β
β Attendance β
β Data Processing β
ββββββββββββ¬βββββββββββ
β
βββββββββββββββΌββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββ ββββββββββββ ββββββββββββ
β ESP32 β β ESP32 β β ESP32 β
β Node #01 β β Node #02 β β Node #03 β
ββββββββββββ ββββββββββββ ββββββββββββ
β β β
RFID RFID RFID
Reader Reader Reader
The long-term goal is to create a network of physical attendance nodes that can be centrally managed rather than deploying independent attendance machines.
Planned improvements include:
- ESP32-based attendance nodes
- Multiple synchronized attendance terminals
- Centralized terminal management
- Improved device-to-server communication
- Terminal health and status monitoring
- Offline operation and synchronization
- Remote configuration of attendance nodes
SecureAttend is also evolving beyond an attendance-only platform.
A full College Management System is currently under development as the next major stage of the project.
The planned system will expand the platform into a broader institutional management system covering areas such as:
- Course and program management
- Department management
- Academic years and subjects
- Student management
- Teacher management
- Attendance
- Academic records
- Administrative workflows
- Role-based access control
- Centralized institutional data
The long-term architecture is intended to make attendance one component of a larger college management platform rather than a standalone application.
College Management System
β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
Administration Academics Attendance
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
βΌ
Centralized Backend
β
βββββββββββββββ΄ββββββββββββββ
β β
βΌ βΌ
Web Applications IoT Node Network
β
βββββββββββΌββββββββββ
βΌ βΌ βΌ
ESP32 ESP32 ESP32
The current SecureAttend project serves as an early foundation for this larger system.
SecureAttend can be adapted for:
- Colleges and universities
- Technical institutes
- Training centers
- Educational laboratories
- RFID attendance kiosks
- Small-scale institutional attendance systems
The project is primarily intended as a software engineering and IoT systems project, demonstrating how authentication, backend services, web clients, databases, and physical devices can work together as one system.
SecureAttend explores problems beyond basic CRUD application development.
The project involves:
- API design
- Authentication
- Authorization
- Multi-factor verification
- Database modelling
- IoT-to-server communication
- Client/server architecture
- Session management
- Security considerations
- Hardware/software integration
- Attendance business logic
The goal is to understand how a distributed application behaves when multiple clients interact with the same centralized system.
Shubham Kain
Computer Science & Technology
GitHub: @shubham-kain07
This project is currently developed as a personal and academic software engineering project.
License information will be added when the project reaches its first public release.