# harualex/graduationsoa architecture

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

- Interactive diagram: https://gitdiagram.com/harualex/graduationsoa
- Repository: https://github.com/harualex/graduationsoa

## Overview

This repository implements a graduation-thesis registration system as three Play services: student management, thesis management, and registration. The main workflow is a registration API request that validates student and thesis existence, checks duplicate and capacity constraints, then stores the registration. Student and thesis APIs also provide their own CRUD operations. Repository excerpts show the application layers and SQL access; the registration clients’ HTTP behavior and route wiring were not excerpted, so those links are marked unverified where appropriate.

Main entry points: [`registrationservice/app/services/RegistrationService.java`](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/services/RegistrationService.java) (Registration workflow), [`studentservice/app/controllers/StudentController.java`](https://github.com/harualex/graduationsoa/blob/master/studentservice/app/controllers/StudentController.java) (Student API), [`thesisservice/app/controllers/ThesisController.java`](https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/controllers/ThesisController.java) (Thesis API), [`registrationservice/app/controllers/RegistrationController.java`](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/controllers/RegistrationController.java) (Registration API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_registration["Registration service"]
  node_registration_controller["Registration API"]
  node_registration_service["Registration workflow"]
  node_student_client["Student client<br/>[StudentClient.java]"]
  node_thesis_client["Thesis client<br/>[ThesisClient.java]"]
  node_registration_repository["Registration data access"]
  node_registration_model["Registration record<br/>[Registration.java]"]
end

subgraph group_students["Student service"]
  node_student_controller["Student API"]
  node_student_service["Student operations"]
  node_student_repository["Student data access"]
  node_student_model["Student record<br/>[Student.java]"]
end

subgraph group_theses["Thesis service"]
  node_thesis_controller["Thesis API"]
  node_thesis_service["Thesis operations<br/>[ThesisService.java]"]
  node_thesis_repository["Thesis data access"]
  node_thesis_model["Thesis record<br/>[Thesis.java]"]
end

subgraph group_infrastructure["Shared infrastructure"]
  node_sql_server[("SQL Server")]
end

node_api_caller(("API caller"))
node_student_api{{"Student service API"}}
node_thesis_api{{"Thesis service API"}}

node_api_caller -.->|"submits requests"| node_registration_controller
node_api_caller -.->|"submits requests"| node_student_controller
node_api_caller -.->|"submits requests"| node_thesis_controller
node_registration_controller -->|"delegates"| node_registration_service
node_registration_service -->|"checks student"| node_student_client
node_registration_service -->|"checks thesis"| node_thesis_client
node_registration_service -->|"reads and writes"| node_registration_repository
node_registration_service -->|"returns records"| node_registration_model
node_student_client -.->|"queries remotely"| node_student_api
node_thesis_client -.->|"queries remotely"| node_thesis_api
node_student_api -.->|"routes to"| node_student_controller
node_thesis_api -.->|"routes to"| node_thesis_controller
node_student_controller -->|"delegates"| node_student_service
node_student_service -->|"reads and writes"| node_student_repository
node_student_controller -->|"converts JSON"| node_student_model
node_thesis_controller -->|"delegates"| node_thesis_service
node_thesis_service -->|"reads and writes"| node_thesis_repository
node_thesis_controller -->|"builds and serializes"| node_thesis_model
node_registration_repository -->|"queries DANGKY"| node_sql_server
node_student_repository -->|"queries SINHVIEN"| node_sql_server
node_thesis_repository -->|"queries DETAI"| node_sql_server

click node_registration_controller "https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/controllers/RegistrationController.java"
click node_registration_service "https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/services/RegistrationService.java"
click node_student_client "https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/clients/StudentClient.java"
click node_thesis_client "https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/clients/ThesisClient.java"
click node_registration_repository "https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/repositories/RegistrationRepository.java"
click node_registration_model "https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/models/Registration.java"
click node_student_controller "https://github.com/harualex/graduationsoa/blob/master/studentservice/app/controllers/StudentController.java"
click node_student_service "https://github.com/harualex/graduationsoa/blob/master/studentservice/app/services/StudentService.java"
click node_student_repository "https://github.com/harualex/graduationsoa/blob/master/studentservice/app/repositories/StudentRepository.java"
click node_student_model "https://github.com/harualex/graduationsoa/blob/master/studentservice/app/models/Student.java"
click node_thesis_controller "https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/controllers/ThesisController.java"
click node_thesis_service "https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/services/ThesisService.java"
click node_thesis_repository "https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/repositories/ThesisRepository.java"
click node_thesis_model "https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/models/Thesis.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_registration_controller,node_registration_service,node_student_client,node_thesis_client,node_registration_repository,node_registration_model toneBlue
class node_student_controller,node_student_service,node_student_repository,node_student_model toneAmber
class node_thesis_controller,node_thesis_service,node_thesis_repository,node_thesis_model,node_api_caller,node_student_api,node_thesis_api toneMint
class node_sql_server toneRose
```

## Components

### Registration service

- [Registration API](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/controllers/RegistrationController.java): `registrationservice/app/controllers/RegistrationController.java`
- [Registration workflow](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/services/RegistrationService.java): `registrationservice/app/services/RegistrationService.java`
- [Student client](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/clients/StudentClient.java): `registrationservice/app/clients/StudentClient.java`
- [Thesis client](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/clients/ThesisClient.java): `registrationservice/app/clients/ThesisClient.java`
- [Registration data access](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/repositories/RegistrationRepository.java): `registrationservice/app/repositories/RegistrationRepository.java`
- [Registration record](https://github.com/harualex/graduationsoa/blob/master/registrationservice/app/models/Registration.java): `registrationservice/app/models/Registration.java`

### Student service

- [Student API](https://github.com/harualex/graduationsoa/blob/master/studentservice/app/controllers/StudentController.java): `studentservice/app/controllers/StudentController.java`
- [Student operations](https://github.com/harualex/graduationsoa/blob/master/studentservice/app/services/StudentService.java): `studentservice/app/services/StudentService.java`
- [Student data access](https://github.com/harualex/graduationsoa/blob/master/studentservice/app/repositories/StudentRepository.java): `studentservice/app/repositories/StudentRepository.java`
- [Student record](https://github.com/harualex/graduationsoa/blob/master/studentservice/app/models/Student.java): `studentservice/app/models/Student.java`

### Thesis service

- [Thesis API](https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/controllers/ThesisController.java): `thesisservice/app/controllers/ThesisController.java`
- [Thesis operations](https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/services/ThesisService.java): `thesisservice/app/services/ThesisService.java`
- [Thesis data access](https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/repositories/ThesisRepository.java): `thesisservice/app/repositories/ThesisRepository.java`
- [Thesis record](https://github.com/harualex/graduationsoa/blob/master/thesisservice/app/models/Thesis.java): `thesisservice/app/models/Thesis.java`

### Shared infrastructure

- **SQL Server**

### Other components

- **API caller**
- **Student service API**
- **Thesis service API**

## Connections

- API caller → Registration API: submits requests
- API caller → Student API: submits requests
- API caller → Thesis API: submits requests
- Registration API → Registration workflow: delegates (evidence: `registrationservice/app/controllers/RegistrationController.java`)
- Registration workflow → Student client: checks student (evidence: `registrationservice/app/services/RegistrationService.java`)
- Registration workflow → Thesis client: checks thesis (evidence: `registrationservice/app/services/RegistrationService.java`)
- Registration workflow → Registration data access: reads and writes (evidence: `registrationservice/app/services/RegistrationService.java`)
- Registration workflow → Registration record: returns records (evidence: `registrationservice/app/services/RegistrationService.java`)
- Student client → Student service API: queries remotely
- Thesis client → Thesis service API: queries remotely
- Student service API → Student API: routes to
- Thesis service API → Thesis API: routes to
- Student API → Student operations: delegates (evidence: `studentservice/app/controllers/StudentController.java`)
- Student operations → Student data access: reads and writes (evidence: `studentservice/app/services/StudentService.java`)
- Student API → Student record: converts JSON (evidence: `studentservice/app/controllers/StudentController.java`)
- Thesis API → Thesis operations: delegates (evidence: `thesisservice/app/controllers/ThesisController.java`)
- Thesis operations → Thesis data access: reads and writes (evidence: `thesisservice/app/services/ThesisService.java`)
- Thesis API → Thesis record: builds and serializes (evidence: `thesisservice/app/controllers/ThesisController.java`)
- Registration data access → SQL Server: queries DANGKY (evidence: `registrationservice/app/repositories/RegistrationRepository.java`)
- Student data access → SQL Server: queries SINHVIEN (evidence: `studentservice/app/repositories/StudentRepository.java`)
- Thesis data access → SQL Server: queries DETAI (evidence: `thesisservice/app/repositories/ThesisRepository.java`)
