Delivered remotely for a business based in Sydney, Australia. Names withheld by agreement.
Project Overview
Industry: Human Resources & Payroll Operations
Solution scope: An enterprise HR and payroll management platform built with Java, Spring Boot, Angular, TypeScript, PostgreSQL, and Redis to unify employee onboarding, effective-dated compensation, leave balances, rule-based pay calculation, and statutory reporting.
Context: Employers operating across Sydney and broader Australian jurisdictions navigate intricate employment awards, tiered overtime multipliers, tiered withholding schedules, and strict superannuation obligations. When HR records, timesheet approvals, and payroll calculations live in disconnected tools, payroll teams spend each cycle reconciling CSV exports under tight banking cutoffs. Engineering an integrated HR and payroll platform gives operations a deterministic calculation pipeline backed by complete audit history.
HR & Payroll Bottleneck
Fragile spreadsheet-driven pay runs. Calculating penalty rates, public holiday loadings, and mid-cycle salary adjustments in external spreadsheets introduces silent formula errors that trigger underpayment remediation liabilities and employee distrust.
Disconnected leave and onboarding workflows. When approved annual leave, parental leave, or bank-detail updates fail to propagate into payroll before cutoff, payroll clerks face manual retro-adjustments in subsequent cycles.
Lack of effective-dated employment history. Systems that overwrite an employee's salary or department directly make back-pay calculations and historical cost-center reporting nearly impossible.
High-friction approval and exception review. Reviewing hundreds of payslip variances in flat tabular exports slows down sign-off, forcing payroll managers to spot anomalies manually before releasing bank payment files.
Architectural Strategy
Model HR data with effective-dated timelines. Positions, compensation grades, working-hour patterns, and cost-center splits are stored as non-overlapping date-bounded records rather than mutable single rows. Both back-pay recalculations and future-dated promotions work natively from the same schema.
Isolate payroll math inside a pure Java calculation kernel. Tax brackets, leave accrual formulas, and award overtime evaluators run as stateless, deterministic Java functions consuming immutable inputs (effective employment terms, approved hours, rule versions). This makes every pay calculation unit-testable and reproducible on demand.
Use Spring Batch and Redis for reliable pay-run execution. Computing draft payslips across an entire workforce executes asynchronously in chunked Spring Batch partitions, while Redis locks ensure only one calculation or finalization workflow mutates a given pay group simultaneously.
Empower variance review in Angular. Rather than hiding totals until export, the Angular workspace surfaces side-by-side comparisons against each employee's prior pay cycle, highlighting spikes in overtime, negative leave balances, or missing tax declarations before bank files generate.
Core Capabilities
- Unified employee & contract lifecycle: Tracks onboarding checklists, right-to-work documents, effective-dated role changes, salary bands, and termination payout rules.
- Configurable leave & accrual ledger: Automates annual, personal, and long-service leave accruals per hour worked or pay cycle, routing manager requests through calendar-aware approval queues.
- Versioned award & tax rule engine: Evaluates base pay, shift allowances, overtime tiers, superannuation/pension contributions, and progressive income tax schedules using effective-dated rule tables.
- Interactive draft pay-run & variance inspection: Lets payroll officers simulate pay runs, inspect line-by-line calculation breakdowns, apply one-off bonuses or garnishments, and resolve flagged exceptions.
- Bank disbursement & accounting exports: Produces validated ABA direct-entry bank files alongside aggregated general ledger journal exports mapped by department and cost center.
- Employee self-service portal: Provides staff with secure access to historical PDF payslips, annual income statements, leave balance forecasts, and self-service contact updates.
Technical Architecture
Spring Boot service & security tier. Domain modules separate Employee Master, Leave & Accruals, Rule Engine, and Pay Run Orchestration. Spring Security enforces strict role segregation so HR coordinators can view organizational charts without accessing executive pay details or releasing bank files.
Spring Batch calculation pipeline. Initiating or recalculating a pay run queues a Spring Batch job that partitions employees into chunks, evaluates gross-to-net components using Java BigDecimal, and stores draft payslip line items in PostgreSQL.
PostgreSQL temporal & ledger store. Effective-dated exclusion constraints prevent overlapping compensation timelines per employee, while finalized pay runs lock payslip rows immutably and append leave accrual credits/debits into an unbroken ledger.
Angular TypeScript enterprise client. Built with strict TypeScript models, Angular Reactive Forms, and virtualized review tables, the UI separates an administrative HR/payroll console from a clean employee self-service portal.
Flow: HR / Payroll officer (Angular UI) → Spring Security RBAC gate → Spring Boot & Spring Batch rule engine → PostgreSQL temporal HR & pay ledger → Async PDF payslip & ABA bank file generator
Technology Stack
| Category | Technology |
|---|---|
| Core language | Java 21 delivering BigDecimal monetary precision and strongly typed domain rules |
| Backend framework | Spring Boot powering modular HR services, Spring Security RBAC, and Spring Batch pay runs |
| Frontend framework | Angular with RxJS and reactive forms supporting dense payroll review grids and employee self-service |
| Primary database | PostgreSQL storing effective-dated employment contracts, leave ledgers, and immutable pay-run lines |
| Caching & coordination | Redis holding distributed pay-run locks, session state, and compiled statutory tax brackets |
| Batch orchestration | Spring Batch executing parallelized employee pay calculations with step-level restartability |
| Document generation | Asynchronous PDF payslip and annual payment summary compilation encrypted at rest |
| Bank & ledger exports | Structured ABA bank payment file generators and general ledger journal CSV/API exports |
| Deployment | Docker containers running stateless API replicas and dedicated payroll calculation workers |
| Security & auditing | Field-level encryption for bank/tax identifiers paired with immutable payroll change logs |
Engineering Trade-offs & Solutions
| Challenge | Solution |
|---|---|
| Back-dated salary increases broke historical period reporting when rows were overwritten | Implemented effective-dated temporal tables with PostgreSQL constraints so historical pay runs retain exact context. |
| Recalculating an entire pay run after fixing one employee's hours wasted compute | Enabled selective single-employee recalculation within draft pay runs while preserving unchanged drafts. |
| Statutory tax and superannuation changes risked corrupting prior-year payslip reprints | Versioned all statutory rate tables by effective date and stored itemized line-level calculation results on finalization. |
| Large payroll runs risked browser timeouts during preview generation | Executed batch pay calculations asynchronously via Spring Batch with live Angular progress polling. |
| Broad HR access risked exposing sensitive salary and banking fields to unauthorized staff | Layered field-level database encryption with granular Spring Security attribute policies and masked UI defaults. |
| Bank file discrepancies after pay-run approval could cause duplicate disbursements | Enforced one-way Draft → Approved → Finalized state transitions under Redis locks before generating ABA files. |
Security & Reliability
Sensitive PII encryption and masked audit trails. Tax identifiers, bank routing numbers, and compensation records are encrypted at the application layer with rotating keys. Every read reveal or edit of banking details records the acting administrator, timestamp, and before/after metadata.
Four-eyes pay-run sign-off. Configurable governance rules separate the user who prepares and validates a draft pay run from the finance controller who approves finalization and downloads disbursement files.
Deterministic recovery on batch interruptions. Because Spring Batch checkpoints chunk execution in PostgreSQL, container restarts or transient database glitches never leave partial payslip totals unmarked.
Performance & Scale
Partitioned worker execution. Pay-run jobs divide work across configurable employee chunks processed concurrently by Spring Batch worker threads, keeping end-to-end calculation windows short even as headcount scales across multiple entities.
Pre-compiled tax and rule caches. Active tax brackets and award lookup tables load into Redis memory at batch startup rather than querying relational configuration tables for every individual payslip line.
Operational Outcomes
- Predictable, auditable pay cycles: Deterministic Java rule evaluation and automated variance alerts eliminate manual spreadsheet checks before banking cutoffs.
- Unified HR-to-finance handoff: Approved leave, new hires, and pay-run general ledger journals flow directly from one core without manual CSV massaging.
- Protected statutory compliance: Effective-dated contracts and versioned tax tables ensure historical pay records remain defensible under regulatory review.
- Self-service efficiency: Employees retrieve payslips and submit leave requests independently, freeing HR and payroll staff from routine status inquiries.