Rajveer Mahida

gTrack HRMS

gTrack is the HR system employees at Groovy use every day — clocking in, applying for leave, downloading payslips, and approving their team's requests. I built the Next.js web app and worked on the gTrack API behind it.

Role
Full-stack — web app & API
Stack
Next.js 16, React 19, TypeScript, TanStack Query, Zod, Upstash Redis
When
Aug 2026 — Present
12
HR modules in one app
75
typed API endpoints
400+
automated tests

Problem

Employees needed one place for their everyday HR tasks — attendance, leave, payslips, documents and approvals — that works on a phone at the office door as well as on a desktop, across more than one organization.

Approach

A Next.js 16 app that installs as a PWA. The browser only talks to the app's own API routes, which call the gTrack backend. Every endpoint is a single Zod contract that drives validation, the typed client and a generated OpenAPI spec. TanStack Query handles caching and refetching on the client.

Decisions

Contracts
One Zod contract per endpoint — 75 in all — generates the OpenAPI spec and the typed client. Tests fail if a contract and its route drift apart, and a lint rule blocks hard-coded API paths.
Attendance
Clock in and out with location and saved places, a monthly calendar with working-day totals, and regularization requests for missed punches.
Approvals
Managers review leave, regularization and other requests in one queue, with filters, paging and bulk review that runs as a background job.
Sign-in
Multi-organization accounts pick an org after sign-in and can switch later; 2FA setup is enforced, and sessions use 30-day refresh tokens.

What I'd change

API contracts arrived partway through, after the first features shipped on hand-written routes. Starting contract-first would have avoided the migration and caught schema mismatches with the backend from day one.

Next.js 16, React 19, TypeScript, TanStack Query, Zod, Vitest, PWA