Skip to content
Rushikesh Panchal

All selected work

Grove HRMS

A full-stack HR management system with server-side role-based access and a single audited, transactional write path.

The problem

Grove is a complete HR platform for a company of about 100 people, from clocking in to running payroll, with separate experiences for employees, managers, HR and admins. The hard part is trust: each person may see and change only what their role and scope allow, and every change has to leave a record.

Architecture

How a change moves through Grove HRMS

  1. Browser

    • React 19 forms (React Hook Form)
  2. Next.js 16 on Vercel

    • proxy.ts: cookie redirects only
    • Server components: pages and queries
    • Server actions: createAction
    • Route handlers: CSV, PDF, files, cron
  3. createAction, every time

    • Authenticate the session
    • Validate with Zod
    • Check role, scope and record
  4. One Postgres transaction

    • The change
    • Audit entries
    • Notifications
  5. Supabase

    • Postgres via Prisma 7, row level security with no policies
    • Private storage bucket
The browser submits a form to a Next.js server action. createAction authenticates the session, validates with Zod and checks role, scope and record. The change, its audit entries and its notifications are written in one Postgres transaction that commits or rolls back together.

Key decisions

The database has one door.
Every table has row level security on with no policies, so Supabase’s public API cannot reach it. Only the server connects, and it checks permissions in code.
Every check is on the server.
The proxy only redirects people without a session cookie. Pages, actions and route handlers each call requireUser or requirePermission, and queries filter by what the person may see.
One way to change data.
createAction runs the same steps every time, and a change, its audit entries and its notifications commit together or not at all.
Business rules are plain functions.
Leave balances, payroll, review visibility, CSV checks and reminders are pure, unit-tested functions shared by the UI previews and the server.

Proof

Every number opens its source. Every claim links to the code.
tables
scoped permissions
tests
seeded demo employees

What it doesn’t do yet

  • Payroll is simulated and says so on every screen; it is not for running real payroll.
  • Email is not sent: password-reset messages are queued in a table, and a real deployment needs a mail provider.
  • The demo is shared: everyone uses the same four accounts and company, and it resets every night at 02:00 IST.
  • Signed-in pages are slower on weak phones, because they wait for the session and live data.