# uinsight-2026/u-insight architecture

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

- Interactive diagram: https://gitdiagram.com/uinsight-2026/u-insight
- Repository: https://github.com/uinsight-2026/u-insight

## Overview

u-insight is a sparse Spring Boot backend scaffold. The evidenced runtime supports teacher CRUD-style listing/creation and alert-rule creation/retrieval; the tree also marks broader academic and analytics domains, but README and sampled source do not establish their behavior. The dispersion mapper only shapes already-calculated values, and no caller is shown. Thus the graph focuses on implemented paths and leaves uncertain integrations out.

Main entry points: [`backend/src/main/java/gt/edu/uinsight/alertrule/repository/AlertRuleRepository.java`](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/repository/AlertRuleRepository.java) (Alert rule repository), [`backend/src/main/java/gt/edu/uinsight/teacher/repository/TeacherRepository.java`](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/repository/TeacherRepository.java) (Teacher repository), [`backend/src/main/java/gt/edu/uinsight/alertrule/controller/AlertRuleController.java`](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/controller/AlertRuleController.java) (Alert rules API), [`backend/src/main/java/gt/edu/uinsight/teacher/controller/TeacherController.java`](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/controller/TeacherController.java) (Teachers API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP APIs"]
  node_app["Spring application"]
  node_alert_controller["Alert rules API"]
  node_alert_service["Alert rule service"]
  node_teacher_controller["Teachers API"]
end

subgraph group_persistence["Persistence"]
  node_alert_repo["Alert rule repository"]
  node_alert_entity["Alert rule entity<br/>[AlertRule.java]"]
  node_teacher_repo["Teacher repository"]
  node_teacher_entity["Teacher entity<br/>[Teacher.java]"]
  node_database[("JPA database")]
end

subgraph group_analytics["Analytics"]
  node_dispersion_mapper["Dispersion mapper"]
  node_dispersion_response["Dispersion response"]
end

node_client(("API client"))

node_app -->|"bootstraps HTTP"| node_alert_controller
node_app -->|"bootstraps HTTP"| node_teacher_controller
node_client -->|"sends requests"| node_alert_controller
node_client -->|"sends requests"| node_teacher_controller
node_alert_controller -->|"delegates"| node_alert_service
node_alert_service -->|"queries or saves"| node_alert_repo
node_alert_repo -->|"persists entity"| node_database
node_alert_repo -->|"loads or saves"| node_alert_entity
node_teacher_controller -->|"queries or saves"| node_teacher_repo
node_teacher_repo -->|"persists entity"| node_database
node_teacher_repo -->|"loads or saves"| node_teacher_entity
node_dispersion_mapper -->|"constructs"| node_dispersion_response

click node_app "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/UinsightApplication.java"
click node_alert_controller "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/controller/AlertRuleController.java"
click node_alert_service "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/service/AlertRuleService.java"
click node_alert_repo "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/repository/AlertRuleRepository.java"
click node_alert_entity "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/entity/AlertRule.java"
click node_teacher_controller "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/controller/TeacherController.java"
click node_teacher_repo "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/repository/TeacherRepository.java"
click node_teacher_entity "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/model/Teacher.java"
click node_dispersion_mapper "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/analytics/dispersion/mapper/DispersionMapper.java"
click node_dispersion_response "https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/analytics/dispersion/dto/response/DispersionResponse.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_app,node_alert_controller,node_alert_service,node_teacher_controller,node_client toneBlue
class node_alert_repo,node_alert_entity,node_teacher_repo,node_teacher_entity,node_database toneAmber
class node_dispersion_mapper,node_dispersion_response toneMint
```

## Components

### HTTP APIs

- [Spring application](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/UinsightApplication.java): `backend/src/main/java/gt/edu/uinsight/UinsightApplication.java`
- [Alert rules API](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/controller/AlertRuleController.java): `backend/src/main/java/gt/edu/uinsight/alertrule/controller/AlertRuleController.java`
- [Alert rule service](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/service/AlertRuleService.java): `backend/src/main/java/gt/edu/uinsight/alertrule/service/AlertRuleService.java`
- [Teachers API](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/controller/TeacherController.java): `backend/src/main/java/gt/edu/uinsight/teacher/controller/TeacherController.java`

### Persistence

- [Alert rule repository](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/repository/AlertRuleRepository.java): `backend/src/main/java/gt/edu/uinsight/alertrule/repository/AlertRuleRepository.java`
- [Alert rule entity](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/alertrule/entity/AlertRule.java): `backend/src/main/java/gt/edu/uinsight/alertrule/entity/AlertRule.java`
- [Teacher repository](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/repository/TeacherRepository.java): `backend/src/main/java/gt/edu/uinsight/teacher/repository/TeacherRepository.java`
- [Teacher entity](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/teacher/model/Teacher.java): `backend/src/main/java/gt/edu/uinsight/teacher/model/Teacher.java`
- **JPA database**

### Analytics

- [Dispersion mapper](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/analytics/dispersion/mapper/DispersionMapper.java): `backend/src/main/java/gt/edu/uinsight/analytics/dispersion/mapper/DispersionMapper.java`
- [Dispersion response](https://github.com/uinsight-2026/u-insight/blob/main/backend/src/main/java/gt/edu/uinsight/analytics/dispersion/dto/response/DispersionResponse.java): `backend/src/main/java/gt/edu/uinsight/analytics/dispersion/dto/response/DispersionResponse.java`

### Other components

- **API client**

## Connections

- Spring application → Alert rules API: bootstraps HTTP
- Spring application → Teachers API: bootstraps HTTP
- API client → Alert rules API: sends requests
- API client → Teachers API: sends requests
- Alert rules API → Alert rule service: delegates
- Alert rule service → Alert rule repository: queries or saves
- Alert rule repository → JPA database: persists entity
- Alert rule repository → Alert rule entity: loads or saves
- Teachers API → Teacher repository: queries or saves
- Teacher repository → JPA database: persists entity
- Teacher repository → Teacher entity: loads or saves
- Dispersion mapper → Dispersion response: constructs
