Workflow ToolLive

Corp HQ

A responsive employee portal for attendance, leave, correction requests, holidays, reporting, role-scoped management, and real-time workforce updates.

Corp HQ · Attendance
Present today86
Leave requests07
Pending approvals04
Employee
CalendarApprove leave
Attendance, employees, leave requests, and approvals
Overview

About Corp HQ

Corp HQ gives employees one place to check in, review attendance, request corrections, manage leave, and view applicable holidays. Managers receive direct-report attendance and leave workflows, while administrators and HR can manage records, employees, reporting hierarchies, holidays, approvals, analytics, and CSV exports.

Product thinking

Challenge and approach

Challenge

Attendance, leave balances, correction requests, manager approvals, and HR reporting require consistent business rules and carefully separated access. Corp HQ brings those workflows together while enforcing employee, direct-manager, and administrator scope on the server.

Approach

Attendance calculations use each employee's saved timezone and configured work-start rules. Leave calculations exclude weekends and applicable company or department holidays, reserve balances while requests are pending, and release or consume balances when requests are cancelled, rejected, or approved.

Capabilities

Main features

01

Timezone-aware employee check-in and checkout with attendance history

02

Attendance correction requests with administrator review

03

CL, SL, and PL balances with leave application and approval workflows

04

Direct-report views and manager-scoped leave review

05

Employee, reporting hierarchy, holiday, and department administration

06

Monthly attendance analytics, live workforce status, and CSV exports

Architecture

How the system is structured

  1. 01

    Next.js App Router pages and API route handlers provide the application and authenticated workflow endpoints.

  2. 02

    PostgreSQL and Prisma store employees, sessions, attendance, leave, balances, holidays, departments, and reporting relationships.

  3. 03

    A custom Node.js server prepares Next.js, applies committed migrations, attaches Socket.IO, and runs the automatic checkout timer.

  4. 04

    Service modules centralize attendance, leave, holiday, and regularization rules instead of embedding them in interface components.

Implementation

Technology and data

Technology stack

  • Next.js
  • React
  • PostgreSQL
  • Prisma
  • Tailwind CSS
  • Socket.IO
  • JWT
  • Zod
  • Resend

Engineering details

Technical considerations

SecurityAccess and validation safeguards
  • Short-lived JWT access tokens and rotating refresh-token sessions use HTTP-only cookies.
  • Protected routes enforce role and direct-manager scope on the server.
  • Password-reset responses do not reveal whether an email is registered.
  • Single-use reset links expire after 30 minutes and invalidate existing sessions after a successful reset.
  • Zod validates requests and bcryptjs hashes passwords.
ReliabilityRecovery and cleanup
  • Socket.IO events refresh attendance, leave, and correction views without manual reloads
  • Committed Prisma migrations are applied before the custom server accepts traffic
  • Startup stops if production migration deployment fails
  • An automatic process checks for attendance sessions exceeding the configured checkout duration
OperationsDeployment considerations
  • PostgreSQL is required and committed migrations are the production schema source of truth.
  • Resend is optional for local operation but must be configured to deliver password-reset emails.
  • The production origin must be configured exactly and served through HTTPS.
  • The custom server must support Socket.IO connections alongside the Next.js application.

Use cases

What the project supports

  • Track employee attendance and working hours
  • Apply for and review leave with role-scoped approvals
  • Correct missing or inaccurate attendance records
  • Manage employees, reporting relationships, holidays, and HR reports

Continue exploring

Financial Tool

Web application

RCharts

A modern, high-performance Indian Stock Market (NSE & BSE) technical analysis dashboard, charting suite, option chain analyzer, and screening tools built with Next.js 16 and React 19.

  • Next.js 16
  • React 19
  • +8

Workflow Website

Web application

Panarwala & Associates

A responsive professional-services website that organizes tax consulting, preparation, and advisory information through reusable, accessible service pages.

  • React
  • CSS custom properties
  • +1

Financial Tool

Excel-based web dashboard

PortFin - Excel portfolio dashboard

A no-backend investment dashboard that turns mutual-fund and stock Excel files into portfolio analytics, planning tools, tax views, and action signals.

  • HTML5
  • CSS3
  • +4