How alice62004/visionhr works
VisionHR is a role-based HR management web app: users sign in, enter protected HR workflows, and manage employee, attendance, leave, overtime, payroll, and related records. Face enrollment and kiosk attendance add face detection, matching, and liveness checks; an AI HR agent is also documented. The React client calls an Express API, which mounts domain routes and uses controllers, services, and MySQL-backed models. Edges follow shown route registration, imports, or README statements; some unsampled page and service internals are represented only at their documented subsystem level.
Main entry points: App.tsx Client router · routes Domain routes · employeeController.js Employee controller · models HR data models
Components 23
Web client
- Client router
client/src/App.tsx - Login and access
client/src/pages/Login/Login.tsx - AI HR agent
client/src/pages/AIHR/AIHR.tsx
People administration
- Employee records
client/src/pages/Employees/EmployeeForm.tsx - Face enrollment
client/src/pages/Employees/FaceEnrollment.tsx - Departments
client/src/pages/Departments/Departments.tsx - User accounts
client/src/pages/Users/UserList.tsx
Workforce operations
- Attendance terminal
client/src/pages/Attendance/AttendanceTerminal.tsx - Leave requests
client/src/pages/Leave/Leave.tsx - Overtime requests
client/src/pages/Overtime/Overtime.tsx - Payroll
client/src/pages/Payroll/Payroll.tsx - Shifts and reports
client/src/pages/Shifts
API and access
- Express API
server/server.js - Domain routes
server/routes - Auth and role checks
server/middleware/authMiddleware.js - Employee controller
server/controllers/employeeController.js - Attendance service
server/services/attendanceService.js - HR data models
server/models - MySQL pool
server/config/db.js
AI services
- Face recognition
server/services/faceRecognitionService.js - Python AI service
server/ai/service.py
Other components
- HR user
- MySQL database
Connections 22
- HR user → Client router: uses
client/src/App.tsx - Client router → Login and access: routes to
client/src/App.tsx - Client router → Employee records: routes to
client/src/App.tsx - Client router → Face enrollment: routes to
client/src/App.tsx - Client router → Departments: routes to
client/src/App.tsx - Client router → User accounts: routes to
client/src/App.tsx - Client router → Attendance terminal: routes to
client/src/App.tsx - Client router → Leave requests: routes to
client/src/App.tsx - Client router → Overtime requests: routes to
client/src/App.tsx - Client router → Payroll: routes to
client/src/App.tsx - Client router → Shifts and reports: routes to
client/src/App.tsx - Client router → AI HR agent: routes to
client/src/App.tsx - Express API → Domain routes: mounts
server/server.js - Domain routes → Auth and role checks: checks access
server/routes/employeeRoutes.js - Domain routes → Employee controller: dispatches
server/routes/employeeRoutes.js - Employee controller → HR data models: reads and writes
server/controllers/employeeController.js - Employee controller → Face recognition: checks faces
server/controllers/employeeController.js - Attendance service → HR data models: reads and writes
server/services/attendanceService.js - Attendance service → Face recognition: matches faces
server/services/attendanceService.js - HR data models → MySQL pool: queries through
server/models/User.js - MySQL pool → MySQL database: connects to
server/config/db.js - Face recognition → Python AI service: requests AI
README.md