# lubabanairoukh/course-registration-system architecture

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

- Interactive diagram: https://gitdiagram.com/lubabanairoukh/course-registration-system
- Repository: https://github.com/lubabanairoukh/course-registration-system

## Overview

This is a Spring-based course-registration web application. Students browse courses, inspect details, register, and view their enrolled courses; administrators manage courses and review or remove participants. Controllers coordinate repository access and populate Thymeleaf views, while JPA repositories persist course and student entities. The README documents course editing and participant limits, but the sampled course entity does not show a limit field; database configuration and some view behavior were not inspected, so those details are represented only at the documented level.

Main entry points: [`src/main/java/hac/repository/CourseRepository.java`](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/repository/CourseRepository.java) (Course repository), [`src/main/java/hac/repository/StudentRepository.java`](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/repository/StudentRepository.java) (Student repository), [`src/main/java/hac/controllers/StudentController.java`](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/StudentController.java) (Student workflows), [`src/main/java/hac/controllers/CourseController.java`](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/CourseController.java) (Course administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and security"]
  node_app["Spring application"]
  node_security["Login and access"]
  node_credentials["User credentials<br/>[file.txt]"]
end

subgraph group_student["Student workflows"]
  node_student_ctrl["Student workflows"]
  node_student_views["Student pages"]
end

subgraph group_admin["Course administration"]
  node_course_ctrl["Course administration"]
  node_admin_students["Participant listing"]
  node_admin_views["Admin pages"]
end

subgraph group_persistence["Persistence and views"]
  node_course_entity["Course model<br/>[Course.java]"]
  node_student_entity["Student model<br/>[Student.java]"]
  node_course_repo["Course repository"]
  node_student_repo["Student repository"]
end

node_browser(("Web user"))
node_database[("JPA database")]

node_browser -->|"authenticates"| node_security
node_browser -->|"requests student pages"| node_student_ctrl
node_browser -->|"requests admin actions"| node_course_ctrl
node_app -->|"starts configuration"| node_security
node_security -->|"reads accounts"| node_credentials
node_security -->|"creates students"| node_student_repo
node_student_ctrl -->|"reads and saves courses"| node_course_repo
node_student_ctrl -->|"looks up students"| node_student_repo
node_student_ctrl -->|"selects views"| node_student_views
node_course_ctrl -->|"manages courses"| node_course_repo
node_course_ctrl -->|"lists students"| node_student_repo
node_course_ctrl -->|"selects views"| node_admin_views
node_admin_students -->|"loads course participants"| node_course_repo
node_admin_students -->|"selects view"| node_admin_views
node_course_repo -->|"loads and stores"| node_course_entity
node_student_repo -->|"loads and stores"| node_student_entity
node_course_repo -->|"persists courses"| node_database
node_student_repo -->|"persists students"| node_database

click node_app "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/Ex5TemplateApplication.java"
click node_security "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/config/ApplicationConfig.java"
click node_credentials "https://github.com/lubabanairoukh/course-registration-system/blob/main/file.txt"
click node_student_ctrl "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/StudentController.java"
click node_student_views "https://github.com/lubabanairoukh/course-registration-system/tree/main/src/main/resources/templates"
click node_course_ctrl "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/CourseController.java"
click node_admin_students "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/StudentController.java"
click node_admin_views "https://github.com/lubabanairoukh/course-registration-system/tree/main/src/main/resources/templates"
click node_course_entity "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/entity/Course.java"
click node_student_entity "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/entity/Student.java"
click node_course_repo "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/repository/CourseRepository.java"
click node_student_repo "https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/repository/StudentRepository.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_security,node_credentials,node_browser toneBlue
class node_student_ctrl,node_student_views,node_database toneAmber
class node_course_ctrl,node_admin_students,node_admin_views toneMint
class node_course_entity,node_student_entity,node_course_repo,node_student_repo toneRose
```

## Components

### Access and security

- [Spring application](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/Ex5TemplateApplication.java): `src/main/java/hac/Ex5TemplateApplication.java`
- [Login and access](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/config/ApplicationConfig.java): `src/main/java/hac/config/ApplicationConfig.java`
- [User credentials](https://github.com/lubabanairoukh/course-registration-system/blob/main/file.txt): `file.txt`

### Student workflows

- [Student workflows](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/StudentController.java): `src/main/java/hac/controllers/StudentController.java`
- [Student pages](https://github.com/lubabanairoukh/course-registration-system/tree/main/src/main/resources/templates): `src/main/resources/templates`

### Course administration

- [Course administration](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/CourseController.java): `src/main/java/hac/controllers/CourseController.java`
- [Participant listing](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/controllers/StudentController.java): `src/main/java/hac/controllers/StudentController.java`
- [Admin pages](https://github.com/lubabanairoukh/course-registration-system/tree/main/src/main/resources/templates): `src/main/resources/templates`

### Persistence and views

- [Course model](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/entity/Course.java): `src/main/java/hac/entity/Course.java`
- [Student model](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/entity/Student.java): `src/main/java/hac/entity/Student.java`
- [Course repository](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/repository/CourseRepository.java): `src/main/java/hac/repository/CourseRepository.java`
- [Student repository](https://github.com/lubabanairoukh/course-registration-system/blob/main/src/main/java/hac/repository/StudentRepository.java): `src/main/java/hac/repository/StudentRepository.java`

### Other components

- **Web user**
- **JPA database**

## Connections

- Web user → Login and access: authenticates
- Web user → Student workflows: requests student pages
- Web user → Course administration: requests admin actions
- Spring application → Login and access: starts configuration
- Login and access → User credentials: reads accounts
- Login and access → Student repository: creates students
- Student workflows → Course repository: reads and saves courses
- Student workflows → Student repository: looks up students
- Student workflows → Student pages: selects views
- Course administration → Course repository: manages courses
- Course administration → Student repository: lists students
- Course administration → Admin pages: selects views
- Participant listing → Course repository: loads course participants
- Participant listing → Admin pages: selects view
- Course repository → Course model: loads and stores
- Student repository → Student model: loads and stores
- Course repository → JPA database: persists courses
- Student repository → JPA database: persists students
