Skip to content
๐Ÿ’ธMintage Payroll

How Mintage is built โ€‹

A map of Mintage for developers, implementers and support staff. Enough to find your way around the code and talk to the people who built it.

The big pieces โ€‹

Browser
Vue 3 single-page app
โ†’
API
Laravel, one per company
โ†’
Calculation engine
NSGI packages
โ†’
Company database
one per tenant
LayerTechnologyRepository
Front endVue 3, Vite, PrimeVue components, Pinia state, vue-i18n (English + Spanish), real-time socket clientmintage-front
Back endLaravel (PHP), organised into modules (Modules/*)mintage
Domain packagespackages/NSGI/{Core, Employee, Employer, Builder, Compute} โ€” the payroll model and mathsmintage
Background workLaravel queues: closing payroll, rebuilds, imports, exports, email/WhatsApp deliverymintage
Real timeWebSocket events push row updates and progress (close, rebuild, import) to every open browserSocket module
PDFsHTML templates rendered by WeasyPrint servers, with failoverRemuneration
Sign-inStytch (magic link, password, TOTP) and Microsoft Entra ID single sign-onStytch, Consent

One company = one tenant โ€‹

Each customer company is a with its own database and configuration: country, currency, enabled modules, sign-in method, integrations. Tenants run the same code; several share a server. The single web front end works out which tenant's API to call from the address it was opened on.

Users, roles, employees and settings all belong to one tenant. Tenants only talk to each other through explicit, credentialed machine clients โ€” for example to move an employee between companies (Exchange) or edit linked payrolls together.

Inside the back end โ€‹

mintage/
โ”œโ”€โ”€ Modules/                 โ† features, each with routes, controllers, jobs, migrations
โ”‚   โ”œโ”€โ”€ Remuneration/        โ† the payroll: grids, editing, close, net guard, exports
โ”‚   โ”œโ”€โ”€ Settings/            โ† company set-up, fields, tax versions, proration
โ”‚   โ”œโ”€โ”€ Consent/  Stytch/    โ† users, roles, sign-in
โ”‚   โ”œโ”€โ”€ Epayslips/           โ† payslip delivery
โ”‚   โ”œโ”€โ”€ LoanManager/  Import/  AgentGateway/  โ€ฆ
โ”œโ”€โ”€ packages/NSGI/
โ”‚   โ”œโ”€โ”€ Core/                โ† shared models, rounding, resolvers
โ”‚   โ”œโ”€โ”€ Employee/  Employer/ โ† people, loans, children, employment events
โ”‚   โ”œโ”€โ”€ Builder/             โ† orchestrates a payroll rebuild (gross โ†’ deductions โ†’ net)
โ”‚   โ””โ”€โ”€ Compute/             โ† pure calculators: PAYE, NIS per country/year/frequency
โ””โ”€โ”€ app/                     โ† console commands, shared services

The full list is in the modules catalogue, and the maths in the calculation engine.

Inside the front end โ€‹

mintage-front/src/
โ”œโ”€โ”€ pages/                   โ† file-based routes
โ”‚   โ”œโ”€โ”€ monthly/ bi-monthly/ fortnightly/ weekly/   โ† payroll, nis, paye, loans, import, exportโ€ฆ
โ”‚   โ”œโ”€โ”€ team-members/  settings/  customization/  tools/  analytics/  resources/
โ”œโ”€โ”€ components/Payroll/      โ† the grid, toolbar, exports, imports, timesheet
โ”œโ”€โ”€ components/Dialog/       โ† cell editors, Net Guard, Finalize Payroll, Adjust Net Pay
โ”œโ”€โ”€ logic/                   โ† navigation, role permissions, page access
โ””โ”€โ”€ locales/                 โ† every user-facing label (en / es)

The sidebar menu (logic/navigation.ts) is the single source of truth for page access: each item can require a permission, a role or a company option, and a page hidden from the menu shows No access if opened directly.

Life of one edit โ€‹

๐Ÿ–ฑ๏ธ
Step 1 of 4

A user edits a cell

The grid opens a dialog for that field and sends the new value to the API for that frequency, year and period.

Where data protection lives โ€‹

  • Personal identifiers (TIN, NIS, ID, date of birth, address, phone) are encrypted at rest and searchable only through hashed indexes. They are excluded from activity logs.
  • Payslip PDFs can be password-protected. A payslip isn't sent at all if its password can't be formed.
  • Every sensitive action โ€” closing, purging, granting roles, AI-agent writes โ€” is permission-checked and audited.

Built with the Invernisoft KB house.