Attendance System
Database

Click any collection to explore its fields, sample data, and how it connects to everything else.

8
COLLECTIONS
7
RELATIONSHIPS
4
DATA FLOWS
01 / SCHEMA
Collections
Every MongoDB collection in your system โ€” what it stores and why it exists.
๐Ÿ‘ค
9 fields
User
Central identity store. One document per person regardless of role โ€” admin, teacher, or student.
role email password uid
๐ŸŽ“
3 fields
Student
Maps a physical RFID card UID to a student's identity. The bridge between hardware and people.
uid rollNo name
๐Ÿ“š
2 fields
Subject
A course or class like "Mathematics" with a short code. Referenced by lecture sessions.
name code
๐Ÿซ
5 fields
LectureSession
A live class window. While isOpen is true, RFID scans are recorded. Closed by teacher to end attendance.
subjectId startTime isOpen
โœ…
4 fields
Attendance
The core record. One per student per lecture. Status is Present, Late, or Absent โ€” determined by scan time.
โ†’ User โ†’ LectureSession status
๐Ÿ“‹
6 fields
LeaveRequest
Student submits a request to excuse absences for a date range. Admin/teacher approves or rejects it.
โ†’ User startDate status
๐Ÿ“ก
2 fields
LatestScan
A single-document collection that holds the most recent RFID scan. The RFID reader writes here; the server reads it.
uid timestamp
โš™๏ธ
2 fields
SystemState
Global on/off switch. Controls whether the system is in ATTENDANCE mode or MANAGEMENT mode.
mode key