Student Session Management System
A comprehensive web-based system for managing student sessions, attendance, and enrollment across multiple colleges and batches using Google Sheets as backend.
Features
Admin Features
- Calendar Dashboard: Visual calendar showing attendance counts per date
- Batch Management: Create and manage batches with auto-generated names
- QR Code Generation: Generate enrollment and attendance QR codes
- Attendance Reports: View and export attendance data as CSV
- Search & Filter: Advanced filtering by college, batch, and date range
Student Features
- Google OAuth Login: Secure authentication via Google
- One-Click Enrollment: Scan QR to register and auto-mark first attendance
- Quick Attendance: Mark daily attendance via QR code
- Attendance History: View personal attendance records
Tech Stack
Frontend
- HTML5, CSS3, JavaScript (ES6+)
- Bootstrap 5.1.3
- FullCalendar 5.10.1
- QRCode.js
- SheetJS (XLSX)
- Google Identity Services
Backend
- Google Apps Script
- Google Sheets (Database)
- Google OAuth 2.0
Project Structure
attendance/
├── admin/
│ ├── index.html # Calendar dashboard
│ ├── enroll-batch.html # Batch management
│ └── attendance-list.html # Attendance reports
├── student/
│ ├── enroll.html # Student enrollment
│ └── attend.html # Attendance marking
├── assets/
│ ├── css/
│ │ └── style.css # Global styles
│ └── js/
│ ├── config.js # Configuration
│ ├── calendar.js # Calendar logic
│ ├── batch.js # Batch management
│ ├── attendance.js # Attendance list
│ ├── enroll.js # Student enrollment
│ └── attend.js # Attendance marking
├── backend/
│ └── Code.gs # Google Apps Script
├── requirements.json # Detailed specifications
└── README.md
Setup Instructions
1. Google Apps Script Setup
- Create a Google Spreadsheet
- Go to Google Sheets
- Create a new spreadsheet
- Name it “Student Attendance Database”
- Add Required Sheets
- Create three sheets:
batches, students, attendance
- Add headers as specified in the backend/Code.gs file
- Open Apps Script Editor
- In your spreadsheet, go to Extensions > Apps Script
- Delete any existing code
- Copy the content from
backend/Code.gs
- Save the project (File > Save)
- Deploy as Web App
- Click Deploy > New deployment
- Select type: Web app
- Execute as: Me
- Who has access: Anyone
- Click Deploy
- Copy the Web App URL
2. Google OAuth Setup
- Create Google Cloud Project
- Create OAuth Credentials
- Go to APIs & Services > Credentials
- Create OAuth 2.0 Client ID
- Application type: Web application
- Add authorized JavaScript origins:
- Your GitHub Pages URL
- http://localhost (for testing)
- Copy the Client ID
3. Frontend Configuration
- Update Config File
- Open
assets/js/config.js
- Replace
YOUR_SCRIPT_ID with your Apps Script Web App URL
- Replace
YOUR_GOOGLE_CLIENT_ID with your OAuth Client ID
- Update
APP_URL with your deployment URL
- Update HTML Files
- Replace
YOUR_GOOGLE_CLIENT_ID in:
student/enroll.html
student/attend.html
4. Deploy to GitHub Pages
- Create GitHub Repository
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/yourusername/attendance.git
git push -u origin main
- Enable GitHub Pages
- Go to repository Settings
- Pages section
- Source: Deploy from main branch
- Save
- Access Your App
- Admin Dashboard:
https://yourusername.github.io/attendance/admin/index.html
- Student Pages: Use QR codes generated by admin
Usage Guide
Admin Workflow
- Create a Batch
- Go to “Enroll Batch” page
- Select college (or add new)
- Click “Create Batch”
- Batch name is auto-generated
- Two QR codes are generated:
- Enrollment QR: For new student registration
- Attendance QR: For daily attendance
- Share QR Codes
- Download QR codes
- Display enrollment QR at registration desk
- Display attendance QR during sessions
- View Attendance
- Calendar View: Click dates to see students
- Attendance List: Filter by date range, college, batch
- Export: Download CSV reports
Student Workflow
- First Time (Enrollment)
- Scan Enrollment QR code
- Sign in with Google
- Verify pre-filled details
- Submit (attendance auto-marked)
- Daily Attendance
- Scan Attendance QR code
- Sign in with Google (if not already)
- Click “Mark Attendance”
- See confirmation
Testing Without Backend
The frontend includes mock data for testing without setting up the backend:
- Open any admin page in a browser
- The app will fallback to mock data when API calls fail
- All features work with sample data
API Endpoints
The Google Apps Script provides these endpoints:
createBatch: Create new batch
getBatches: Get all batches
getCalendarData: Get attendance calendar data
getStudentsByDate: Get students for a specific date
enrollStudent: Register new student
markAttendance: Mark student attendance
getAttendanceList: Get attendance records
checkEnrollment: Verify student enrollment
checkTodayAttendance: Check if attendance marked today
Database Schema
Batches Sheet
| Column | Type | Description |
|——–|——|————-|
| batchId | String | Unique identifier |
| batchName | String | Display name |
| college | String | College name |
| createdDate | Timestamp | Creation date |
| enrollmentURL | String | Enrollment link |
| attendanceURL | String | Attendance link |
| isActive | Boolean | Status |
Students Sheet
| Column | Type | Description |
|——–|——|————-|
| studentId | String | Unique identifier |
| googleId | String | Google OAuth ID |
| name | String | Full name |
| email | String | Email address |
| college | String | College name |
| batchId | String | Batch reference |
| photoURL | String | Profile picture |
| enrolledDate | Timestamp | Enrollment date |
Attendance Sheet
| Column | Type | Description |
|——–|——|————-|
| attendanceId | String | Unique identifier |
| studentId | String | Student reference |
| batchId | String | Batch reference |
| date | Date | YYYY-MM-DD |
| timestamp | Timestamp | Exact time |
| college | String | College name |
Browser Compatibility
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Mobile Responsive
Fully optimized for:
- Mobile phones
- Tablets
- Desktop
Security Features
- Google OAuth 2.0 authentication
- No password storage
- Secure API communication
- Session management via localStorage
Troubleshooting
QR Codes Not Generating
- Check if QRCode.js library is loaded
- Verify batch creation was successful
- Check browser console for errors
Google Sign-In Not Working
- Verify OAuth Client ID is correct
- Check authorized JavaScript origins
- Ensure HTTPS is enabled (or localhost for testing)
API Calls Failing
- Verify Apps Script Web App URL
- Check Apps Script deployment settings
- Ensure “Anyone” has access to the web app
Calendar Not Loading
- Check FullCalendar library is loaded
- Verify API endpoint configuration
- Check browser console for errors
Support
For issues or questions:
- Check the troubleshooting section
- Review the requirements.json for detailed specs
- Check browser console for error messages
License
MIT License - Free to use and modify
Credits
Built with:
- Bootstrap 5
- FullCalendar
- QRCode.js
- Google Apps Script
- Google Identity Services