How priya-ghagare-programmer/employee-management-system works
This is a React frontend for an employee-management system backed by a Spring Boot API. Users sign in or register; role-protected routes lead admins to workforce management and employees to self-service pages. Those pages use a shared Axios service for authentication and domain operations, while role details are kept in browser storage. The graph preserves the documented page capabilities, but implementation links for unsampled pages are limited to route and API references in the supplied index; the backend is external.
Main entry points: App.jsx App routes · api.js Axios API service · AdminLayout.jsx Admin layout · EmployeeLayout.jsx Employee layout
Components 29
Routing and access
- App routes
src/App.jsx - Login selection
src/pages/Login.jsx - Admin login
src/pages/AdminLogin.jsx - Employee login
src/pages/EmployeeLogin.jsx - Registration
src/pages/Register.jsx
Admin management
- Admin layout
src/layouts/AdminLayout.jsx - Admin dashboard
src/pages/admin/AdminDashboard.jsx - Employee records
src/pages/admin/Employees.jsx - Departments
src/pages/admin/Departments.jsx - Attendance oversight
src/pages/admin/Attendance.jsx - Leave decisions
src/pages/admin/Leaves.jsx - Task assignment
src/pages/admin/Tasks.jsx - Salary and payroll
src/pages/admin/Salary.jsx
Employee self-service
- Employee layout
src/layouts/EmployeeLayout.jsx - Employee dashboard
src/pages/employee/EmployeeDashboard.jsx - Profile
src/pages/employee/Profile.jsx - My attendance
src/pages/employee/Attendance.jsx - My tasks
src/pages/employee/Tasks.jsx - Apply for leave
src/pages/employee/ApplyLeave.jsx - My leave records
src/pages/employee/Leaves.jsx - My salary and PDF
src/pages/employee/Salary.jsx
Shared UI and integration
- Navigation sidebar
src/components/Sidebar.jsx - User topbar
src/components/Topbar.jsx - Page headers
src/components/PageHeader.jsx - Dashboard stat cards
src/components/StatCard.jsx - Auth state helpers
src/utils/auth.js - Axios API service
src/services/api.js
Other components
- User
- Spring Boot API
Connections 48
- User → App routes: opens
src/App.jsx - App routes → Login selection: routes to
src/App.jsx - App routes → Admin login: routes to
src/App.jsx - App routes → Employee login: routes to
src/App.jsx - App routes → Registration: routes to
src/App.jsx - App routes → Admin layout: protects admin
src/App.jsx - App routes → Employee layout: protects employee
src/App.jsx - App routes → Admin dashboard: routes to
src/App.jsx - App routes → Employee records: routes to
src/App.jsx - App routes → Departments: routes to
src/App.jsx - App routes → Attendance oversight: routes to
src/App.jsx - App routes → Leave decisions: routes to
src/App.jsx - App routes → Task assignment: routes to
src/App.jsx - App routes → Salary and payroll: routes to
src/App.jsx - App routes → Employee dashboard: routes to
src/App.jsx - App routes → Profile: routes to
src/App.jsx - App routes → My attendance: routes to
src/App.jsx - App routes → My tasks: routes to
src/App.jsx - App routes → Apply for leave: routes to
src/App.jsx - App routes → My leave records: routes to
src/App.jsx - App routes → My salary and PDF: routes to
src/App.jsx - Employee login → Axios API service: authenticates
src/pages/EmployeeLogin.jsx - Admin login → Axios API service: authenticates
src/pages/AdminLogin.jsx - Registration → Axios API service: registers
src/pages/Register.jsx - Admin layout → Navigation sidebar: renders
src/layouts/AdminLayout.jsx - Admin layout → User topbar: renders
src/layouts/AdminLayout.jsx - Employee layout → Navigation sidebar: renders
src/layouts/EmployeeLayout.jsx - Employee layout → User topbar: renders
src/layouts/EmployeeLayout.jsx - User topbar → Auth state helpers: reads identity
src/components/Topbar.jsx - Admin dashboard → Axios API service: loads metrics
src/pages/admin/AdminDashboard.jsx - Admin dashboard → Dashboard stat cards: renders
src/pages/admin/AdminDashboard.jsx - Employee records → Axios API service: manages records
src/pages/admin/Employees.jsx - Departments → Axios API service: manages departments
src/pages/admin/Departments.jsx - Attendance oversight → Axios API service: loads attendance
src/pages/admin/Attendance.jsx - Leave decisions → Axios API service: reviews leave
src/pages/admin/Leaves.jsx - Task assignment → Axios API service: assigns tasks
src/pages/admin/Tasks.jsx - Task assignment → Axios API service: loads employees
src/pages/admin/Tasks.jsx - Salary and payroll → Axios API service: manages payroll
src/pages/admin/Salary.jsx - Employee dashboard → Axios API service: loads summary
src/pages/employee/EmployeeDashboard.jsx - Profile → Axios API service: loads profile
src/pages/employee/Profile.jsx - My attendance → Axios API service: loads attendance
src/pages/employee/Attendance.jsx - My tasks → Axios API service: loads and updates
src/pages/employee/Tasks.jsx - Apply for leave → Axios API service: submits request
src/pages/employee/ApplyLeave.jsx - My leave records → Axios API service: loads leave records
src/pages/employee/Leaves.jsx - My salary and PDF → Axios API service: loads salary
src/pages/employee/Salary.jsx - Axios API service → Spring Boot API: calls HTTP API
README.md - Admin layout → Page headers: pages use
- Employee layout → Page headers: pages use