# jayden-dollaga/digital-student-identification-system architecture

> Architecture diagram of the GitHub repository jayden-dollaga/digital-student-identification-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jayden-dollaga/digital-student-identification-system
- Repository: https://github.com/jayden-dollaga/digital-student-identification-system

## Overview

DSIS is a local-first student identification and attendance desktop application. Staff use its HTML/pywebview interface to manage students, attendance, reports, settings, and device workflows; the application bridges those requests to shared Python logic and an ESP32 over USB serial, with SQLite storing local records. The graph reflects the maintained v3 paths and documented capabilities. The large API, UI bridge, and several feature modules were not sampled, so uncertain internal connections are omitted or shown as unverified.

Main entry points: [`python/gui_web/api.py`](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/api.py) (Python API), [`python/core/attendance.py`](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/attendance.py) (Attendance processing), [`python/core/serial_handler.py`](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/serial_handler.py) (Serial connection), [`python/gui_web/web/app.js`](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/web/app.js) (Web interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_webui["Web interface<br/>[app.js]"]
  node_webhost["WebView host<br/>[main_web.py]"]
  node_bridge["Python API<br/>[api.py]"]
end

subgraph group_workflows["School workflows"]
  node_students["Student records<br/>[database.py]"]
  node_attendance["Attendance processing<br/>[attendance.py]"]
  node_calendar["Attendance calendar"]
  node_status["Attendance categories"]
  node_reports["Reports and exports<br/>[api.py]"]
end

subgraph group_device["Device operations"]
  node_serial["Serial connection<br/>[serial_handler.py]"]
  node_discovery["Device discovery"]
  node_commands["Device commands<br/>[commands.py]"]
  node_firmware["ESP32 firmware"]
  node_rfid["RFID card logic<br/>[rfid_card.py]"]
end

subgraph group_platform["Shared platform"]
  node_auth["Authentication<br/>[auth.py]"]
  node_permissions["Role permissions<br/>[permissions.py]"]
  node_settings["Settings and setup<br/>[settings_store.py]"]
  node_database[("SQLite records<br/>[database.py]")]
  node_logging["Runtime logging<br/>[logger.py]"]
end

node_staff(("Student / Staff"))

node_staff -->|"uses"| node_webui
node_webui -->|"calls API"| node_bridge
node_webhost -->|"hosts"| node_webui
node_webhost -.->|"exposes bridge"| node_bridge
node_bridge -.->|"manages records"| node_students
node_bridge -.->|"processes scans"| node_attendance
node_bridge -.->|"serves reports"| node_reports
node_bridge -.->|"checks identity"| node_auth
node_bridge -.->|"checks access"| node_permissions
node_bridge -.->|"reads settings"| node_settings
node_attendance -->|"reads records"| node_database
node_students -->|"persists records"| node_database
node_reports -.->|"reads history"| node_database
node_attendance -.->|"evaluates windows"| node_calendar
node_attendance -.->|"categorizes rates"| node_status
node_bridge -.->|"connects device"| node_serial
node_serial -->|"discovers ports"| node_discovery
node_bridge -.->|"dispatches actions"| node_commands
node_commands -->|"sends commands"| node_serial
node_serial -->|"USB serial"| node_firmware
node_attendance -->|"decodes cards"| node_rfid
node_serial -->|"logs events"| node_logging

click node_webui "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/web/app.js"
click node_webhost "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/main_web.py"
click node_bridge "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/api.py"
click node_students "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/database.py"
click node_attendance "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/attendance.py"
click node_calendar "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/attendance_calendar.py"
click node_status "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/attendance_status.py"
click node_reports "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/api.py"
click node_auth "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/auth.py"
click node_permissions "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/permissions.py"
click node_settings "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/settings_store.py"
click node_database "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/database.py"
click node_serial "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/serial_handler.py"
click node_discovery "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/device_discovery.py"
click node_commands "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/commands.py"
click node_firmware "https://github.com/jayden-dollaga/digital-student-identification-system/tree/main/firmware/ESP32_DSIS_AllInOne/src"
click node_rfid "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/rfid_card.py"
click node_logging "https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/logger.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_webui,node_webhost,node_bridge toneBlue
class node_students,node_attendance,node_calendar,node_status,node_reports toneAmber
class node_serial,node_discovery,node_commands,node_firmware,node_rfid toneMint
class node_auth,node_permissions,node_settings,node_database,node_logging toneRose
class node_staff toneIndigo
```

## Components

### Desktop interface

- [Web interface](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/web/app.js): `python/gui_web/web/app.js`
- [WebView host](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/main_web.py): `python/gui_web/main_web.py`
- [Python API](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/api.py): `python/gui_web/api.py`

### School workflows

- [Student records](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/database.py): `python/core/database.py`
- [Attendance processing](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/attendance.py): `python/core/attendance.py`
- [Attendance calendar](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/attendance_calendar.py): `python/core/attendance_calendar.py`
- [Attendance categories](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/attendance_status.py): `python/core/attendance_status.py`
- [Reports and exports](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/gui_web/api.py): `python/gui_web/api.py`

### Device operations

- [Serial connection](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/serial_handler.py): `python/core/serial_handler.py`
- [Device discovery](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/device_discovery.py): `python/core/device_discovery.py`
- [Device commands](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/commands.py): `python/core/commands.py`
- [ESP32 firmware](https://github.com/jayden-dollaga/digital-student-identification-system/tree/main/firmware/ESP32_DSIS_AllInOne/src): `firmware/ESP32_DSIS_AllInOne/src`
- [RFID card logic](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/rfid_card.py): `python/core/rfid_card.py`

### Shared platform

- [Authentication](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/auth.py): `python/core/auth.py`
- [Role permissions](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/permissions.py): `python/core/permissions.py`
- [Settings and setup](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/settings_store.py): `python/settings_store.py`
- [SQLite records](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/database.py): `python/core/database.py`
- [Runtime logging](https://github.com/jayden-dollaga/digital-student-identification-system/blob/main/python/core/logger.py): `python/core/logger.py`

### Other components

- **Student / Staff**

## Connections

- Student / Staff → Web interface: uses (evidence: `README.md`)
- Web interface → Python API: calls API (evidence: `README.md`)
- WebView host → Web interface: hosts (evidence: `README.md`)
- WebView host → Python API: exposes bridge
- Python API → Student records: manages records
- Python API → Attendance processing: processes scans
- Python API → Reports and exports: serves reports
- Python API → Authentication: checks identity
- Python API → Role permissions: checks access
- Python API → Settings and setup: reads settings
- Attendance processing → SQLite records: reads records (evidence: `python/core/attendance.py`)
- Student records → SQLite records: persists records (evidence: `README.md`)
- Reports and exports → SQLite records: reads history
- Attendance processing → Attendance calendar: evaluates windows
- Attendance processing → Attendance categories: categorizes rates
- Python API → Serial connection: connects device
- Serial connection → Device discovery: discovers ports (evidence: `python/core/serial_handler.py`)
- Python API → Device commands: dispatches actions
- Device commands → Serial connection: sends commands (evidence: `python/core/commands.py`)
- Serial connection → ESP32 firmware: USB serial (evidence: `README.md`)
- Attendance processing → RFID card logic: decodes cards (evidence: `python/core/attendance.py`)
- Serial connection → Runtime logging: logs events (evidence: `python/core/serial_handler.py`)
