How shabesa/automated-attendance-system works
Project Type and Purpose
• This is an embedded-plus-software attendance system.
• It uses Python for core logic (face recognition, UI, CSV logging, Firebase integration, email) and Arduino (RFID reader + TFT display) for hardware interfacing.
File Structure
• Top-level Python modules:
• main.py – orchestrator
• SerialComms.py – serial link to Arduino
• UI.py – Tkinter GUI
• face_recog.py – camera + face_recognition lib
• add_card.py – RFID tag registration
• data_map.py – plotting attendance graphs
• firebase.py – firebase_admin pushes
• mail.py – emailing CSV reports
• Arduino code under arduino/rfid and arduino/tft_info: RFID tag reading and TFT display logic.
• Data storage: cards.csv (RFID ↔ student map) and attendance CSV files under attendance/.
• Configuration: settings.txt, requirements.txt.
• Tests under test/.
README Insights
• Real-time face recognition + RFID tag verification.
• Attendance logged locally (CSV) and remotely (Firebase).
• Final report emailed and optionally visualized on a Flutter mobile app.
Main Components
a. Hardware Layer
• Arduino Uno/Mega with RFID Reader
• TFT Display Module
• Camera (USB or embedded)
b. Application Layer (Python)
• main.py (Controller)
• face_recog.py (Vision module)
• SerialComms.py (Serial I/O)
• UI.py (User interface)
• add_card.py (Tag enrollment)
• data_map.py (Graphing module)
• firebase.py (Cloud sync)
• mail.py (Email service)
c. Data Layer
• Local CSV files (cards.csv, attendance CSVs)
• Firebase Realtime Database
d. External Services
• SMTP Mail Server
• (Optional) Flutter Attendance_Viewer App via Firebase
Relationships and Data Flow
• Camera → face_recog.py → main.py
• RFID tag present → Arduino (rfid.ino) → SerialComms.py → main.py
• main.py checks face + tag → updates attendance CSV → triggers data_map.py and mail.py
• firebase.py pushes attendance records to Firebase → Flutter App reads from Firebase
• UI.py provides real-time status and controls add_card.py for new tag enrollment
• TFT module (tft_info.ino) receives simple status messages from Python over serial
Architectural Patterns and Design Principles
• Layered architecture: Hardware ↔ Serial I/O ↔ Core logic ↔ Data ↔ External services
• Single-responsibility modules (one Python file = one major function)
• Loose coupling via well-defined serial protocol and CSV/Firebase interfaces
• Clear, human-readable labels on every component.
• Notes on any configuration files or settings (e.g., serial baud rate in settings.txt).