# andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012 architecture

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

- Interactive diagram: https://gitdiagram.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012
- Repository: https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012

## Overview

This is a JavaFX desktop attendance system for students, teachers, and administrators. Its documented workflow begins at application startup and login, loads the user, then routes by role to attendance, course/lesson, or administration screens backed by database access. The README describes the MVC/DAO layers and the major role capabilities, but no source excerpts were provided; edges therefore reflect documented relationships rather than inspected call sites.

Main entry points: [`Classroom_Attendance_System/src/main/java/com/example/app/Controller/TeacherController.java`](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/TeacherController.java) (Teacher actions), [`Classroom_Attendance_System/src/main/java/com/example/app/Database/DatabaseConnection.java`](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Database/DatabaseConnection.java) (JDBC connection), [`Classroom_Attendance_System/src/main/java/com/example/app/Controller/LoginController.java`](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/LoginController.java) (Login routing), [`Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java`](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java) (Student actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and login"]
  node_main["Main<br/>[Main.java]"]
  node_app["JavaFX app<br/>[App.java]"]
  node_loginview["Login screen<br/>[Login.java]"]
  node_logincontroller["Login routing"]
  node_rolemodel["User and role<br/>[User.java]"]
end

subgraph group_student["Student attendance"]
  node_studentcontroller["Student actions"]
  node_studenthome["Student home"]
  node_studentattendance["Attendance history"]
  node_coursecontroller["Course access"]
end

subgraph group_teaching["Teacher operations"]
  node_teachercontroller["Teacher actions"]
  node_teacherhome["Teacher home"]
  node_teachercourses["Course management"]
  node_teacherattendance["Attendance review"]
  node_profile["Profile editing"]
end

subgraph group_admin["Administration"]
  node_admincontroller["Admin actions"]
  node_adminview["Admin interface<br/>[Admin.java]"]
end

subgraph group_data["Persistence"]
  node_userdao["User lookup<br/>[UserDao.java]"]
  node_attendancedao["Attendance records<br/>[AttendanceDao.java]"]
  node_coursedao["Course data<br/>[CourseDao.java]"]
  node_lessondao["Lesson data<br/>[LessonDao.java]"]
  node_teacherdao["Teacher data<br/>[TeacherDao.java]"]
  node_admindao["User administration<br/>[AdminDao.java]"]
  node_database["JDBC connection"]
  node_dbconfig["DB configuration"]
end

node_actor(("User"))
node_db[("MariaDB")]

node_actor -->|"enters credentials"| node_loginview
node_main -->|"launches"| node_app
node_loginview -->|"submits login"| node_logincontroller
node_logincontroller -->|"loads user"| node_userdao
node_logincontroller -->|"checks role"| node_rolemodel
node_logincontroller -->|"routes student"| node_studenthome
node_logincontroller -->|"routes teacher"| node_teacherhome
node_logincontroller -->|"routes admin"| node_adminview
node_studenthome -->|"handles actions"| node_studentcontroller
node_studentcontroller -->|"records attendance"| node_attendancedao
node_studentcontroller -->|"loads courses"| node_coursedao
node_studentattendance -->|"reviews history"| node_studentcontroller
node_teacherhome -->|"handles actions"| node_teachercontroller
node_teachercourses -->|"manages courses"| node_teachercontroller
node_teacherattendance -->|"edits attendance"| node_teachercontroller
node_teachercontroller -->|"manages lessons"| node_lessondao
node_teachercontroller -->|"reviews records"| node_attendancedao
node_teachercontroller -->|"manages courses"| node_teacherdao
node_profile -.->|"edits profile"| node_teachercontroller
node_adminview -->|"handles actions"| node_admincontroller
node_admincontroller -->|"manages users"| node_admindao
node_userdao -->|"queries"| node_database
node_attendancedao -->|"reads and writes"| node_database
node_coursedao -->|"reads and writes"| node_database
node_lessondao -->|"reads and writes"| node_database
node_teacherdao -->|"reads and writes"| node_database
node_admindao -->|"reads and writes"| node_database
node_database -->|"configured by"| node_dbconfig

click node_main "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Main.java"
click node_app "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/App.java"
click node_loginview "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/Login.java"
click node_logincontroller "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/LoginController.java"
click node_userdao "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/LoginDao/UserDao.java"
click node_rolemodel "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Model/LoginComponents/User.java"
click node_studentcontroller "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java"
click node_studenthome "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/StudentStartPage.java"
click node_studentattendance "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/StudentAttendanceTracking.java"
click node_attendancedao "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/StudentDao/AttendanceDao.java"
click node_coursecontroller "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java"
click node_coursedao "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/StudentDao/CourseDao.java"
click node_teachercontroller "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/TeacherController.java"
click node_teacherhome "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherStartPage.java"
click node_teachercourses "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherCoursePage.java"
click node_teacherattendance "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherAttendanceTracking.java"
click node_lessondao "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/LessonDao.java"
click node_teacherdao "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/TeacherDao.java"
click node_profile "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/ProfileEditWindow.java"
click node_admincontroller "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/AdminController.java"
click node_adminview "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/Admin.java"
click node_admindao "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/AdminDao.java"
click node_database "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Database/DatabaseConnection.java"
click node_dbconfig "https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/resources/database.properties"

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_main,node_app,node_loginview,node_logincontroller,node_rolemodel,node_actor toneBlue
class node_studentcontroller,node_studenthome,node_studentattendance,node_coursecontroller,node_db toneAmber
class node_teachercontroller,node_teacherhome,node_teachercourses,node_teacherattendance,node_profile toneMint
class node_admincontroller,node_adminview toneRose
class node_userdao,node_attendancedao,node_coursedao,node_lessondao,node_teacherdao,node_admindao,node_database,node_dbconfig toneIndigo
```

## Components

### Startup and login

- [Main](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Main.java): `Classroom_Attendance_System/src/main/java/com/example/app/Main.java`
- [JavaFX app](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/App.java): `Classroom_Attendance_System/src/main/java/com/example/app/App.java`
- [Login screen](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/Login.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/Login.java`
- [Login routing](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/LoginController.java): `Classroom_Attendance_System/src/main/java/com/example/app/Controller/LoginController.java`
- [User and role](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Model/LoginComponents/User.java): `Classroom_Attendance_System/src/main/java/com/example/app/Model/LoginComponents/User.java`

### Student attendance

- [Student actions](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java): `Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java`
- [Student home](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/StudentStartPage.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/StudentStartPage.java`
- [Attendance history](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/StudentAttendanceTracking.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/StudentAttendanceTracking.java`
- [Course access](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java): `Classroom_Attendance_System/src/main/java/com/example/app/Controller/StudentController.java`

### Teacher operations

- [Teacher actions](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/TeacherController.java): `Classroom_Attendance_System/src/main/java/com/example/app/Controller/TeacherController.java`
- [Teacher home](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherStartPage.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherStartPage.java`
- [Course management](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherCoursePage.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherCoursePage.java`
- [Attendance review](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherAttendanceTracking.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/TeacherAttendanceTracking.java`
- [Profile editing](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/ProfileEditWindow.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/ProfileEditWindow.java`

### Administration

- [Admin actions](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Controller/AdminController.java): `Classroom_Attendance_System/src/main/java/com/example/app/Controller/AdminController.java`
- [Admin interface](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/View/Admin.java): `Classroom_Attendance_System/src/main/java/com/example/app/View/Admin.java`

### Persistence

- [User lookup](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/LoginDao/UserDao.java): `Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/LoginDao/UserDao.java`
- [Attendance records](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/StudentDao/AttendanceDao.java): `Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/StudentDao/AttendanceDao.java`
- [Course data](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/StudentDao/CourseDao.java): `Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/StudentDao/CourseDao.java`
- [Lesson data](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/LessonDao.java): `Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/LessonDao.java`
- [Teacher data](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/TeacherDao.java): `Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/TeacherDao.java`
- [User administration](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/AdminDao.java): `Classroom_Attendance_System/src/main/java/com/example/app/DaoElements/AdminDao.java`
- [JDBC connection](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/java/com/example/app/Database/DatabaseConnection.java): `Classroom_Attendance_System/src/main/java/com/example/app/Database/DatabaseConnection.java`
- [DB configuration](https://github.com/andrei1033/-ohjelmistotuotantoprojekti-1-tx00ey27-3012/blob/main/Classroom_Attendance_System/src/main/resources/database.properties): `Classroom_Attendance_System/src/main/resources/database.properties`

### Other components

- **User**
- **MariaDB**

## Connections

- User → Login screen: enters credentials (evidence: `README.md`)
- Main → JavaFX app: launches (evidence: `README.md`)
- Login screen → Login routing: submits login (evidence: `README.md`)
- Login routing → User lookup: loads user (evidence: `README.md`)
- Login routing → User and role: checks role (evidence: `README.md`)
- Login routing → Student home: routes student (evidence: `README.md`)
- Login routing → Teacher home: routes teacher (evidence: `README.md`)
- Login routing → Admin interface: routes admin (evidence: `README.md`)
- Student home → Student actions: handles actions (evidence: `README.md`)
- Student actions → Attendance records: records attendance (evidence: `README.md`)
- Student actions → Course data: loads courses (evidence: `README.md`)
- Attendance history → Student actions: reviews history (evidence: `README.md`)
- Teacher home → Teacher actions: handles actions (evidence: `README.md`)
- Course management → Teacher actions: manages courses (evidence: `README.md`)
- Attendance review → Teacher actions: edits attendance (evidence: `README.md`)
- Teacher actions → Lesson data: manages lessons (evidence: `README.md`)
- Teacher actions → Attendance records: reviews records (evidence: `README.md`)
- Teacher actions → Teacher data: manages courses (evidence: `README.md`)
- Profile editing → Teacher actions: edits profile
- Admin interface → Admin actions: handles actions (evidence: `README.md`)
- Admin actions → User administration: manages users (evidence: `README.md`)
- User lookup → JDBC connection: queries (evidence: `README.md`)
- Attendance records → JDBC connection: reads and writes (evidence: `README.md`)
- Course data → JDBC connection: reads and writes (evidence: `README.md`)
- Lesson data → JDBC connection: reads and writes (evidence: `README.md`)
- Teacher data → JDBC connection: reads and writes (evidence: `README.md`)
- User administration → JDBC connection: reads and writes (evidence: `README.md`)
- JDBC connection → DB configuration: configured by (evidence: `README.md`)
