DEV Community

Cover image for Introducing Payroll Engine
Jani Giannoudis
Jani Giannoudis

Posted on

Introducing Payroll Engine

Payroll Engine is a multi-client payroll solution designed for use in different industries and countries. The software is aimed at payroll service providers and companies that need to comply with various regulations and rules. As an API-first cloud solution, Payroll Engine is the central source of payroll data and can be embedded into HR and ERP software.

The engine was designed with the following goals in mind.

  • HR and Employee - Always up-to-date employee data and fault-tolerant data collection with special case coverage.
  • Payroll Management - Continuous payroll and forecasting for predictive analytics.
  • Development and Implementation - Payroll professionals can independently develop and test the payroll application.
  • Partners and Peripheral Systems - Continuous integration of third-party data, such as tax and insurance data, and reporting of employee wages to government and partners.

Payroll Application

To achieve the desired flexibility, the software is divided into two areas.

  • Backend server with the basic services for calculating and storing payroll data.
  • Regulations as payroll applications that are executed by the backend server at runtime.

πŸ‘‰ > The article Building Domain Frameworks for Business Applications describes the implementation of this architectural model.

Backend Server

The backend server provides the model for collecting payroll data and divides the Tenant into Divisions for which Payroll is performed. Each Employee is assigned to one or more Divisions and can receive multiple pay slips per work period.

Backend Model


The isolated payroll logic is managed as a regulation, a software module that collects, calculates, and reports payroll data.

Regulation Objects

Runtime behavior is controlled with Low-Code in C# and No-Code with Actions. Clusters provide an advanced tagging mechanism for grouping and filtering the regulation objects.

πŸ‘‰ See the article No-Code and Low-Code for Payroll Software Development for more details on payroll automation.

Like image or CAD layers, regulations can be stacked in the Payroll. The sum of all regulation layers forms the virtual image of the payroll application. Following the principles of object orientation, overlay regulation layers can use, adapt and extend the objects and data of the underlying layers.

Regulations can be shared across divisions and tenants.

Regulation Composition

The structured design of the regulation layers enables centralized management and distribution of regulations and avoids data redundancy. Without affecting production data, future developments are carried out in additional regulations in a development payroll.

Payroll Services

Payroll services are divided into three areas:

  • Setup regulation development and tenant onboarding.
  • Daily business recording employee and company cases.
  • Payroll managing payroll runs.

Payroll Services

The data stored in each area is assigned to a time calendar.

The Culture Calendar controls the date and number format, including the currency. The Payroll Calendar determines the pay cycle and pay period and how years, months and weeks are handled.

Based on the calendar, phase information is handled differently:

  • Regulations are valid from the start date of the payroll period and cannot be changed during this period (Payroll Calendar).
  • Case values are kept as time values for which the validity period is determined (Culture calendar).
  • Payroll results are assigned to a specific payroll period (Payroll calendar).

πŸ‘‰ The handling of time data is described in the article Travel through Time Data.

Regulation Development

The web application provides a regulation editor that takes into account payroll layers.

Regulation Objects

Regulation Testing

Regulation testing is performed using the console application with the following areas of testing.

  • Cases: availability, composition, and validation.
  • Payroll
    • Collectors, wage types and user-defined results
    • Retroactive results
    • Multiple employees and pay periods
  • Report generation data

Automated business case testing enables test-driven development.

Case Management

When entering employee and business cases, the validity period is determined in addition to the value. This allows retroactive and future changes, as well as the unlimited undo of previous changes.

Case Management

πŸ‘‰ For an introduction to the use case driven approach, see the article Use Case Driven Development with Low-Code.

Payroll Management

Payroll can be run at any time using the case values that affect the run period. Retroactive changes are detected and values are recalculated up to the current period.

Payroll Management

Legal forecasts are multi-level and can be run more than once per payroll period. Only one legal forecast can be active per payroll period. Forecast payroll runs are unlimited and include case values entered for the current forecast.

Technologies Used

The following technologies are used.

Payroll Technologies

The backend server requires a SQL Server database and runs on Linux and Windows. The web and console application also run on Linux and Windows.

Open-Source Project

The Payroll Engine is an Open Source project (MIT license) and is currently in pre-release.

πŸ‘‰ Feedback and contributions are welcome.
πŸ‘‰ More information on the Payroll Engine GitHub Wiki.

Top comments (1)

rosaliestea profile image

Sounds great, thanks for sharing! Any employer is obliged to correctly and accurately calculate and pay wages to its employees. Nowadays, the experience of delegating this task to services such as payroll management Toronto is quite common. This is a rather troublesome process that requires knowledge about taxes and mandatory fees.