Gabriel Oghie
Back to Projects

Business Platform / Compliance Engine

HR & Payroll Management System (Plutus)

  • Next.js
  • TypeScript
  • Supabase
  • PostgreSQL
  • Row-Level Security
  • REST API
  • Authentication

Overview

Plutus (shipped as the Wagebook app) is a compliance-native HR and payroll platform for Nigeria, built on the Nigeria Tax Act framework effective 1 January 2026. Beyond payroll, it covers the full employer surface - employees, departments, branches, org chart, recruitment, leave & attendance, loans & advances, expenses, benefits, performance, learning, e-signature, and a full accounting layer (accounts payable/receivable, general ledger, bank reconciliation, fixed assets, budgets).

Problem

Nigeria's payroll compliance landscape changed fundamentally in 2026, when four new Acts replaced the old Personal Income Tax Act and rewrote how employers calculate, withhold and remit tax. Most employers still run payroll on spreadsheets or tools built for the old code, and the reform raised the cost of getting it wrong - new PAYE bands, mandatory Tax IDs, and a digitally-enabled Revenue Service that cross-references payroll against bank records.

Solution

A monorepo product where the statutory compliance engine is a separate, pure-TypeScript package sitting over a common payroll core. Rates, reliefs and thresholds live in a central, effective-dated rule set rather than as hardcoded numbers, so a law change is a version bump instead of a rewrite - and historical pay runs stay reproducible against the rules that were in force at the time.

Key Features

  • Automatic PAYE, pension, NHF, NHIS, NSITF, ITF and withholding-tax calculation, filing and remittance tracking
  • Multi-frequency payroll runs with itemised digital payslips, arrears, bonuses and 13th-month handling
  • Cumulative PAYE recalculation whenever pay changes mid-year
  • Tax-ID validation gating that flags workers before a run, not after an audit
  • Full employer surface: recruitment, leave & attendance, loans & advances, expenses, benefits, performance, learning
  • A real accounting layer: accounts payable/receivable, chart of accounts, general ledger, bank reconciliation, fixed assets, budgets
  • Employment-contract e-signature and employee/manager self-service

Technology Stack

  • Next.js 16 (App Router)
  • React 19
  • TypeScript (strict)
  • Tailwind CSS v4
  • Supabase (Postgres, Auth, Storage)
  • Vitest
  • pnpm workspaces
  • GitHub Actions CI

Architecture

A pnpm monorepo: the Next.js app consumes two internal packages - a statutory compliance engine (pure TypeScript, zero runtime dependencies) and a core package for organisation roles and Row-Level Security helpers. Rule versions live as effective-dated data files, not code.

Database

PostgreSQL via Supabase, with schema, Row-Level Security policies and Postgres functions all defined as ordered SQL migrations. Every change replays every migration against a fresh database in CI - a migration that does not apply cleanly from scratch fails the build.

API / Backend

Application logic runs through Next.js route handlers backed by Supabase's Postgres client, with the compliance engine invoked as an internal package rather than a separate network service.

Authentication & Authorization

Supabase Auth with the SSR cookie pattern, invite-link onboarding, and TOTP MFA. Authorization is enforced at the database layer via Row-Level Security across a seven-role tenancy model (admin, payroll manager, HR manager, accountant, department manager, auditor, employee), so access control cannot be bypassed by calling the API directly.

Security

All monetary values are stored as integer minor units (kobo) with rates as parts-per-million, so no floating-point number ever touches a payslip. Pay-run reversal is gated on acknowledged statutory remittance, so a run cannot be undone once money has left the building. Row-Level Security policies scope every query to what a role is allowed to see, and salary figures are masked outside authorized roles.

Challenges

Keeping statutory calculations correct under a brand-new, still-settling legal framework meant treating every rate and threshold as versioned, sourced data rather than a constant - and building a CI job that proves the database migrations replay cleanly from nothing, on every single change.

What I Learned

How to design a compliance system so a change in the law is a data update, not an application rewrite - and why integer money and effective-dated rule versions matter once payroll runs need to stay reproducible months later.

Future Improvements

Ghana (SSNIT) and Kenya (NSSF, SHIF) statutory rule sets are on the roadmap, since the compliance engine is designed as a rules layer over a common core rather than a new platform per country.

Live Demo

hr-payroll-wagebook.vercel.app

GitHub

github.com/oghenenoghie/hr-payroll

Building production-ready software, one system at a time.