A Flutter-based mobile application for QR code attendance management with Firebase integration. This app allows teachers to create classes, generate QR codes, and students to mark attendance by scanning QR codes.
- Register and login with email/password
- Join classes using class codes
- Scan QR codes to mark attendance
- View personal attendance history
- Prevent duplicate attendance marking per day
- Create and manage classes
- Generate unique QR codes for each class
- View and manage attendance records
- Update attendance status (Present/Late/Absent)
- Filter attendance by date
- View attendance history for each of their classes.
- Frontend: Flutter
- Backend: Firebase (Firestore, Authentication)
- QR Code Generation:
qr_flutter - QR Code Scanning:
mobile_scanner - State Management:
Provider
lib/
├── main.dart # App entry point
├── models/ # Data models
│ └── user_model.dart # User, Class, and Attendance models
├── services/ # Business logic and Firebase services
│ ├── auth_service.dart # Authentication service
│ └── attendance_service.dart # Attendance management service
├── screens/ # UI screens
│ ├── auth/ # Authentication screens
│ │ ├── login_screen.dart
│ │ └── register_screen.dart
│ ├── student/ # Student screens
│ │ ├── student_home.dart
│ │ ├── qr_scanner_screen.dart
│ │ ├── student_attendance_history.dart
│ │ └── join_class_screen.dart
│ ├── teacher/ # Teacher screens
│ │ ├── teacher_home.dart
│ │ ├── create_class_screen.dart
│ │ ├── class_details_screen.dart
│ │ └── attendance_list_screen.dart
│ └── auth_wrapper.dart # Authentication state handler
└── utils/
└── theme.dart # App theme configuration
- Flutter SDK (3.0.0 or higher)
- Android Studio / VS Code
- Firebase CLI (optional)
- Clone the repository
git clone <repository-url>
cd qr_attendance_app- Install dependencies
flutter pub get- Firebase Setup
- Go to Firebase Console
- Create a new project
- Enable Authentication and Firestore Database
- Enable Email/Password authentication in Firebase Console
- Create a Firestore database and follow the next steps for futher configuration.
-
Download
google-services.jsonfor Android and place inandroid/app/ -
Download
GoogleService-Info.plistfor iOS and place inios/Runner/ -
Update
lib/firebase_options.dartwith your Firebase project configuration -
Configure Firebase
- Follow the Firebase setup instructions above
- Update
firebase_options.dartwith your project details from thegoogle-services.json.
- Run the app
flutter run- Register/Login with email and password, select "Teacher" role
- Create a Class from the dashboard
- Share Class Code with students for enrollment
- Generate QR Code for attendance in class details
- View Attendance records and manage student attendance status
- Register/Login with email and password, select "Student" role and enter Student ID
- Join Class using the class code provided by teacher
- Scan QR Code during class to mark attendance
- View History to check personal attendance records
- Format:
attendance:{classId} - Example:
attendance:abc123def456
- Students can only mark attendance once per day per class
- Automatic timestamp recording
- Status can be updated by teachers (Present/Late/Absent)
- Firebase Authentication for user management
- Firestore security rules to protect data
- Input validation on all forms
{
uid: string,
email: string,
name: string,
role: "student" | "teacher",
studentId?: string,
classIds: string[]
}{
id: string,
name: string,
teacherId: string,
teacherName: string,
enrolledStudents: string[],
createdAt: timestamp,
isActive: boolean
}{
id: string,
classId: string,
className: string,
studentId: string,
studentName: string,
timestamp: timestamp,
status: "present" | "late" | "absent",
dateStr: string, // YYYY-MM-DD format
notes?: string
}The app requires the following permissions:
CAMERA- For QR code scanningINTERNET- For Firebase connectivityACCESS_NETWORK_STATE- For network status
- Push notifications for attendance reminders
- Export attendance data to CSV
- Attendance analytics and reports
- Bulk student import
- Class schedule management
- Offline attendance marking
-
QR Scanner not working
- Ensure camera permissions are granted
- Check if device has a working camera
- Restart the app if scanner freezes
-
Firebase connection issues
- Verify internet connection
- Check Firebase configuration
- Ensure Firestore rules allow access
-
Build errors
- Run
flutter cleanandflutter pub get - Check Flutter and Dart SDK versions
- Verify all dependencies are compatible
- Run
This project is licensed under the MIT License - see the LICENSE file for details.
For support or questions, please feel free to reach out to me.