How seruyange-jojo/hrms-project works
This HRMS supports employee, manager, and HR/admin workflows: users sign in, reach role-appropriate screens, and use them to manage employee and department records or view and act on attendance, leave, and payroll information. The React app sends API requests to a Go/Gin service, whose routes apply authentication and role checks before dispatching to domain controllers backed by PostgreSQL through GORM. The README documents dashboard analytics and manager team overviews; the sampled manager dashboard confirms attendance, leave, and team-data use, but does not establish persistence for its announcements or task UI.
Main entry points: routes.go API routes · App.jsx React app · api.js API client · models.go Domain models
Components 26
Web application
- React app
frontend/src/App.jsx - Auth state
frontend/src/hooks/useAuth.jsx - Role dashboards
frontend/src/pages/Dashboard.jsx - Employee pages
frontend/src/pages/Employees.jsx - Department pages
frontend/src/pages/Departments.jsx - Leave pages
frontend/src/pages/LeaveRequestNew.jsx - Payroll pages
frontend/src/pages/MyPayroll.jsx - Profile page
frontend/src/pages/Profile.jsx - Attendance actions
frontend/src/components/AttendanceCheckModal.jsx - API client
frontend/src/services/api.js
API and access
- Gin API server
backend/main.go - API routes
backend/routes/routes.go - JWT middleware
backend/middleware/auth.go - Role checks
backend/middleware/rbac.go - JWT utilities
backend/utils/jwt.go
HR workflows
- Authentication
backend/controllers/auth.go - User management
backend/controllers/user.go - Employee records
backend/controllers/employee.go - Departments
backend/controllers/department.go - Attendance
backend/controllers/attendance.go - Leave requests
backend/controllers/leave.go - Payroll
backend/controllers/payroll.go
Persistence
- Database setup
backend/database/database.go - Domain models
backend/models/models.go
Other components
- HRMS users
- PostgreSQL
Connections 38
- HRMS users → React app: uses
- React app → Auth state: provides auth
- React app → Role dashboards: routes to
- React app → Employee pages: routes to
- React app → Department pages: routes to
- React app → Leave pages: routes to
- React app → Payroll pages: routes to
- React app → Profile page: routes to
- Auth state → API client: requests auth
- Role dashboards → API client: loads HR data
- Employee pages → API client: manages records
- Department pages → API client: manages units
- Leave pages → API client: submits requests
- Payroll pages → API client: loads payslips
- Profile page → API client: updates profile
- Attendance actions → API client: logs attendance
- API client → Gin API server: HTTP requests
- Gin API server → Database setup: initializes
- Gin API server → API routes: registers routes
- API routes → JWT middleware: protects routes
- API routes → Role checks: applies role checks
- API routes → Authentication: dispatches auth
- API routes → User management: dispatches users
- API routes → Employee records: dispatches employees
- API routes → Departments: dispatches departments
- API routes → Attendance: dispatches attendance
- API routes → Leave requests: dispatches leave
- API routes → Payroll: dispatches payroll
- Authentication → JWT utilities: generates tokens
- Authentication → Domain models: loads user
- User management → Domain models: reads/writes
- Employee records → Domain models: reads/writes
- Departments → Domain models: reads/writes
- Attendance → Domain models: reads/writes
- Leave requests → Domain models: reads/writes
- Payroll → Domain models: reads/writes
- Database setup → Domain models: migrates
- Database setup → PostgreSQL: connects