How vivekfaujdar01/employeeleavemanagementsystem works
This is a role-based employee management web application. Employees register or sign in, view dashboards, submit leave and reimbursement requests, and managers/admins review requests; admins also manage users. The React routes call a REST API, whose controllers implement authentication and request workflows over MongoDB models. The graph preserves dashboards, theming, receipt uploads, and administrative review capabilities. Backend-to-model links and several UI dependencies are supported by the SOURCE INDEX; unsampled implementation details and infrastructure automation are not expanded into runtime flows.
Main entry points: App.jsx Route application · api.js API client · server.js Express server · reimbursementRoutes.js Reimbursement routes
Components 26
Web application
- Route application
Frontend/src/App.jsx - Sign in and registration
Frontend/src/pages/Login.jsx - Employee dashboard
Frontend/src/pages/EmployeeDashboard.jsx - Manager dashboard
Frontend/src/pages/ManagerDashboard.jsx - Admin dashboard
Frontend/src/pages/AdminDashboard.jsx - Leave application
Frontend/src/pages/ApplyLeave.jsx - Reimbursement application
Frontend/src/pages/ApplyReimbursement.jsx - API client
Frontend/src/lib/api.js - Theme state
Frontend/src/lib/ThemeContext.jsx - Admin review panels
Frontend/src/components/admin - Dashboard widgets
Frontend/src/components/dashboard
API and domain
- Express server
Backend/server.js - Authentication routes
Backend/routes/authRoutes.js - Leave routes
Backend/routes/leaveRoutes.js - Reimbursement routes
Backend/routes/reimbursementRoutes.js - Authentication and users
Backend/controllers/authController.js - Leave workflow
Backend/controllers/leaveController.js - Reimbursement workflow
Backend/controllers/reimbursementController.js - Token authentication
Backend/middleware/authMiddleware.js - Role authorization
Backend/middleware/roleMiddleware.js - Receipt file storage
Backend/routes/reimbursementRoutes.js
Persistence
- User records
Backend/models/User.js - Leave records
Backend/models/Leave.js - Reimbursement records
Backend/models/Reimbursement.js
Other components
- Employee, manager, admin
- MongoDB
Connections 40
- Employee, manager, admin → Route application: uses
README.md - Route application → Sign in and registration: routes to
Frontend/src/App.jsx - Route application → Employee dashboard: routes to
Frontend/src/App.jsx - Route application → Manager dashboard: routes to
Frontend/src/App.jsx - Route application → Admin dashboard: routes to
Frontend/src/App.jsx - Route application → Leave application: routes to
Frontend/src/App.jsx - Route application → Reimbursement application: routes to
Frontend/src/App.jsx - Route application → Theme state: provides
Frontend/src/App.jsx - Sign in and registration → API client: calls
Frontend/src/pages/Login.jsx - Employee dashboard → API client: calls
Frontend/src/pages/EmployeeDashboard.jsx - Manager dashboard → API client: calls
Frontend/src/pages/ManagerDashboard.jsx - Admin dashboard → API client: calls
Frontend/src/pages/AdminDashboard.jsx - Leave application → API client: calls
Frontend/src/pages/ApplyLeave.jsx - Reimbursement application → API client: calls
Frontend/src/pages/ApplyReimbursement.jsx - Manager dashboard → Dashboard widgets: renders
Frontend/src/pages/ManagerDashboard.jsx - Employee dashboard → Dashboard widgets: renders
Frontend/src/pages/EmployeeDashboard.jsx - Admin dashboard → Admin review panels: renders
Frontend/src/pages/AdminDashboard.jsx - API client → Express server: requests API
README.md - Express server → Authentication routes: mounts
Backend/server.js - Express server → Leave routes: mounts
Backend/server.js - Express server → Reimbursement routes: mounts
Backend/server.js - Authentication routes → Authentication and users: dispatches
Backend/routes/authRoutes.js - Leave routes → Leave workflow: dispatches
Backend/routes/leaveRoutes.js - Reimbursement routes → Reimbursement workflow: dispatches
Backend/routes/reimbursementRoutes.js - Authentication routes → Token authentication: protects routes
Backend/routes/authRoutes.js - Leave routes → Token authentication: protects routes
Backend/routes/leaveRoutes.js - Reimbursement routes → Token authentication: protects routes
Backend/routes/reimbursementRoutes.js - Leave routes → Role authorization: authorizes roles
Backend/routes/leaveRoutes.js - Reimbursement routes → Role authorization: authorizes roles
Backend/routes/reimbursementRoutes.js - Reimbursement routes → Receipt file storage: stores uploads
Backend/routes/reimbursementRoutes.js - Authentication and users → User records: reads and writes
Backend/controllers/authController.js - Authentication and users → Leave records: deletes records
Backend/controllers/authController.js - Authentication and users → Reimbursement records: reads and deletes
Backend/controllers/authController.js - Leave workflow → Leave records: reads and writes
Backend/controllers/leaveController.js - Reimbursement workflow → Reimbursement records: reads and writes
Backend/controllers/reimbursementController.js - Token authentication → User records: loads user
Backend/middleware/authMiddleware.js - Express server → MongoDB: connects
README.md - User records → MongoDB: persists
README.md - Leave records → MongoDB: persists
README.md - Reimbursement records → MongoDB: persists
README.md