How mohankrishna-07/leave-management-system works
LMS supports separate employee and administrator portals backed by a Spring Boot API. Employees sign in, view profile and leave status, submit requests, and review history; administrators manage employees, inspect aggregate statistics, and approve or reject requests. The backend authenticates users, applies leave rules, and persists employee and request records. Portal routes and backend controller/service behavior are sampled; some page-to-endpoint wiring is based on the documented API capabilities rather than inspected frontend service code.
Main entry points: services/api.js Employee API client · services/api.js Admin API client · src/App.jsx Employee routes · src/App.jsx Admin routes
Components 26
Web portals
- Employee routes
employee-portal/src/App.jsx - Employee login
employee-portal/src/pages/Login.jsx - Employee dashboard
employee-portal/src/pages/Dashboard.jsx - Apply leave
employee-portal/src/pages/ApplyLeave.jsx - Leave history
employee-portal/src/pages/LeaveRequests.jsx - Employee profile
employee-portal/src/pages/Profile.jsx - Admin routes
admin-portal/src/App.jsx - Admin login
admin-portal/src/pages/Login.jsx - Admin dashboard
admin-portal/src/pages/Dashboard.jsx - Employee management
admin-portal/src/pages/ManageEmployees.jsx - Leave decisions
admin-portal/src/pages/LeaveRequests.jsx - Admin profile
admin-portal/src/pages/Profile.jsx
API and security
- Employee API client
employee-portal/src/services/api.js - Admin API client
admin-portal/src/services/api.js - Authentication API
backend/src/main/java/com/leavemanager/controller/AuthController.java - JWT security
backend/src/main/java/com/leavemanager/security/SecurityConfig.java - Employee API
backend/src/main/java/com/leavemanager/controller/EmployeeController.java - Admin API
backend/src/main/java/com/leavemanager/controller/AdminController.java - Leave API
backend/src/main/java/com/leavemanager/controller/LeaveController.java
Leave domain
- Employee operations
backend/src/main/java/com/leavemanager/service/impl/EmployeeServiceImpl.java - Leave rules and stats
backend/src/main/java/com/leavemanager/service/impl/LeaveServiceImpl.java
Persistence
- Employee repository
backend/src/main/java/com/leavemanager/repository/EmployeeRepository.java - Leave repository
backend/src/main/java/com/leavemanager/repository/LeaveRequestRepository.java - Relational database
Other components
- Employee
- Administrator
Connections 46
- Employee → Employee login: signs in
- Employee → Employee dashboard: views status
- Employee → Apply leave: submits request
- Employee → Leave history: reviews history
- Employee → Employee profile: views profile
- Administrator → Admin login: signs in
- Administrator → Admin dashboard: views metrics
- Administrator → Employee management: manages employees
- Administrator → Leave decisions: reviews requests
- Administrator → Admin profile: views profile
- Employee routes → Employee login: routes to
- Employee routes → Employee dashboard: routes to
- Employee routes → Apply leave: routes to
- Employee routes → Leave history: routes to
- Employee routes → Employee profile: routes to
- Admin routes → Admin login: routes to
- Admin routes → Admin dashboard: routes to
- Admin routes → Employee management: routes to
- Admin routes → Leave decisions: routes to
- Admin routes → Admin profile: routes to
- Employee login → Employee API client: requests auth
- Employee dashboard → Employee API client: requests stats
- Apply leave → Employee API client: submits leave
- Leave history → Employee API client: loads history
- Employee profile → Employee API client: loads profile
- Admin login → Admin API client: requests auth
- Admin dashboard → Admin API client: requests metrics
- Employee management → Admin API client: manages records
- Leave decisions → Admin API client: reviews requests
- Admin profile → Admin API client: loads profile
- Employee API client → Authentication API: calls auth endpoints
- Admin API client → Authentication API: calls auth endpoints
- Employee API client → Employee API: calls employee endpoints
- Employee API client → Leave API: calls leave endpoints
- Admin API client → Admin API: calls admin endpoints
- Authentication API → JWT security: authenticates
- Authentication API → Employee operations: loads account
- Employee API → Employee operations: delegates operations
- Leave API → Leave rules and stats: delegates requests
- Admin API → Employee operations: manages employees
- Admin API → Leave rules and stats: manages leave
- Employee operations → Employee repository: reads and writes
- Leave rules and stats → Employee repository: reads and writes
- Leave rules and stats → Leave repository: reads and writes
- Employee repository → Relational database: persists employees
- Leave repository → Relational database: persists requests