# thachpham2103/be-app-facial-recognition architecture

> Architecture diagram of the GitHub repository thachpham2103/be-app-facial-recognition, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thachpham2103/be-app-facial-recognition
- Repository: https://github.com/thachpham2103/be-app-facial-recognition

## Overview

This repository is presented as the backend for a Smart Student Attendance System and LMS. The documented user workflow is a student check-in validated by face recognition and GPS, then recorded with an attendance status; lecturers also manage sessions and review appeals. The tree shows Java web, user, and domain code, but no source excerpts were supplied, so detailed call paths and several README-described capabilities cannot be verified. Those capabilities are represented as documented product areas, not asserted implementations.

Main entry points: [`src/main/java/com/example/be/web/controller/UserController.java`](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/controller/UserController.java) (REST API), [`src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java`](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java) (Attendance Records), [`src/main/java/com/example/be/web/doman/entity/AttendanceSession.java`](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceSession.java) (Attendance Sessions), [`src/main/java/com/example/be/web/doman/entity/ClassRoom.java`](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/ClassRoom.java) (Classrooms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Web API"]
  node_rest["REST API"]
  node_user_domain["User Domain<br/>[User.java]"]
end

subgraph group_attendance["Attendance"]
  node_attendance_records[("Attendance Records")]
  node_sessions[("Attendance Sessions")]
  node_classrooms[("Classrooms<br/>[ClassRoom.java]")]
  node_face_data[("Face Data<br/>[FaceData.java]")]
end

subgraph group_learning["Learning Platform"]
  node_registrations[("Class Registration")]
  node_blogs[("Blogs and Posts<br/>[Blog.java]")]
  node_messaging[("Group Messaging<br/>[Message.java]")]
  node_appeals["Attendance Appeals"]
  node_payments["Course Payments"]
  node_reports["Attendance Reports"]
end

subgraph group_integrations["External Services"]
  node_ai_service["Face AI Service"]
  node_gps["GPS Geofencing"]
end

node_students(("Students"))
node_lecturers(("Lecturers"))

node_students -->|"use services"| node_rest
node_lecturers -->|"use services"| node_rest
node_students -->|"verify identity"| node_ai_service
node_students -->|"verify location"| node_gps
node_students -->|"check in"| node_attendance_records
node_lecturers -->|"manage sessions"| node_sessions
node_lecturers -->|"manage classes"| node_classrooms
node_students -->|"view courses"| node_registrations
node_students -->|"read and interact"| node_blogs
node_students -->|"join chats"| node_messaging
node_lecturers -->|"review appeals"| node_appeals
node_lecturers -->|"manage payments"| node_payments
node_lecturers -->|"export reports"| node_reports

click node_rest "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/controller/UserController.java"
click node_user_domain "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/User.java"
click node_attendance_records "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java"
click node_sessions "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceSession.java"
click node_classrooms "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/ClassRoom.java"
click node_face_data "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/FaceData.java"
click node_registrations "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/ClassRegistration.java"
click node_blogs "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/Blog.java"
click node_messaging "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/Message.java"
click node_appeals "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java"
click node_payments "https://github.com/thachpham2103/be-app-facial-recognition/tree/main/src/main/java/com/example/be/web/doman/entity"
click node_reports "https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java"

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_rest,node_user_domain toneBlue
class node_attendance_records,node_sessions,node_classrooms,node_face_data toneAmber
class node_registrations,node_blogs,node_messaging,node_appeals,node_payments,node_reports toneMint
class node_ai_service,node_gps toneRose
class node_students,node_lecturers toneIndigo
```

## Components

### Web API

- [REST API](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/controller/UserController.java): `src/main/java/com/example/be/web/controller/UserController.java`
- [User Domain](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/User.java): `src/main/java/com/example/be/web/doman/entity/User.java`

### Attendance

- [Attendance Records](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java): `src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java`
- [Attendance Sessions](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceSession.java): `src/main/java/com/example/be/web/doman/entity/AttendanceSession.java`
- [Classrooms](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/ClassRoom.java): `src/main/java/com/example/be/web/doman/entity/ClassRoom.java`
- [Face Data](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/FaceData.java): `src/main/java/com/example/be/web/doman/entity/FaceData.java`

### Learning Platform

- [Class Registration](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/ClassRegistration.java): `src/main/java/com/example/be/web/doman/entity/ClassRegistration.java`
- [Blogs and Posts](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/Blog.java): `src/main/java/com/example/be/web/doman/entity/Blog.java`
- [Group Messaging](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/Message.java): `src/main/java/com/example/be/web/doman/entity/Message.java`
- [Attendance Appeals](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java): `src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java`
- [Course Payments](https://github.com/thachpham2103/be-app-facial-recognition/tree/main/src/main/java/com/example/be/web/doman/entity): `src/main/java/com/example/be/web/doman/entity`
- [Attendance Reports](https://github.com/thachpham2103/be-app-facial-recognition/blob/main/src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java): `src/main/java/com/example/be/web/doman/entity/AttendanceRecord.java`

### External Services

- **Face AI Service**
- **GPS Geofencing**

### Other components

- **Students**
- **Lecturers**

## Connections

- Students → REST API: use services (evidence: `README.md`)
- Lecturers → REST API: use services (evidence: `README.md`)
- Students → Face AI Service: verify identity (evidence: `README.md`)
- Students → GPS Geofencing: verify location (evidence: `README.md`)
- Students → Attendance Records: check in (evidence: `README.md`)
- Lecturers → Attendance Sessions: manage sessions (evidence: `README.md`)
- Lecturers → Classrooms: manage classes (evidence: `README.md`)
- Students → Class Registration: view courses (evidence: `README.md`)
- Students → Blogs and Posts: read and interact (evidence: `README.md`)
- Students → Group Messaging: join chats (evidence: `README.md`)
- Lecturers → Attendance Appeals: review appeals (evidence: `README.md`)
- Lecturers → Course Payments: manage payments (evidence: `README.md`)
- Lecturers → Attendance Reports: export reports (evidence: `README.md`)
