← All projects

(Case study · 01)

Paylio HRPayroll & HR SaaS for Bangladesh

By Md. Habibur Rahman Shohel · Founding engineer · 2026

Paylio HR preview

a disbursed payroll run: six approval steps, income tax worked out and reconciled

(The big thing)

HR and payroll software for Bangladeshi companies, built end to end: it calculates salaries under local law and pays them over bank, BEFTN, bKash and Nagad.

(What a company gets)

  • Payroll, income tax and provident fund calculated in one run, then paid over bank, BEFTN, bKash or Nagad.
  • One inbox for every approval — leave, overtime, expenses, travel, loans.
  • Employees see their payslips and request leave in Bangla or English, on their phone.

Payroll in Bangladesh is not generic payroll with the currency swapped: income tax, provident fund, gratuity and festival bonuses follow local law, and salaries go out over banks, BEFTN and mobile wallets. Paylio does all of it for many companies on one system, so the hard part is making every run exact while no company ever sees another's data.

Role
Founding engineer
Type
Product · Serviq
Year
2026
Stack
Next.js · FastAPI · PostgreSQL · Redis · Dramatiq
Result
Runs payroll for Serviq and 5+ client companies · pays staff by bank, bKash or Nagad · in production since Sep 2026, maintained by me

(By the numbers)

p95 response at 50 users (was 1.9 s)
207 ms
requests a second per API core (was ~12–15)
~22
CPU per request
−36%
automatic backend tests
~4,900
companies running their payroll on it
5+
in production since, maintained by me
Sep 2026

The response and throughput figures are a laptop benchmark: one API core, 10,000 seeded employees and 420,000 attendance records, 0 errors — 16 Nov 2026. Serviq runs its own payroll on Paylio in production, alongside client companies.

Response time (p95) as users grow — before and after the fixesBeforeAfter
01.0 s2.0 s3.0 s10255075Concurrent usersBefore: 115 ms at 10 usersBefore: 153 ms at 25 usersBefore: 1.9 s at 50 usersBefore: 2.6 s at 75 usersBeforeAfter: 177 ms at 10 usersAfter: 161 ms at 25 usersAfter: 207 ms at 50 usersAfter: 2.2 s at 75 usersAfter1.9 s → 207 ms
Response time (p95) as users grow — before and after the fixes
Concurrent usersBeforeAfter
10115 ms177 ms
25153 ms161 ms
501.9 s207 ms
752.6 s2.2 s

The slowdown point moved from 25–50 users to 50–75 per core. Same laptop, same 3-minute steps.

(What I built)

  1. 01

    Salaries paid in one run

    Tax, provident fund and bonuses are calculated, reviewed, then paid over bank, BEFTN, bKash or Nagad.

  2. 02

    Fast with 50 users at once

    At 50 users on one API core, responses fell from 1.9 s to 207 ms and CPU per request by 36% (p95 load test).

  3. 03

    Each company sees only its own data

    Many companies share one system, and every request is limited to the caller's organisation and checked for permission.

  4. 04

    Employee details kept private

    National ID, bank, tax and salary details are encrypted in the database and never written to logs.

  5. 05

    One inbox for every approval

    Leave, overtime, expenses, travel and loans are approved in one place, with an audit log.

  6. 06

    Works in Bangla and English

    Employees see their payslips and request leave in Bangla or English, on their phone.

All features in detail (9)
  • 01Payroll runs that calculate, review and disburse — TDS, provident fund, gratuity, WPPF, arrears, festival bonuses and off-cycle runs, with payslip PDFs
  • 02Salary disbursement over bank transfer, BEFTN, bKash and Nagad from the same approved payroll
  • 03Attendance with geofenced check-in, approved devices, shifts, rosters, overtime, regularisation and work-from-home
  • 04One approvals inbox across leave, regularisation, work from home, overtime, expenses, travel, loans, assets and comp-off, with delegation and an audit log
  • 05Leave policies, balances, encashment and year-end reset configured around the Bangladesh Labour Act
  • 06Employee lifecycle — onboarding, documents, change requests, resignation, offboarding and full-and-final settlement
  • 07Role-based access: 139 permissions, 7 built-in roles and custom roles each company defines for itself
  • 08Statutory reports and exports — PF, eTDS, Forms XI and XII — plus an AI assistant, e-signatures and real-time notifications
  • 09Bangla and English throughout the employee experience

Process

(Problem → what I did)
  1. 01

    Problem

    Many companies share one database, so a single missed filter would show one company's salaries to another.

    What I did

    • Every request is checked for permission on the server and limited to the caller's company — a hidden button is never the guard.
    • Kept data access in one layer (router → service → repository), so the rule lives in one place that can be reviewed.
  2. 02

    Problem

    Knowing how far one server goes before a large company signs up, not after.

    What I did

    • Load-tested with 10,000 employees, found the slow paths with a profiler, and cut CPU per request by 36% — at 50 users the slowest responses fell from 1.9 s to 207 ms.
  3. 03

    Problem

    Around 1,200 API routes shipped daily by a small team, without the screens and the API drifting apart.

    What I did

    • The frontend's types are generated from the API itself, so a changed response breaks the build instead of a screen in production.
    • Every fix starts with a failing test — about 4,900 backend tests run before anything reaches staging.
Show all 5 steps
  1. 04

    Problem

    Payroll must be exact to the poisha, and a job that runs twice must never pay anyone twice.

    What I did

    • All money is stored as whole paisa, never floating point.
    • Each background job checks its record's status and moves it in one step, so a retry finds the work already done (idempotent workers).
  2. 05

    Problem

    National ID, bank, tax and salary details must stay protected and never leak into logs.

    What I did

    • Personal data is encrypted in the database and kept searchable without decrypting it (blind indexes), and never written to logs.

How it's built

The moving parts, from the people using it down to the data.

HR, finance & employees

  • Next.js app

    desktop and phone · Bangla & English

API

  • FastAPI

    permission check → organisation scope, on every request

  • Supabase Auth

    signs users in, issues the token

Data & jobs

  • PostgreSQL

    every row tagged by company · personal data encrypted

  • Redis

    job queue & locks

  • 4 background workers

    payroll · exports · notifications · reminders

  • File storage

    payslips, documents, exports

One backend serves every company. Each request is checked for permission and scoped to the caller's organisation before it touches any data.

The product

5 screens from the real product. Click any screen to see it full size.

a disbursed payroll run: six approval steps, income tax worked out and reconciled

payslip with salary components, provident fund and income tax

salary disbursement: BEFTN checks, 22 of 22 payments confirmed

one approvals inbox across every request type

employee directory with department, role and status

(On mobile)

Works just as well on the phone.

Every screen was built and checked on small screens too — the same product adapts cleanly from phone to desktop.

Paylio HR on mobile

(Shipped)

Paylio is deployed at mypaylio.com and has been in production since September 2026 — Serviq runs its own payroll on it, alongside 5+ client companies — with every change going through a staging copy first.

Over 2,500 pull requests have been merged since the codebase started in April 2026. The bank-routing defects found in its payroll data became BD Bank Routing, the open dataset in this portfolio.

(Work like this)

(Guide from this project)How monthly salary tax (TDS) is worked out in Bangladesh5 min read
(Guide from this project)Paying salaries over bank, BEFTN, bKash and Nagad from one payroll4 min read

Next project

Serviq Mail

Need something like Paylio HR? I build web, mobile and backend — end to end.

Hiring? See my experience →