How mahe13185/student-management-api works
This is a Spring Boot REST API for student and role management, with registration and Spring Security support. The main workflow accepts student requests, delegates CRUD and search operations through the service layer, and uses Spring Data repositories for persistence; registration and role management are separate API branches. The README also documents DTOs, validation, pagination, JPA relationships, MySQL, and Swagger UI. Some implementation files were not sampled, so links from service implementations to repositories and registration internals are not asserted.
Main entry points: CustomUserDetailsService.java User Details Loader · StudentController.java Student API · AuthController.java Registration API · UserRepository.java User Repository
Components 26
REST API
- Student API
src/main/java/org/mahendra/studentmanagementapi/controller/StudentController.java - Role API
src/main/java/org/mahendra/studentmanagementapi/controller/RoleController.java - Registration API
src/main/java/org/mahendra/studentmanagementapi/controller/AuthController.java - Home Endpoint
src/main/java/org/mahendra/studentmanagementapi/controller/HomeController.java - Student DTOs
src/main/java/org/mahendra/studentmanagementapi/dto/StudentRequestDTO.java - Registration DTO
src/main/java/org/mahendra/studentmanagementapi/dto/RegisterRequestDTO.java
Domain Services
- Student Service
src/main/java/org/mahendra/studentmanagementapi/service/StudentService.java - Student Service Impl
src/main/java/org/mahendra/studentmanagementapi/service/StudentServiceImpl.java - Role Service
src/main/java/org/mahendra/studentmanagementapi/service/RoleService.java - Role Service Impl
src/main/java/org/mahendra/studentmanagementapi/service/RoleServiceImpl.java - User Service
src/main/java/org/mahendra/studentmanagementapi/service/UserService.java - User Service Impl
src/main/java/org/mahendra/studentmanagementapi/service/UserServiceImpl.java
Persistence
- Student Repository
src/main/java/org/mahendra/studentmanagementapi/repository/StudentRepository.java - Role Repository
src/main/java/org/mahendra/studentmanagementapi/repository/RoleRepository.java - User Repository
src/main/java/org/mahendra/studentmanagementapi/repository/UserRepository.java - MySQL Database
- Student Entity
src/main/java/org/mahendra/studentmanagementapi/entity/Student.java - Role Entity
src/main/java/org/mahendra/studentmanagementapi/entity/Role.java
Identity and Security
- User Entity
src/main/java/org/mahendra/studentmanagementapi/entity/User.java - User Details Loader
src/main/java/org/mahendra/studentmanagementapi/Security/CustomUserDetailsService.java - Custom User Details
src/main/java/org/mahendra/studentmanagementapi/Security/CustomUserDetails.java - Security Configuration
src/main/java/org/mahendra/studentmanagementapi/SecurityConfig/SecurityConfig.java
Application Support
- CORS Configuration
src/main/java/org/mahendra/studentmanagementapi/config/CorsConfig.java - Exception Handler
src/main/java/org/mahendra/studentmanagementapi/exception/GlobalExceptionHandler.java - Error Response
src/main/java/org/mahendra/studentmanagementapi/dto/ErrorResponse.java
Other components
- API Client
Connections 20
- API Client → Student API: sends requests
- API Client → Role API: sends requests
- API Client → Registration API: registers
- API Client → Home Endpoint: requests greeting
- Student API → Student DTOs: accepts and returns
- Student API → Student Service: invokes
- Role API → Role Service: invokes
- Registration API → Registration DTO: accepts
- Registration API → User Service: invokes
- Student Repository → MySQL Database: persists entities
- Role Repository → MySQL Database: persists entities
- User Repository → MySQL Database: persists entities
- Student Repository → Student Entity: loads and stores
- Role Repository → Role Entity: loads and stores
- User Repository → User Entity: loads and stores
- User Details Loader → User Repository: looks up username
- User Details Loader → User Entity: reads account
- User Details Loader → Custom User Details: creates details
- Security Configuration → User Details Loader: configures authentication
- Exception Handler → Error Response: formats not-found errors