How digilogy/hr_portal_monorepo works
Casagrand Timesheet is an HR portal for employee authentication, profiles, timesheet entry, team reporting, and HR administration, including holiday and shift management. The principal documented flow is SSO Hub authorization through the portal frontend to the API, which resolves a local user and issues a session; authenticated API handlers then serve domain operations. The graph also preserves reporting, upload processing, and operational logging. Some frontend and admin wiring is documented or indexed but not excerpted, so only evidenced relationships are drawn; unsampled modules are not treated as inspected.
Main entry points: auth.service.ts Authentication · app.ts Express API · teamReports.controller.ts Team report handlers · profile.service.ts Employee profile
Components 23
Portal frontend
- Timesheet portal
apps/hr_portal/src/app/login/page.tsx
Identity and access
- Express API
apps/api_hr_portal/src/app.ts - Auth handlers
apps/api_hr_portal/src/modules/auth/auth.controller.ts - Authentication
apps/api_hr_portal/src/modules/auth/auth.service.ts - Role and scope
apps/api_hr_portal/src/modules/access/access.service.ts - JWT middleware
apps/api_hr_portal/src/middlewares/auth.middleware.ts - Redis services
packages/auth/src/redis.service.ts
Workforce operations
- Employee profile
apps/api_hr_portal/src/modules/profile/profile.service.ts - Timesheet service
apps/api_hr_portal/src/modules/timesheet/timesheet.service.ts - Timesheet handlers
apps/api_hr_portal/src/modules/timesheet/timesheet.controller.ts - Holiday data
apps/api_hr_portal/src/modules/admin/holiday.repository.ts - Admin upload handlers
apps/api_hr_portal/src/modules/admin/admin.controller.ts - Upload processing
apps/api_hr_portal/src/modules/admin/uploadQueue.service.ts - Shift import
apps/api_hr_portal/src/modules/admin/shiftUpload.service.ts - Portal database
packages/database/src/data-source.ts
Reporting and operations
- Team report handlers
apps/api_hr_portal/src/modules/reports/teamReports.controller.ts - Team reports
apps/api_hr_portal/src/modules/reports/teamReports.service.ts - Report filters
apps/api_hr_portal/src/modules/reports/reportFilters.ts - Live log routes
apps/api_hr_portal/src/routes/logxz.routes.ts - Live log service
apps/api_hr_portal/src/services/liveLog.service.ts - Email queue service
apps/api_hr_portal/src/services/emailQueue.service.ts
Other components
- Employee
- SSO Hub
Connections 21
- Employee → SSO Hub: starts login
- SSO Hub → Timesheet portal: redirects with code
- Timesheet portal → Express API: exchanges code
- Express API → SSO Hub: requests token
- Auth handlers → Authentication: delegates auth
apps/api_hr_portal/src/modules/auth/auth.controller.ts - Authentication → Role and scope: resolves role
apps/api_hr_portal/src/modules/auth/auth.service.ts - Authentication → Redis services: caches user
apps/api_hr_portal/src/modules/auth/auth.service.ts - JWT middleware → Express API: guards requests
- Timesheet handlers → Timesheet service: calls
apps/api_hr_portal/src/modules/timesheet/timesheet.controller.ts - Timesheet handlers → Employee profile: loads profile
apps/api_hr_portal/src/modules/timesheet/timesheet.controller.ts - Employee profile → Role and scope: resolves access
apps/api_hr_portal/src/modules/profile/profile.service.ts - Employee profile → Holiday data: reads holidays
apps/api_hr_portal/src/modules/profile/profile.service.ts - Team report handlers → Report filters: parses filters
apps/api_hr_portal/src/modules/reports/teamReports.controller.ts - Team report handlers → Team reports: requests reports
apps/api_hr_portal/src/modules/reports/teamReports.controller.ts - Team report handlers → Role and scope: checks capabilities
apps/api_hr_portal/src/modules/reports/teamReports.controller.ts - Team reports → Report filters: uses filters
apps/api_hr_portal/src/modules/reports/teamReports.service.ts - Admin upload handlers → Upload processing: queues upload
apps/api_hr_portal/src/modules/admin/admin.controller.ts - Upload processing → Shift import: dispatches shift import
apps/api_hr_portal/src/modules/admin/uploadQueue.service.ts - Live log routes → Live log service: reads and clears
apps/api_hr_portal/src/routes/logxz.routes.ts - Express API → Live log routes: mounts routes
apps/api_hr_portal/src/app.ts - Authentication → Email queue service: queues email
apps/api_hr_portal/src/modules/auth/auth.service.ts