WorkHub is a product for hour-banking and attendance control. It covers work-time logging, flexible-hour balances, absences and the generation of reports and exports, all within a single dashboard.
The application is built on Next.js 16 (App Router) with TypeScript, persistence in PostgreSQL via Prisma, and credential-based authentication with NextAuth. The second-factor layer uses TOTP: the secret is shown as a QR code (otplib plus qrcode) to pair with an authenticator app. The architecture separates routes and UI, server actions, domain services and data access, keeping business logic out of the components.
The calculation engine handles overtime, compensatory rest and public holidays, with a simulator and assisted import from PDF. The leave map manages vacation periods and their export. Reports are produced in Excel (ExcelJS) and indicators are drawn with ECharts. The test suite runs on Vitest.
time logging (timer)
|
v
+----------------------+
| hour-bank engine |
| (overtime/rest) |
+----------------------+
|
+-------+--------+
v v
reports leave map
(Excel/charts) (absences)