How 125tirth-tech/ems works
EMS Pro is an employee-management SPA backed by an Express API and MongoDB. Users sign in, then use role-aware screens for employee records and HR workflows; API routes dispatch requests to controllers, which apply domain rules and persist data. The README also documents AI assistance, wellbeing analytics, content generation, and the handbook. The graph includes these major capabilities, but several links from frontend screens to API calls are unverified because the API client was not excerpted; those links are dashed.
Main entry points: index.js Express app · auth.js JWT authentication · leaveController.js Leave requests · app.js SPA router and layout
Components 34
Web experience
- SPA router and layout
public/js/app.js - Authentication screens
public/js/auth.js - Dashboard analytics
public/js/dashboard.js - Employee pages
public/js/employees.js - Attendance screen
public/js/attendance.js - Leave management
public/js/leaves.js - Payroll screen
public/js/payroll.js - AI assistant
public/js/aiAssistant.js - Document management
public/js/documents.js
API platform
- Express app
server/index.js - Auth routes
server/routes/auth.js - Employee routes
server/routes/employees.js - Attendance routes
server/routes/attendance.js - Leave routes
server/routes/leaves.js - Payroll routes
server/routes/payroll.js - Notification routes
server/routes/notifications.js - Document routes
server/routes/documents.js - AI routes
server/routes/ai.js - JWT authentication
server/middleware/auth.js
People operations
- Account and credentials
server/controllers/authController.js - Employee records
server/controllers/employeeController.js
HR workflows
- Time tracking
server/controllers/attendanceController.js - Leave requests
server/controllers/leaveController.js - Payroll processing
server/controllers/payrollController.js - Notification service
server/controllers/notificationController.js - Document handling
server/controllers/documentController.js - AI assistance
server/controllers/aiController.js
Persistence
- Employee data
server/models/Employee.js - User accounts
server/models/User.js - Attendance records
server/models/Attendance.js - Leave records
server/models/Leave.js - Payroll records
server/models/Payroll.js - Notification records
server/models/Notification.js
Other components
- HR and employees
Connections 44
- HR and employees → SPA router and layout: uses
README.md - SPA router and layout → Authentication screens: shows
README.md - SPA router and layout → Dashboard analytics: routes to
README.md - HR and employees → Employee pages: manages records
README.md - HR and employees → Attendance screen: tracks time
README.md - HR and employees → Leave management: requests leave
README.md - HR and employees → Payroll screen: views payroll
README.md - HR and employees → AI assistant: asks HR
README.md - HR and employees → Document management: manages files
README.md - SPA router and layout → Express app: requests API
- Express app → Auth routes: mounts
server/index.js - Express app → Employee routes: mounts
server/index.js - Express app → Attendance routes: mounts
server/index.js - Express app → Leave routes: mounts
server/index.js - Express app → Payroll routes: mounts
server/index.js - Express app → Notification routes: mounts
server/index.js - Express app → Document routes: mounts
server/index.js - Express app → AI routes: mounts
server/index.js - Auth routes → Account and credentials: dispatches
server/routes/auth.js - Employee routes → Employee records: dispatches
server/routes/employees.js - Attendance routes → Time tracking: dispatches
server/routes/attendance.js - Leave routes → Leave requests: dispatches
server/routes/leaves.js - Payroll routes → Payroll processing: dispatches
server/routes/payroll.js - Notification routes → Notification service: dispatches
server/routes/notifications.js - Document routes → Document handling: dispatches
server/routes/documents.js - AI routes → AI assistance: dispatches
server/routes/ai.js - Auth routes → JWT authentication: authenticates
server/routes/auth.js - Employee routes → JWT authentication: authenticates
server/routes/employees.js - Attendance routes → JWT authentication: authenticates
server/routes/attendance.js - Leave routes → JWT authentication: authenticates
server/routes/leaves.js - Payroll routes → JWT authentication: authenticates
server/routes/payroll.js - JWT authentication → User accounts: loads account
server/middleware/auth.js - Account and credentials → User accounts: reads and writes
server/controllers/authController.js - Employee records → Employee data: reads and writes
server/controllers/employeeController.js - Employee records → User accounts: creates accounts
server/controllers/employeeController.js - Time tracking → Attendance records: reads and writes
server/controllers/attendanceController.js - Time tracking → Employee data: counts employees
server/controllers/attendanceController.js - Leave requests → Leave records: reads and writes
server/controllers/leaveController.js - Leave requests → Employee data: loads employee
server/controllers/leaveController.js - Leave requests → User accounts: finds recipients
server/controllers/leaveController.js - Leave requests → Notification records: creates alerts
server/controllers/leaveController.js - Payroll processing → Payroll records: reads and writes
server/controllers/payrollController.js - Payroll processing → Employee data: loads employee
server/controllers/payrollController.js - Notification service → Notification records: reads and writes
server/controllers/notificationController.js