Skip to content

Understanding Attendizer

Anthony Chen edited this page Nov 7, 2022 · 8 revisions

Code for Attendizer

Looking at the repository for Attendizer, you'll notice 2 folders: client and server.

Client

The client is built with Next.js.

Pages

admin.js This is the admin panel. There is a table, with each row being a StudentEntry that contains the student's ID (database key), Name (full name), OSIS (9-digit student ID number), and UID (13-digit number on ID card).

The "Edit" and "Delete" buttons allow you to edit a student's information (name, OSIS, UID), or delete the student entirely.

To add a student, press the "Add Student" button below the table. To export the student info, press the "Export as XLSX" button.
index.js This is the home page for the application. There's a small text box that takes in either a student's OSIS or UID, and a larger box above that logs recent scan-ins. If invalid information is given, an error will display.
meetings.js This is the meetings page for controlling meetings. There is a table, with each row being a MeetingEntry that contains the ID (meeting key, student key), Date (date of the meeting), and Name (full name of the student).

The "Delete Meeting" deletes the entire meeting, which affects all scan-ins for that particular meeting. To export the meeting info, press the "Export as XLSX" button.

Server

The server is built with Node.js, Express.js, and SQLite3.

Models

attendanceEntry.js This model is used in the many-to-many relation present in this database. The model fields are not used.
database.js This file contains the connection and initialization of the database.
meeting.js This model stores a meeting instance, which contains the date of the meeting.
student.js This model stores a student instance, which contains the name, OSIS, and UID of the student.

Clone this wiki locally