# joycelyn-0709/student-attendance-system architecture

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

- Interactive diagram: https://gitdiagram.com/joycelyn-0709/student-attendance-system
- Repository: https://github.com/joycelyn-0709/student-attendance-system

## Overview

This is a small Flask application for recording and reviewing student attendance. A user can add students, mark attendance for a selected student, and view recorded attendance; the app stores student and attendance records in SQLite. The main runtime logic is concentrated in app.py, which also creates the tables and opens database connections. The README documents the capabilities and SQLite use; template relationships and database operations are visible in the app.py excerpt. Template contents were not sampled, so their internal navigation is not mapped.

Main entry points: [`app.py`](https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py) (Database connection), [`attendance.db`](https://github.com/joycelyn-0709/student-attendance-system/blob/main/attendance.db) (Attendance database), [`templates/index.html`](https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/index.html) (Home page), [`templates/add_student.html`](https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/add_student.html) (Add student page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web pages"]
  node_home["Home page<br/>[index.html]"]
  node_add_page["Add student page<br/>[add_student.html]"]
  node_mark_page["Mark attendance page"]
  node_view_page["Attendance results page"]
end

subgraph group_attendance["Attendance workflows"]
  node_home_route["Home route<br/>[app.py]"]
  node_add_student["Add student<br/>[app.py]"]
  node_mark_attendance["Mark attendance<br/>[app.py]"]
  node_view_attendance["View attendance<br/>[app.py]"]
end

subgraph group_storage["SQLite storage"]
  node_db_connection["Database connection<br/>[app.py]"]
  node_table_setup["Table setup<br/>[app.py]"]
  node_attendance_db[("Attendance database<br/>[attendance.db]")]
end

node_user(("User"))

node_user -->|"opens app"| node_home_route
node_user -->|"adds student"| node_add_student
node_user -->|"marks attendance"| node_mark_attendance
node_user -->|"views records"| node_view_attendance
node_home_route -->|"renders"| node_home
node_add_student -->|"renders"| node_add_page
node_mark_attendance -->|"renders"| node_mark_page
node_view_attendance -->|"renders"| node_view_page
node_add_student -->|"opens connection"| node_db_connection
node_mark_attendance -->|"opens connection"| node_db_connection
node_view_attendance -->|"opens connection"| node_db_connection
node_table_setup -->|"uses"| node_db_connection
node_db_connection -->|"connects to"| node_attendance_db
node_table_setup -->|"creates tables"| node_attendance_db
node_add_student -->|"writes student"| node_attendance_db
node_mark_attendance -->|"reads students, writes attendance"| node_attendance_db
node_view_attendance -->|"reads joined records"| node_attendance_db

click node_home "https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/index.html"
click node_add_page "https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/add_student.html"
click node_mark_page "https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/mark_attendance.html"
click node_view_page "https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/view_attendance.html"
click node_home_route "https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py"
click node_add_student "https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py"
click node_mark_attendance "https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py"
click node_view_attendance "https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py"
click node_db_connection "https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py"
click node_table_setup "https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py"
click node_attendance_db "https://github.com/joycelyn-0709/student-attendance-system/blob/main/attendance.db"

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_home,node_add_page,node_mark_page,node_view_page,node_user toneBlue
class node_home_route,node_add_student,node_mark_attendance,node_view_attendance toneAmber
class node_db_connection,node_table_setup,node_attendance_db toneMint
```

## Components

### Web pages

- [Home page](https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/index.html): `templates/index.html`
- [Add student page](https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/add_student.html): `templates/add_student.html`
- [Mark attendance page](https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/mark_attendance.html): `templates/mark_attendance.html`
- [Attendance results page](https://github.com/joycelyn-0709/student-attendance-system/blob/main/templates/view_attendance.html): `templates/view_attendance.html`

### Attendance workflows

- [Home route](https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py): `app.py`
- [Add student](https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py): `app.py`
- [Mark attendance](https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py): `app.py`
- [View attendance](https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py): `app.py`

### SQLite storage

- [Database connection](https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py): `app.py`
- [Table setup](https://github.com/joycelyn-0709/student-attendance-system/blob/main/app.py): `app.py`
- [Attendance database](https://github.com/joycelyn-0709/student-attendance-system/blob/main/attendance.db): `attendance.db`

### Other components

- **User**

## Connections

- User → Home route: opens app (evidence: `README.md`)
- User → Add student: adds student (evidence: `README.md`)
- User → Mark attendance: marks attendance (evidence: `README.md`)
- User → View attendance: views records (evidence: `README.md`)
- Home route → Home page: renders (evidence: `app.py`)
- Add student → Add student page: renders (evidence: `app.py`)
- Mark attendance → Mark attendance page: renders (evidence: `app.py`)
- View attendance → Attendance results page: renders (evidence: `app.py`)
- Add student → Database connection: opens connection (evidence: `app.py`)
- Mark attendance → Database connection: opens connection (evidence: `app.py`)
- View attendance → Database connection: opens connection (evidence: `app.py`)
- Table setup → Database connection: uses (evidence: `app.py`)
- Database connection → Attendance database: connects to (evidence: `app.py`)
- Table setup → Attendance database: creates tables (evidence: `app.py`)
- Add student → Attendance database: writes student (evidence: `app.py`)
- Mark attendance → Attendance database: reads students, writes attendance (evidence: `app.py`)
- View attendance → Attendance database: reads joined records (evidence: `app.py`)
