← MHD Andra Fahreza
--:-- UTC+7CV ↓
Case study · Retail F&B · Multi-branch

Centralized HR, attendance & payroll for a multi-branch bakery

One centralized platform for every branch: fingerprint attendance, automated payroll with snapshotted slips, per-position KPI, and a per-branch license/billing kill-switch — unified owner and branch dashboards behind role-based access.

ROLE
Sole architect & engineer
SECTOR
Retail F&B · Multi-branch
STATUS
Live in production

CONTEXT

A single Laravel and PostgreSQL backend serves every branch, with a Next.js frontend used by both branch staff and the owner. Multi-tenancy is enforced at the API layer: each branch only ever sees its own data, while the owner works across all branches from the very same pages, differentiated purely by permission.

The platform covers the full operational loop — fingerprint-machine attendance with automatic shift matching, overtime and leave approvals, meal-allowance and cash-advance tracking, monthly payroll with snapshotted slips, and dynamic per-position KPI. A licensing and billing layer evaluates each branch's subscription and payments and can suspend or lock a branch as a kill-switch, blocking dashboards, reports and payroll while keeping raw attendance recording alive so no work hours are ever lost.

Access is governed by roles attached to positions: assigning a role to a position automatically syncs the permissions of every linked account. The whole system is containerized with Docker for VPS deployment.

THE PROBLEM

A growing bakery ran several branches, each recording attendance, payroll and staff performance on its own paper and spreadsheets. The owner had no consolidated view across branches, no way to enforce a single policy, and no lever to pause a branch that fell behind on its subscription.

CONSTRAINTS

Branches depend entirely on the network — if the backend is unreachable a branch cannot operate, so raw attendance had to keep recording even when everything else is locked. Data isolation is non-negotiable: a branch account must never read another branch's data, while the owner needs a single cross-branch view without duplicating every page.

WHAT I DESIGNED

One Laravel and PostgreSQL backend with a Next.js frontend, multi-tenant by branch and scoped at the API middleware. Fingerprint machines push punches straight to the server and a shift-matcher infers the nearest schedule. Payroll snapshots every slip so historical pay never recalculates. Roles are attached to positions and synced to each linked account, and a licensing service turns subscription and payment state into an active / suspended / locked kill-switch.

architecture diagram

Outcome

Every branch now runs on one codebase with fully isolated data, unified owner and branch dashboards behind role-based access, automated payroll and per-position KPI, and a billing-driven lock that suspends dashboards, reports and payroll while never dropping raw attendance.

STACK

LaravelNext.jsPostgreSQLSanctumDocker

Have a system that needs building — or fixing?

Tell me the problem and the constraints. I'll tell you honestly whether I'm the right person and how I'd approach it.

Download CV ↓← See more work