# chaste-ganza/cheqin architecture

> Architecture diagram of the GitHub repository chaste-ganza/cheqin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chaste-ganza/cheqin
- Repository: https://github.com/chaste-ganza/cheqin

## Overview

This is a small RFID attendance recorder. The operator starts the application; it initializes the attendance CSV, connects to an ESP8266 reader over serial, and dispatches scanned UIDs for student lookup and attendance recording. Unknown cards are reported but not recorded. The README is empty, so the map reflects only the behavior shown in main.py; the CSV is the persistent record.

Main entry points: [`main.py`](https://github.com/chaste-ganza/cheqin/blob/master/main.py) (Attendance app), [`attendance.csv`](https://github.com/chaste-ganza/cheqin/blob/master/attendance.csv) (Attendance CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_operator(("Operator"))
node_app["Attendance app<br/>[main.py]"]
node_reader["ESP8266 reader"]
node_identify["Card identification<br/>[main.py]"]
node_roster["Student roster<br/>[main.py]"]
node_attendance[("Attendance CSV<br/>[attendance.csv]")]

node_operator -->|"starts"| node_app
node_app -->|"creates if absent"| node_attendance
node_app -->|"opens serial; sends ON"| node_reader
node_reader -->|"sends UID lines"| node_app
node_app -->|"dispatches UID"| node_identify
node_identify -->|"checks UID"| node_roster
node_identify -->|"appends scan"| node_attendance

click node_app "https://github.com/chaste-ganza/cheqin/blob/master/main.py"
click node_identify "https://github.com/chaste-ganza/cheqin/blob/master/main.py"
click node_roster "https://github.com/chaste-ganza/cheqin/blob/master/main.py"
click node_attendance "https://github.com/chaste-ganza/cheqin/blob/master/attendance.csv"

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_operator,node_reader toneIndigo
class node_app,node_identify,node_roster toneTeal
class node_attendance toneAmber
```

## Components

### Other components

- **Operator**
- [Attendance app](https://github.com/chaste-ganza/cheqin/blob/master/main.py): `main.py`
- **ESP8266 reader**
- [Card identification](https://github.com/chaste-ganza/cheqin/blob/master/main.py): `main.py`
- [Student roster](https://github.com/chaste-ganza/cheqin/blob/master/main.py): `main.py`
- [Attendance CSV](https://github.com/chaste-ganza/cheqin/blob/master/attendance.csv): `attendance.csv`

## Connections

- Operator → Attendance app: starts (evidence: `main.py`)
- Attendance app → Attendance CSV: creates if absent (evidence: `main.py`)
- Attendance app → ESP8266 reader: opens serial; sends ON (evidence: `main.py`)
- ESP8266 reader → Attendance app: sends UID lines (evidence: `main.py`)
- Attendance app → Card identification: dispatches UID (evidence: `main.py`)
- Card identification → Student roster: checks UID (evidence: `main.py`)
- Card identification → Attendance CSV: appends scan (evidence: `main.py`)
