How vijaychopade-suma/be-leave-management-system works
This is a Spring-based leave-management backend. Employees authenticate, submit and view leave requests; managers handle approval, while HR manages leave types and users/roles. The tree also shows mail, WebSocket event notifications, and persisted notifications as product capabilities. Sampled controllers establish service calls and notification services establish WebSocket dispatch; several service implementations and security wiring were not excerpted, so those links are omitted rather than inferred.
Main entry points: LeaveController.java Leave API · UserService.java User operations · User.java Users and roles · AuthController.java Authentication API
Components 24
Identity and access
- Authentication API
src/main/java/com/suma/lms/features/user/controller/AuthController.java - User administration
src/main/java/com/suma/lms/features/user/controller/UserController.java - User operations
src/main/java/com/suma/lms/features/user/service/UserService.java - Users and roles
src/main/java/com/suma/lms/features/user/entity/User.java - User repository
src/main/java/com/suma/lms/features/user/repository/UserRepository.java - JWT service
src/main/java/com/suma/lms/config/security/JwtService.java - JWT filter chain
src/main/java/com/suma/lms/config/security/JwtFilterChain.java
Leave management
- Leave API
src/main/java/com/suma/lms/features/leave/controller/LeaveController.java - Leave operations
src/main/java/com/suma/lms/features/leave/service/LeaveService.java - Leave records
src/main/java/com/suma/lms/features/leave/entity/Leave.java - Leave repository
src/main/java/com/suma/lms/features/leave/repository/LeaveRepository.java - Leave types
src/main/java/com/suma/lms/features/leave/entity/LeaveType.java - Leave payloads
src/main/java/com/suma/lms/features/leave/dto/response/LeaveResponse.java
Notifications
- Email delivery
src/main/java/com/suma/lms/features/notification/mail/MailService.java - Leave type events
src/main/java/com/suma/lms/features/notification/websocket/events/leave/LeaveTypeWebSocketService.java - Leave events
src/main/java/com/suma/lms/features/notification/websocket/events/leave/LeaveWebSocketService.java - User events
src/main/java/com/suma/lms/features/notification/websocket/events/user/UserWebSocketService.java - Notification API
src/main/java/com/suma/lms/features/notification/websocket/notification/NotificationController.java - User notifications
src/main/java/com/suma/lms/features/notification/websocket/notification/NotificationWebSocketService.java - Notification records
src/main/java/com/suma/lms/features/notification/websocket/notification/NotificationRepository.java
Shared runtime
- Current-user context
src/main/java/com/suma/lms/common/ApplicationHelper.java - Application constants
src/main/java/com/suma/lms/common/AppConstants.java
Other components
- Employee or HR
- Manager
Connections 19
- Employee or HR → Authentication API: authenticates
src/main/java/com/suma/lms/features/user/controller/AuthController.java - Employee or HR → Leave API: requests leave
src/main/java/com/suma/lms/features/leave/controller/LeaveController.java - Manager → Leave API: reviews leave
src/main/java/com/suma/lms/features/leave/controller/LeaveController.java - Authentication API → User operations: delegates
src/main/java/com/suma/lms/features/user/controller/AuthController.java - User administration → User operations: delegates
src/main/java/com/suma/lms/features/user/controller/UserController.java - User operations → Users and roles: manages
- User repository → Users and roles: persists
src/main/java/com/suma/lms/features/user/repository/UserRepository.java - JWT filter chain → JWT service: validates tokens
- Leave API → Leave operations: delegates
src/main/java/com/suma/lms/features/leave/controller/LeaveController.java - Leave operations → Leave records: manages
- Leave repository → Leave records: persists
src/main/java/com/suma/lms/features/leave/repository/LeaveRepository.java - Leave API → Email delivery: may notify
src/main/java/com/suma/lms/features/leave/controller/LeaveController.java - Leave API → Leave type events: may publish
- Leave API → Leave events: may publish
- Leave API → User notifications: may notify
- Notification API → Notification records: accesses records
src/main/java/com/suma/lms/features/notification/websocket/notification/NotificationController.java - User notifications → Employee or HR: dispatches events
src/main/java/com/suma/lms/features/notification/websocket/notification/NotificationWebSocketService.java - Leave type events → Employee or HR: broadcasts events
src/main/java/com/suma/lms/features/notification/websocket/events/leave/LeaveTypeWebSocketService.java - Current-user context → Users and roles: reads identity
src/main/java/com/suma/lms/common/ApplicationHelper.java