How shubhsingh13jann/employee-management-system works
Enterprise EMS is a role-based employee and resource management system. Users enter through the landing and authentication experience, then protected role portals support HR administration, manager project and escalated-leave work, supervisor team/task/leave workflows, and employee task, leave, and profile work. The frontend sends API requests to the Express service, whose role-specific routes dispatch to controllers that access MySQL. Authentication also sends security and account emails. The README documents capabilities beyond the sampled implementations; those branches are represented at their listed module paths, with uncertain wiring omitted.
Main entry points: App.tsx Route shell · index.js HTTP service · axios.js API client · Login.tsx Sign-in and signup
Components 26
Web client
- Route shell
Employee-MS/src/App.tsx - Sign-in and signup
Employee-MS/src/pages/Login.tsx - Session context
Employee-MS/src/context/AuthContext.tsx - Admin workspace
Employee-MS/src/pages/admin/Departments.tsx - Manager projects
Employee-MS/src/pages/manager/ProjectsManager.tsx - Manager leave review
Employee-MS/src/pages/manager/ManagerLeaves.tsx - Supervisor tasks
Employee-MS/src/pages/supervisor/SupervisorTasks.tsx - Employee portal
Employee-MS/src/pages/employee/EmployeeTasks.tsx - API client
Employee-MS/src/api/axios.js
API and access
- HTTP service
Server/index.js - Authentication routes
Server/Routes/authRoutes.js - Admin routes
Server/Routes/adminRoutes.js - Manager routes
Server/Routes/managerRoutes.js - Supervisor routes
Server/Routes/supervisorRoutes.js - Employee routes
Server/Routes/employeeRoutes.js - Task discussion routes
Server/Routes/taskRoutes.js - Token and role checks
Server/middleware/authMiddleware.js - Authentication workflows
Server/controllers/authController.js
Workforce governance
- Organization administration
Server/controllers/adminController.js
Team operations
- Manager workflows
Server/controllers/managerController.js - Supervisor workflows
Server/controllers/supervisorController.js - Employee workflows
Server/controllers/employeeController.js - Task discussions
Server/controllers/taskController.js
Persistence and messaging
- MySQL database
Server/config/db.js - Email delivery
Server/utils/emailService.js
Other components
- Portal user
Connections 33
- Portal user → Route shell: opens portal
- Route shell → Sign-in and signup: routes to
- Route shell → Admin workspace: protects routes
- Route shell → Manager projects: protects routes
- Route shell → Manager leave review: protects routes
- Route shell → Supervisor tasks: protects routes
- Route shell → Employee portal: protects routes
- Sign-in and signup → Session context: uses session
- Sign-in and signup → API client: sends requests
- Admin workspace → API client: sends requests
- Manager projects → API client: sends requests
- Manager leave review → API client: sends requests
- Supervisor tasks → API client: sends requests
- Employee portal → API client: sends requests
- API client → HTTP service: API requests
- HTTP service → Authentication routes: mounts routes
- HTTP service → Admin routes: mounts routes
- HTTP service → Manager routes: mounts routes
- HTTP service → Supervisor routes: mounts routes
- HTTP service → Employee routes: mounts routes
- HTTP service → Task discussion routes: mounts routes
- Authentication routes → Token and role checks: checks token
- Admin routes → Token and role checks: checks role
- Authentication routes → Authentication workflows: dispatches
- Admin routes → Organization administration: dispatches
- Manager routes → Manager workflows: dispatches
- Supervisor routes → Supervisor workflows: dispatches
- Employee routes → Employee workflows: dispatches
- Task discussion routes → Task discussions: dispatches
- Authentication workflows → MySQL database: reads and writes
- Organization administration → MySQL database: reads and writes
- Employee workflows → MySQL database: reads and writes
- Authentication workflows → Email delivery: sends security mail