# f26-csc1323-001/404-team-not-found architecture

> Architecture diagram of the GitHub repository f26-csc1323-001/404-team-not-found, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/f26-csc1323-001/404-team-not-found
- Repository: https://github.com/f26-csc1323-001/404-team-not-found

## Overview

This is a local, camera-based attendance system with an administrator dashboard. The main workflow is face recognition, liveness verification and stable check-in, followed by schedule/enrollment rules and a persisted attendance record; administrators manage courses and review reports. Registration, model training and LED signaling are additional capabilities. The dashboard and core attendance modules are excerpted; some listed capabilities are represented from the tree or dashboard templates, so their internal links are omitted where source evidence was unavailable.

Main entry points: [`database.py`](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/database.py) (SQLite Store), [`face_recognition.py`](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/face_recognition.py) (Camera Recognition), [`dashboard/app.py`](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/app.py) (Admin Dashboard), [`attendance.py`](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/attendance.py) (Attendance Decision)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Administration"]
  node_dashboard["Admin Dashboard<br/>[app.py]"]
  node_browser["Dashboard Interface<br/>[dashboard.js]"]
  node_registration["Face Registration"]
  node_web_registration["Web Face Registration<br/>[app.py]"]
  node_enrollment["Course Enrollment<br/>[enroll_student.py]"]
  node_training["Face Model Training<br/>[face_training.py]"]
  node_reports["Attendance Reports<br/>[app.py]"]
end

subgraph group_vision["Face Check-In"]
  node_recognition["Camera Recognition"]
  node_liveness["Liveness Challenge"]
  node_stability["Stable Check-In"]
  node_led["Pi LED Signaling<br/>[pi_server.py]"]
end

subgraph group_rules["Attendance Rules"]
  node_attendance["Attendance Decision<br/>[attendance.py]"]
  node_schedule["Course Scheduling<br/>[schedule.py]"]
end

subgraph group_state["Attendance Data"]
  node_database[("SQLite Store<br/>[database.py]")]
end

node_admin_actor(("Administrator"))

node_admin_actor -->|"uses"| node_browser
node_browser -->|"requests"| node_dashboard
node_dashboard -->|"reads and writes"| node_database
node_dashboard -->|"checks schedule"| node_schedule
node_dashboard -->|"serves reports"| node_reports
node_registration -->|"stores student"| node_database
node_web_registration -->|"checks and stores"| node_database
node_enrollment -->|"writes enrollment"| node_database
node_recognition -->|"checks movement"| node_liveness
node_recognition -->|"checks stability"| node_stability
node_recognition -->|"looks up student"| node_database
node_recognition -->|"records check-in"| node_attendance
node_recognition -.->|"signals status"| node_led
node_attendance -->|"gets status"| node_schedule
node_attendance -->|"validates and records"| node_database
node_schedule -->|"reads schedule"| node_database

click node_dashboard "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/app.py"
click node_browser "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/static/dashboard.js"
click node_registration "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/face_registration.py"
click node_web_registration "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/app.py"
click node_enrollment "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/enroll_student.py"
click node_training "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/face_training.py"
click node_recognition "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/face_recognition.py"
click node_liveness "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/liveness_detection.py"
click node_stability "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/auto_attendance_logic.py"
click node_led "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/hardware/pi_server.py"
click node_attendance "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/attendance.py"
click node_schedule "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/schedule.py"
click node_database "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/database.py"
click node_reports "https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_browser,node_registration,node_web_registration,node_enrollment,node_training,node_reports toneBlue
class node_recognition,node_liveness,node_stability,node_led toneAmber
class node_attendance,node_schedule toneMint
class node_database toneRose
class node_admin_actor toneIndigo
```

## Components

### Administration

- [Admin Dashboard](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/app.py): `dashboard/app.py`
- [Dashboard Interface](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/static/dashboard.js): `dashboard/static/dashboard.js`
- [Face Registration](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/face_registration.py): `face_registration.py`
- [Web Face Registration](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/app.py): `dashboard/app.py`
- [Course Enrollment](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/enroll_student.py): `enroll_student.py`
- [Face Model Training](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/face_training.py): `face_training.py`
- [Attendance Reports](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/dashboard/app.py): `dashboard/app.py`

### Face Check-In

- [Camera Recognition](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/face_recognition.py): `face_recognition.py`
- [Liveness Challenge](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/liveness_detection.py): `liveness_detection.py`
- [Stable Check-In](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/auto_attendance_logic.py): `auto_attendance_logic.py`
- [Pi LED Signaling](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/hardware/pi_server.py): `hardware/pi_server.py`

### Attendance Rules

- [Attendance Decision](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/attendance.py): `attendance.py`
- [Course Scheduling](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/schedule.py): `schedule.py`

### Attendance Data

- [SQLite Store](https://github.com/f26-csc1323-001/404-team-not-found/blob/main/database.py): `database.py`

### Other components

- **Administrator**

## Connections

- Administrator → Dashboard Interface: uses
- Dashboard Interface → Admin Dashboard: requests (evidence: `dashboard/app.py`)
- Admin Dashboard → SQLite Store: reads and writes (evidence: `dashboard/app.py`)
- Admin Dashboard → Course Scheduling: checks schedule (evidence: `dashboard/app.py`)
- Admin Dashboard → Attendance Reports: serves reports (evidence: `dashboard/app.py`)
- Face Registration → SQLite Store: stores student (evidence: `face_registration.py`)
- Web Face Registration → SQLite Store: checks and stores (evidence: `dashboard/app.py`)
- Course Enrollment → SQLite Store: writes enrollment (evidence: `enroll_student.py`)
- Camera Recognition → Liveness Challenge: checks movement (evidence: `face_recognition.py`)
- Camera Recognition → Stable Check-In: checks stability (evidence: `face_recognition.py`)
- Camera Recognition → SQLite Store: looks up student (evidence: `face_recognition.py`)
- Camera Recognition → Attendance Decision: records check-in (evidence: `face_recognition.py`)
- Camera Recognition → Pi LED Signaling: signals status
- Attendance Decision → Course Scheduling: gets status (evidence: `attendance.py`)
- Attendance Decision → SQLite Store: validates and records (evidence: `attendance.py`)
- Course Scheduling → SQLite Store: reads schedule (evidence: `schedule.py`)
