QRollCall is a comprehensive web-based attendance tracking application designed for educational institutions. It uses QR code technology for efficient attendance management, allowing lecturers to generate unique QR codes for each session that students can scan to mark their attendance.
- Features
- Tech Stack
- Architecture
- Installation
- Usage Guide
- API Documentation
- PWA Support
- Offline Mode
- Security
- Contributors
- License
- QR Code-based Attendance: Generate and scan QR codes for quick attendance marking
- Real-time Tracking: Monitor attendance in real-time with instant updates
- Auto Refresh Capability: Automatically refresh data without manual intervention
- Role-based Access Control: Different interfaces for students, lecturers, and administrators
- Analytics Dashboard: Comprehensive attendance statistics and reports
- Feedback System: Collect and analyze student feedback after sessions
- Progressive Web App: Install on devices for offline and native-like functionality
- Easy scanning of QR codes to mark attendance
- Personal attendance history and statistics
- Course and unit management
- Feedback submission for completed sessions
- Quick session creation with auto-expiring QR codes
- Real-time view of attending students
- Historical session data and analytics
- Student performance tracking per unit
- Feedback review from students
- Institution-wide attendance analytics
- Department and course management
- User management for students and lecturers
- Bulk operations via CSV imports/exports
- System configuration and settings
- Framework: React.js
- UI Library: Ant Design
- State Management: Context API
- Routing: React Router
- HTTP Client: Axios
- PWA Support: VitePWA
- Data Visualization: Chart.js with React-Chartjs-2
- QR Code Handling: react-qr-code, react-qr-reader
- Build Tool: Vite
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (JSON Web Tokens)
- API Documentation: Express-based documentation (Swagger integration planned)
- File Handling: Multer
- Email Services: Nodemailer
- Data Validation: Express-validator
- Security Middleware: Helmet, CORS
- Logging: Winston
- Task Scheduling: Node-schedule
The application follows a client-server architecture:
- Frontend: Single-page application built with React
- Backend: RESTful API service built with Express.js
- Database: MongoDB document database
- Authentication: JWT token-based auth (single token strategy)
- Caching: Service worker and IndexedDB for offline capabilities
- Node.js (v14+)
- npm or yarn
- MongoDB (local or Atlas connection)
- Git
- Clone the repository:
git clone https://github.com/yourusername/attendance-system.git
cd attendance-system/backend- Install dependencies:
npm install- Create a
.envfile in the backend directory:
PORT=5000
MONGO_URI=mongodb://localhost:27017/attendance-system
JWT_SECRET=your_jwt_secret_key
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@example.com
SMTP_PASS=your-app-password
CLIENT_URL_DEV=http://localhost:5173
CLIENT_URL_PROD=https://your-production-url.com
- Start the backend server:
npm startFor development with nodemon:
npm run dev- Navigate to the frontend directory:
cd ../frontend- Install dependencies:
npm install- Create a
.envfile in the frontend directory:
VITE_API_URL=http://localhost:5000/api
- Start the development server:
npm run dev- Build for production:
npm run build- Login with the default admin credentials (email: admin@example.com, password: adminpassword)
- Update your admin profile and password for security
- Set up departments and courses structure
- Import or add lecturers and students
- Navigate to the Admin Panel > Manage Students/courses/Lecturers
- Create, edit, or delete users as needed
- Bulk import users via CSV/excel templates(available for download)
- Manage departments and courses
- Configure semester dates and attendance policies
- View system analytics and reports
- Login to your lecturer account
- Navigate to your dashboard
- Select a unit to create a new session
- Set session duration and click "Generate QR Code"
- Display the QR code for students to scan
- Monitor attendance in real-time
- End session manually or let it auto-end at the set time
- Navigate to Analytics > Attendance Records
- Filter by unit, date range, or student
- Export attendance reports as needed
- Go to Feedback section
- View and analyze student feedback by session or unit
- Login to your student account
- Go to the QR Scanner page
- Select the relevant unit
- Scan the QR code displayed by your lecturer
- Confirm your attendance was successfully recorded
- Navigate to My Attendance to see your attendance history
- View attendance rates per unit and overall
- After a session ends, you'll be prompted to provide feedback
- Rate different aspects of the session and submit comments
The backend API is organized into the following main routes:
POST /api/auth/login- User loginPOST /api/auth/signup- User registrationPOST /api/auth/reset-password- Request password resetPUT /api/auth/reset-password/:token- Reset password with token
GET /api/users/profile- Get user profilePUT /api/users/profile/update- Update user profileGET /api/students- Get all studentsPUT /api/students/:id- Update student informationDELETE /api/students/:id- Delete student
POST /api/department/create- Create departmentGET /api/department- Get all departmentsPOST /api/course/create- Create courseGET /api/course- Get all coursesGET /api/course/:departmentId- Get courses by department
POST /api/unit/add- Add a unitGET /api/unit- Get all unitsPUT /api/unit/:id- Update unitDELETE /api/unit/:id- Delete unit
POST /api/attendance/mark- Mark attendanceGET /api/attendance/student/:studentId- Get student's attendanceGET /api/attendance/session/:sessionId- Get session attendanceGET /api/attendance/trends/:unitId- Get attendance trends
POST /api/sessions/create- Create a new sessionPOST /api/sessions/regenerate-qr- Regenerate QR codePOST /api/sessions/end- End a sessionGET /api/sessions/active/:unitId- Get active session
POST /api/feedback/submit- Submit feedbackGET /api/feedback/lecturer- Get feedback for lecturerGET /api/feedback/summary- Get feedback summary
QRollCall includes Progressive Web App (PWA) support:
- Installable on mobile and desktop devices
- Basic offline access to previously viewed content
- Online/offline status indicators
- Service worker for asset caching
To install the PWA:
- Open the application in a supported browser
- Click the "Install" button in the header
- Follow the prompts to add the app to your home screen
The application implements a robust offline strategy:
- Session data is cached for offline viewing
- Attendance marking requires an internet connection to validate QR codes
- Previously loaded profile and course data is available offline
- IndexedDB stores user profile and relevant course information
- Clear visual indicators show online/offline status
- Automatic reconnection and synchronization when connection is restored
The system implements several security measures:
- JWT-based authentication with token expiration
- Password hashing using bcrypt
- HTTPS for all communications
- Input validation and sanitization
- CORS protection against unauthorized domains
- Rate limiting to prevent brute force attacks
- QR codes that expire quickly to prevent sharing
This project is licensed under the MIT License - see the file for details


