LilyByte

PayWise

Product & UX/UI designFrontend engineeringBackend & APIDatabase & multi-tenancyAuth & role-based accessPDF & document pipelineCloud storageDevOps (planned)

PayWise (internally FedimiBustePaga, “Fedimi payslips”) is a full-stack payroll and workforce-management platform LilyByte designed and built for Fedimi, a labour consultancy. It brings an entire payroll operation (the consultancy, its accountants, their client companies and every one of those companies’ employees) under a single, role-aware system. Accountants manage the workforce of the companies assigned to them, record payroll events, generate and distribute payslips, and track attendance; the consultancy and platform owners get a bird’s-eye view of the whole network.

The product is built around the real Italian labour-law domain it serves: national collective agreements (CCNL), ATECO business classifications, VAT numbers, fixed- and open-ended contracts, and the formal documents that accompany every hire, termination, resignation, extension or contract change. LilyByte delivered the whole product end-to-end: a Next.js frontend and an Express/MongoDB API with an S3-backed document pipeline.

The challenge

Payroll software is unforgiving: it is multi-tenant by nature, document-heavy by law, and every number on screen has to reconcile with a real employment record. Several things made this hard.

Many roles, one hierarchy. A payroll consultancy is a tree: the platform owner oversees consultancies, each consultancy oversees its accountants, each accountant manages a set of client companies, and each company has its employees. Every role needs a different dashboard, different permissions and a different slice of the same data, all from one login.

A document for every action. In Italian payroll practice a hire, termination, resignation, contract extension or transformation is not just a status change: each is backed by a formal PDF. The platform had to capture those events and their supporting documents, and store them reliably.

Payslips at scale. The core deliverable is the cedolino, the monthly payslip. PayWise had to generate, store and distribute payslip PDFs per company and per consultancy, and make them retrievable at any time.

Attendance that respects the calendar. Monthly attendance has to account for worked hours, leave, sickness, rest days and public holidays (which in Italy vary by locality) across every employee.

Live operational insight. Each role’s dashboard had to turn raw records into monthly figures (headcount, hires, terminations, resignations and contract transformations) that always match the underlying data.

The solution

PayWise pairs a role-aware Next.js frontend with an Express/MongoDB API and an S3-backed document pipeline, unified by a JWT-secured, multi-tenant permission model.

001

A role-aware Next.js frontend

The client is built on Next.js 15 (App Router) with React 19, the NextUI component system and Tailwind CSS. A single authenticated dashboard shell renders a different sidebar, set of pages and data view for each of the six roles: platform master, consultancy (associazione), accountant (commercialista), company, sole trader and onboarding. Chart-ready monthly statistics are computed server-side and surfaced through clean summary cards and tables; date-holidays drives an accurate attendance calendar.

002

A payroll & document API

The backend is an Express REST API on MongoDB via Mongoose, secured with JWT and bcrypt. Payroll documents are first-class: payslips and workforce-action forms are generated as PDFs (jsPDF / pdf-lib) and stored in Amazon S3 through a Multer–S3 pipeline, while transactional email (Nodemailer) and structured logging (Winston) round out the operational surface.

003

One multi-tenant data model

A single set of collections (users, companies, employees, payroll actions, payslips and attendance) is scoped by consultancy and by the accountant–company assignment. The same records drive every role’s dashboard: the accountant sees monthly movements for the companies they manage, the consultancy sees its accountants and companies aggregated, and the master sees the entire platform, all reconciled from one source of truth.

Key features

Role-aware dashboards

Every role lands on a dashboard tailored to its place in the hierarchy. The consultancy sees its associated accountants, client companies and total workforce, plus per-company monthly movements. The accountant sees only the companies assigned to them, with hires, terminations, resignations and transformations for the month. The platform master sees every consultancy, company and employee across the network, with downloadable reports.

Workforce management

For each company an accountant works from a live employee register (names, contract type and level, and status. From there they record the full range of payroll events: a new hire through a guided form, or a termination, resignation, contract extension or transformation on an existing employee) each captured together with its supporting PDF document.

Attendance tracking

