# hlawutelo-mabasas/student-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/hlawutelo-mabasas/student-management-system
- Repository: https://github.com/hlawutelo-mabasas/student-management-system

## Overview

This is a Spring Boot student-management web app. A user submits a student operation through the MVC controller; the service validates and transforms the request, then uses the repository to read or persist Student records in MySQL. The controller returns list or edit views, while exception handling provides an error view. The README documents add, list, edit, delete, and generated student numbers. Templates and application configuration are represented from the tree and README; their source contents were not sampled, so their detailed wiring is not asserted.

Main entry points: [`src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java`](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java) (Student controller), [`src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java`](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java) (Student repository), [`src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java`](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java) (Student service), [`src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java`](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java) (Sample data initializer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_controller["Student controller"]
  node_students_view["Student list view<br/>[students.html]"]
  node_edit_view["Edit student view<br/>[edit-student.html]"]
  node_error_view["Error view<br/>[error.html]"]
  node_webconfig["Web routing config<br/>[WebConfig.java]"]
  node_browser_script["Delete confirmation<br/>[script.js]"]
  node_styles["Page styling<br/>[styles.css]"]
  node_exception_handler["Exception handler"]
end

subgraph group_domain["Student domain"]
  node_service["Student service"]
  node_student["Student entity<br/>[Student.java]"]
  node_dto["Student DTO<br/>[StudentDTO.java]"]
  node_not_found["Not-found exception"]
end

subgraph group_persistence["Persistence"]
  node_repository["Student repository"]
  node_mysql[("MySQL database")]
end

subgraph group_appconfig["Application setup"]
  node_db_config["Database settings"]
  node_initializer["Sample data initializer"]
  node_application["Application entry point"]
end

node_user(("User"))

node_user -->|"uses CRUD"| node_controller
node_controller -->|"delegates operations"| node_service
node_controller -->|"returns list view"| node_students_view
node_controller -->|"returns edit view"| node_edit_view
node_service -->|"reads and writes"| node_repository
node_repository -->|"persists entity"| node_student
node_service -->|"throws when missing"| node_not_found
node_exception_handler -->|"returns error view"| node_error_view
node_repository -->|"stores records"| node_mysql
node_db_config -->|"configures connection"| node_mysql
node_initializer -->|"seeds a record"| node_repository
node_application -.->|"starts component"| node_initializer
node_webconfig -->|"redirects to root"| node_controller
node_browser_script -.->|"confirms deletion"| node_students_view

click node_controller "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java"
click node_students_view "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/templates/students.html"
click node_edit_view "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/templates/edit-student.html"
click node_error_view "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/templates/error.html"
click node_webconfig "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/config/WebConfig.java"
click node_browser_script "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/static/js/script.js"
click node_styles "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/static/css/styles.css"
click node_service "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java"
click node_student "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/model/Student.java"
click node_dto "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/dto/StudentDTO.java"
click node_not_found "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/exception/ResourceNotFoundException.java"
click node_exception_handler "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/exception/GlobalExceptionHandler.java"
click node_repository "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java"
click node_db_config "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/application.properties"
click node_initializer "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java"
click node_application "https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/StudentManagementApplication.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_controller,node_students_view,node_edit_view,node_error_view,node_webconfig,node_browser_script,node_styles,node_exception_handler,node_user toneBlue
class node_service,node_student,node_dto,node_not_found toneAmber
class node_repository,node_mysql toneMint
class node_db_config,node_initializer,node_application toneRose
```

## Components

### Web interface

- [Student controller](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java): `src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java`
- [Student list view](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/templates/students.html): `src/main/resources/templates/students.html`
- [Edit student view](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/templates/edit-student.html): `src/main/resources/templates/edit-student.html`
- [Error view](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/templates/error.html): `src/main/resources/templates/error.html`
- [Web routing config](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/config/WebConfig.java): `src/main/java/com/hlawutelo/studentmanagement/config/WebConfig.java`
- [Delete confirmation](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/static/js/script.js): `src/main/resources/static/js/script.js`
- [Page styling](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/static/css/styles.css): `src/main/resources/static/css/styles.css`
- [Exception handler](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/exception/GlobalExceptionHandler.java): `src/main/java/com/hlawutelo/studentmanagement/exception/GlobalExceptionHandler.java`

### Student domain

- [Student service](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java): `src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java`
- [Student entity](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/model/Student.java): `src/main/java/com/hlawutelo/studentmanagement/model/Student.java`
- [Student DTO](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/dto/StudentDTO.java): `src/main/java/com/hlawutelo/studentmanagement/dto/StudentDTO.java`
- [Not-found exception](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/exception/ResourceNotFoundException.java): `src/main/java/com/hlawutelo/studentmanagement/exception/ResourceNotFoundException.java`

### Persistence

- [Student repository](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java): `src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java`
- **MySQL database**

### Application setup

- [Database settings](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/resources/application.properties): `src/main/resources/application.properties`
- [Sample data initializer](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java): `src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java`
- [Application entry point](https://github.com/hlawutelo-mabasas/student-management-system/blob/main/src/main/java/com/hlawutelo/studentmanagement/StudentManagementApplication.java): `src/main/java/com/hlawutelo/studentmanagement/StudentManagementApplication.java`

### Other components

- **User**

## Connections

- User → Student controller: uses CRUD (evidence: `README.md`)
- Student controller → Student service: delegates operations (evidence: `src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java`)
- Student controller → Student list view: returns list view (evidence: `src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java`)
- Student controller → Edit student view: returns edit view (evidence: `src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java`)
- Student service → Student repository: reads and writes (evidence: `src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java`)
- Student repository → Student entity: persists entity (evidence: `src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java`)
- Student service → Not-found exception: throws when missing (evidence: `src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java`)
- Exception handler → Error view: returns error view (evidence: `src/main/java/com/hlawutelo/studentmanagement/exception/GlobalExceptionHandler.java`)
- Student repository → MySQL database: stores records (evidence: `README.md`)
- Database settings → MySQL database: configures connection (evidence: `README.md`)
- Sample data initializer → Student repository: seeds a record (evidence: `src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java`)
- Application entry point → Sample data initializer: starts component
- Web routing config → Student controller: redirects to root (evidence: `src/main/java/com/hlawutelo/studentmanagement/config/WebConfig.java`)
- Delete confirmation → Student list view: confirms deletion
