# abdul-majid-khan/springboot-demo architecture

> Architecture diagram of the GitHub repository abdul-majid-khan/springboot-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdul-majid-khan/springboot-demo
- Repository: https://github.com/abdul-majid-khan/springboot-demo

## Overview

This is a Spring Boot REST API for managing student records. The main workflow is an HTTP request through the student controller to service-level CRUD and duplicate-email checks, with repository persistence and response DTOs; create requests are validated and centralized exception handling formats errors. The README also documents MySQL persistence and Actuator support. Service, controller, DTO, entity, repository, and exception code were sampled; database configuration and Actuator wiring were not, so those relationships are documented rather than inferred from source.

Main entry points: [`crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java`](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java) (Student Controller), [`crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java`](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java) (Student Service), [`crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/repository/StudentRepository.java`](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/repository/StudentRepository.java) (Student Repository), [`crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception/GlobalExceptionHandler.java`](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception/GlobalExceptionHandler.java) (Global Exception Handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["REST API"]
  node_controller["Student Controller"]
  node_requests["Request DTOs"]
  node_responses["Success DTOs"]
end

subgraph group_domain["Student Domain"]
  node_service["Student Service"]
  node_student["Student Entity<br/>[Student.java]"]
end

subgraph group_persistence["Persistence"]
  node_repository["Student Repository"]
  node_mysql[("MySQL Database")]
end

subgraph group_errors["Error Responses"]
  node_handler["Global Exception Handler"]
  node_error_dtos["Error DTOs"]
  node_exceptions["Domain Exceptions"]
end

subgraph group_platform["Platform"]
  node_actuator["Actuator"]
end

node_client(("API Client"))

node_client -->|"sends HTTP"| node_controller
node_controller -->|"binds request"| node_requests
node_controller -->|"delegates CRUD"| node_service
node_service -->|"queries and saves"| node_repository
node_repository -->|"persists entity"| node_student
node_repository -.->|"JPA persistence"| node_mysql
node_service -->|"maps and updates"| node_student
node_service -->|"throws domain errors"| node_exceptions
node_service -->|"maps result"| node_responses
node_controller -->|"returns payload"| node_responses
node_controller -.->|"validation errors"| node_handler
node_handler -->|"handles exceptions"| node_exceptions
node_handler -->|"builds error payloads"| node_error_dtos
node_client -.->|"health access"| node_actuator

click node_controller "https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java"
click node_requests "https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto"
click node_responses "https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto"
click node_service "https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java"
click node_student "https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/entity/Student.java"
click node_repository "https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/repository/StudentRepository.java"
click node_mysql "https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/resources/application.properties"
click node_handler "https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception/GlobalExceptionHandler.java"
click node_error_dtos "https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto"
click node_exceptions "https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception"
click node_actuator "https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo"

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_requests,node_responses,node_client toneBlue
class node_service,node_student toneAmber
class node_repository,node_mysql toneMint
class node_handler,node_error_dtos,node_exceptions toneRose
class node_actuator toneIndigo
```

## Components

### REST API

- [Student Controller](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java`
- [Request DTOs](https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto`
- [Success DTOs](https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto`

### Student Domain

- [Student Service](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java`
- [Student Entity](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/entity/Student.java): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/entity/Student.java`

### Persistence

- [Student Repository](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/repository/StudentRepository.java): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/repository/StudentRepository.java`
- [MySQL Database](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/resources/application.properties): `crudSpringBootDemo/src/main/resources/application.properties`

### Error Responses

- [Global Exception Handler](https://github.com/abdul-majid-khan/springboot-demo/blob/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception/GlobalExceptionHandler.java): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception/GlobalExceptionHandler.java`
- [Error DTOs](https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/dto`
- [Domain Exceptions](https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception): `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception`

### Platform

- [Actuator](https://github.com/abdul-majid-khan/springboot-demo/tree/main/crudSpringBootDemo): `crudSpringBootDemo`

### Other components

- **API Client**

## Connections

- API Client → Student Controller: sends HTTP (evidence: `README.md`)
- Student Controller → Request DTOs: binds request (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java`)
- Student Controller → Student Service: delegates CRUD (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java`)
- Student Service → Student Repository: queries and saves (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java`)
- Student Repository → Student Entity: persists entity (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/repository/StudentRepository.java`)
- Student Repository → MySQL Database: JPA persistence (evidence: `README.md`)
- Student Service → Student Entity: maps and updates (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java`)
- Student Service → Domain Exceptions: throws domain errors (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java`)
- Student Service → Success DTOs: maps result (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/service/StudentService.java`)
- Student Controller → Success DTOs: returns payload (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/controller/StudentController.java`)
- Student Controller → Global Exception Handler: validation errors
- Global Exception Handler → Domain Exceptions: handles exceptions (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception/GlobalExceptionHandler.java`)
- Global Exception Handler → Error DTOs: builds error payloads (evidence: `crudSpringBootDemo/src/main/java/in/strikes/crudSpringBootDemo/exception/GlobalExceptionHandler.java`)
- API Client → Actuator: health access (evidence: `README.md`)