Attendance is recorded on a monthly grid, one employee at a time: worked hours and day type for every day of the month, with quick-fill tools and running totals for worked days, leave, sickness and other absences. Public holidays are resolved automatically from the calendar, so the month always reflects real non-working days.

Payslip management

The cedolini area is where payroll output lives: monthly payslip PDFs organized per company and at the consultancy level, generated and stored in cloud object storage and downloadable on demand. It is the shared surface between the consultancy and its client companies.

Company onboarding

New client companies enter the system through a structured registration flow (as an incorporated company or a sole trader) capturing legal and operating addresses, VAT number, ATECO code, the applicable CCNL and the supporting documents. Companies can self-register, and accountants can insert a company directly.

Technology stack

001

Frontend

  • Next.js 15 (App Router) with a single role-aware dashboard shell
  • React 19
  • NextUI component system + Tailwind CSS for a consistent, responsive design
  • Chart.js (react-chartjs-2) for statistics · Framer Motion · lucide-react / react-icons · react-hot-toast
  • date-holidays for an accurate, locale-aware attendance calendar

002

Backend & API

  • Node.js with Express: REST API
  • MongoDB with Mongoose ODM: multi-tenant, role-scoped data model
  • JWT authentication with bcrypt-hashed credentials; role-based access control
  • Nodemailer transactional email · Winston (+ Loggly) structured logging

003

Documents & storage

  • jsPDF / jspdf-autotable and pdf-lib for payslip and report generation
  • Amazon S3 via Multer–S3 (AWS SDK v3) for payslip and workforce-document storage
  • Busboy / Multer upload handling for supporting PDFs on every payroll action

Work categories

The build spanned the full product lifecycle across these disciplines:

001

Product & UX/UI designdashboards and flows for six roles under one design system.

002

Frontend engineeringNext.js role-aware client, statistics views and attendance calendar.

003

Backend & APIExpress REST services and payroll business logic.

004

Database & multi-tenancyMongoDB schema design scoped by consultancy and assignment.

005

Auth & access controlJWT sessions, password hashing and role-based routing.

006

Document pipeline & cloud storagePDF generation and S3-backed document management.

007

DevOps & deploymentproductionization plan (below).

Production & rollout

PayWise was delivered to Fedimi and is being rolled out to the consultancy’s accountants and client companies. The following describes the intended production architecture and the operational targets set for it.

001

Deployment architecture

The frontend ships to a managed edge platform (Vercel) with image optimization, while the Express API runs as a containerized service behind a load balancer. Data lives on MongoDB Atlas with automated backups; payroll PDFs are served from Amazon S3 behind a CDN with signed, expiring URLs so documents are never publicly addressable. A GitHub Actions pipeline handles CI/CD, and the stack is instrumented with Winston/Loggly logging, error tracking and uptime monitoring. Access is locked down with a strict CORS origin and JWT sessions.

002

Hardening for real payroll data

Because the platform handles employees’ personal data and legal documents, the rollout adds encryption at rest for stored PDFs, rate limiting and input sanitization at the API edge, HTTP-only secure session cookies, and a full audit trail on every payroll action. Role-scoped queries guarantee an accountant can only ever reach the companies assigned to them, and payslip links are short-lived and single-tenant. GDPR-aligned retention and export controls govern how long documents are kept.

Target outcomes

Rollout goals were framed as concrete targets:

All-in-one

Clients and accountants, unified

Onboard the consultancy’s full book of client companies and their accountants onto a single platform.

Self-serve

Self-service payslips, every company

Replace manual payslip distribution with on-demand, self-service downloads for every company.

<1 min

To record any contract change

Cut the time to record a hire, termination or contract change (with its document) to under a minute.

<1 sec

Dashboard aggregations, full network

Sub-second monthly dashboard aggregations across the full network of companies and employees.

99.9%

Uptime, with automated rollback

99.9% target uptime with automated backups, encrypted document storage and one-click rollback.

Note: the deployment architecture and figures in this section describe the planned production setup and operational targets for the rollout, not measured results.

LilyByte

We build the product. You build the business.

You bring the idea. We bring the team, the process and the experience to make it real.

Email

info@lilybyte.com

Phone number

+393514397419

Social media

Instagram

LinkedIn

Legal notice and privacy

©2026. All rights reserved