# quockhanhiuh/project_web_json architecture

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

- Interactive diagram: https://gitdiagram.com/quockhanhiuh/project_web_json
- Repository: https://github.com/quockhanhiuh/project_web_json

## Overview

The repository contains two Spring applications: a student-management interface with faculty-filtered student CRUD, and a dashboard application whose tree indicates authentication and product-management views/API. The student UI’s API requests are directly evidenced by app.js. Controller/service/repository wiring and the dashboard’s detailed behavior were not sampled, and the root README documents no capabilities, so those internal links are left out rather than inferred.

Main entry points: [`studentmanagement/src/main/resources/static/app.js`](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/resources/static/app.js) (Student CRUD UI), [`studentmanagement/src/main/resources/static/index.html`](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/resources/static/index.html) (Student page), [`studentmanagement/src/main/java/com/example/studentmanagement/Controller/KhoaController.java`](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/Controller/KhoaController.java) (Faculty API), [`studentmanagement/src/main/java/com/example/studentmanagement/Controller/StudentController.java`](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/Controller/StudentController.java) (Student API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student_ui["Student interface"]
  node_student_client["Student CRUD UI<br/>[app.js]"]
  node_student_page["Student page<br/>[index.html]"]
end

subgraph group_student_backend["Student backend"]
  node_khoa_controller["Faculty API"]
  node_student_controller["Student API"]
  node_student_service["Student service"]
  node_student_dto["Student DTO<br/>[StudentDto.java]"]
  node_student_repo["Student repository"]
  node_khoa_repo["Faculty repository"]
  node_student_entity[("Student data<br/>[Student.java]")]
  node_khoa_entity[("Faculty data<br/>[Khoa.java]")]
end

subgraph group_dashboard_web["Dashboard web"]
  node_auth_views["Sign-in and signup<br/>[signin.html]"]
  node_dashboard_view["Dashboard view<br/>[dashboard.html]"]
  node_product_views["Product views<br/>[list.html]"]
end

subgraph group_dashboard_backend["Dashboard backend"]
  node_auth_controller["Authentication routes"]
  node_dashboard_controller["Dashboard routes"]
  node_product_view_controller["Product page routes"]
  node_product_api["Product REST API"]
  node_user_service["User service<br/>[UserService.java]"]
  node_product_service["Product service"]
  node_user_repo["User repository"]
  node_product_repo["Product repository"]
  node_user_entity[("User data<br/>[User.java]")]
  node_product_entity[("Product data<br/>[Product.java]")]
end

node_student_user(("User"))
node_dashboard_user(("Dashboard user"))

node_student_user -->|"opens"| node_student_page
node_student_page -->|"loads"| node_student_client
node_student_client -->|"fetches faculties"| node_khoa_controller
node_student_client -->|"fetches and edits"| node_student_controller
node_dashboard_user -->|"opens"| node_auth_views
node_dashboard_user -->|"opens"| node_dashboard_view
node_dashboard_user -->|"opens"| node_product_views

click node_student_client "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/resources/static/app.js"
click node_student_page "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/resources/static/index.html"
click node_khoa_controller "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/Controller/KhoaController.java"
click node_student_controller "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/Controller/StudentController.java"
click node_student_service "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/service/StudentService.java"
click node_student_dto "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/dto/StudentDto.java"
click node_student_repo "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/repository/StudentRepository.java"
click node_khoa_repo "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/repository/KhoaRepository.java"
click node_student_entity "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/entity/Student.java"
click node_khoa_entity "https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/entity/Khoa.java"
click node_auth_views "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/resources/templates/auth/signin.html"
click node_dashboard_view "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/resources/templates/dashboard.html"
click node_product_views "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/resources/templates/products/list.html"
click node_auth_controller "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/AuthController.java"
click node_dashboard_controller "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/DashboardController.java"
click node_product_view_controller "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/ProductViewController.java"
click node_product_api "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/ProductRestController.java"
click node_user_service "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/service/UserService.java"
click node_product_service "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/service/ProductService.java"
click node_user_repo "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/repository/UserRepository.java"
click node_product_repo "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/repository/ProductRepository.java"
click node_user_entity "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/entity/User.java"
click node_product_entity "https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/entity/Product.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_student_client,node_student_page,node_student_user,node_dashboard_user toneBlue
class node_khoa_controller,node_student_controller,node_student_service,node_student_dto,node_student_repo,node_khoa_repo,node_student_entity,node_khoa_entity toneAmber
class node_auth_views,node_dashboard_view,node_product_views toneMint
class node_auth_controller,node_dashboard_controller,node_product_view_controller,node_product_api,node_user_service,node_product_service,node_user_repo,node_product_repo,node_user_entity,node_product_entity toneRose
```

## Components

### Student interface

- [Student CRUD UI](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/resources/static/app.js): `studentmanagement/src/main/resources/static/app.js`
- [Student page](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/resources/static/index.html): `studentmanagement/src/main/resources/static/index.html`

### Student backend

- [Faculty API](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/Controller/KhoaController.java): `studentmanagement/src/main/java/com/example/studentmanagement/Controller/KhoaController.java`
- [Student API](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/Controller/StudentController.java): `studentmanagement/src/main/java/com/example/studentmanagement/Controller/StudentController.java`
- [Student service](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/service/StudentService.java): `studentmanagement/src/main/java/com/example/studentmanagement/service/StudentService.java`
- [Student DTO](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/dto/StudentDto.java): `studentmanagement/src/main/java/com/example/studentmanagement/dto/StudentDto.java`
- [Student repository](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/repository/StudentRepository.java): `studentmanagement/src/main/java/com/example/studentmanagement/repository/StudentRepository.java`
- [Faculty repository](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/repository/KhoaRepository.java): `studentmanagement/src/main/java/com/example/studentmanagement/repository/KhoaRepository.java`
- [Student data](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/entity/Student.java): `studentmanagement/src/main/java/com/example/studentmanagement/entity/Student.java`
- [Faculty data](https://github.com/quockhanhiuh/project_web_json/blob/main/studentmanagement/src/main/java/com/example/studentmanagement/entity/Khoa.java): `studentmanagement/src/main/java/com/example/studentmanagement/entity/Khoa.java`

### Dashboard web

- [Sign-in and signup](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/resources/templates/auth/signin.html): `spring-dashboard/src/main/resources/templates/auth/signin.html`
- [Dashboard view](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/resources/templates/dashboard.html): `spring-dashboard/src/main/resources/templates/dashboard.html`
- [Product views](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/resources/templates/products/list.html): `spring-dashboard/src/main/resources/templates/products/list.html`

### Dashboard backend

- [Authentication routes](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/AuthController.java): `spring-dashboard/src/main/java/com/example/app/controller/AuthController.java`
- [Dashboard routes](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/DashboardController.java): `spring-dashboard/src/main/java/com/example/app/controller/DashboardController.java`
- [Product page routes](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/ProductViewController.java): `spring-dashboard/src/main/java/com/example/app/controller/ProductViewController.java`
- [Product REST API](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/controller/ProductRestController.java): `spring-dashboard/src/main/java/com/example/app/controller/ProductRestController.java`
- [User service](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/service/UserService.java): `spring-dashboard/src/main/java/com/example/app/service/UserService.java`
- [Product service](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/service/ProductService.java): `spring-dashboard/src/main/java/com/example/app/service/ProductService.java`
- [User repository](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/repository/UserRepository.java): `spring-dashboard/src/main/java/com/example/app/repository/UserRepository.java`
- [Product repository](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/repository/ProductRepository.java): `spring-dashboard/src/main/java/com/example/app/repository/ProductRepository.java`
- [User data](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/entity/User.java): `spring-dashboard/src/main/java/com/example/app/entity/User.java`
- [Product data](https://github.com/quockhanhiuh/project_web_json/blob/main/spring-dashboard/src/main/java/com/example/app/entity/Product.java): `spring-dashboard/src/main/java/com/example/app/entity/Product.java`

### Other components

- **User**
- **Dashboard user**

## Connections

- User → Student page: opens
- Student page → Student CRUD UI: loads
- Student CRUD UI → Faculty API: fetches faculties
- Student CRUD UI → Student API: fetches and edits
- Dashboard user → Sign-in and signup: opens
- Dashboard user → Dashboard view: opens
- Dashboard user → Product views: opens
