PromptStack

HR and payroll

A system for employee records, contracts, leave, attendance, and payroll runs producing payslips. Tax and statutory deduction rules are regional and must be implemented for the target country.

You can change every choice once the builder opens.
Core features for the MVP
  • Employee records with contract, role, and salary history
  • Leave requests with balances, approval workflow, and a calendar
  • Attendance and timesheet capture, including overtime
  • Payroll runs producing payslips per employee per period
  • Statutory and voluntary deductions applied per employee
  • Employee self-service portal restricted to their own records
  • Audit trail on every change to pay or contract data
Left for later
  • Performance reviews and objectives
  • Recruitment and applicant tracking
  • Bank payment file export for bulk transfer
  • Statutory return submission to the tax authority

Recommended stack

SectionRecommended
LanguageTypeScript
Frontend frameworkNext.js
UI and stylingTailwind CSSshadcn/ui
BackendNext.js server
API styleServer actions
Database enginePostgreSQL
Database providerNeon
ORM and data accessDrizzle
AuthenticationClerk
Authorization and rolesRole-based access controlRow-level security
SecurityInput validationRate limitingSecurity headers and CSPSecrets managementEncryption at restAudit logsTwo-factor authentication
File storageAWS S3
Background jobs and cronInngest
Email and notificationsResend
Hosting and deploymentVercel
CI/CDGitHub Actions
Monitoring and analyticsSentry
TestingVitestPlaywright
ExtrasReports and PDF exportCSV and Excel import/exportBackupsAccessibility (WCAG)Documentation

Data model draft

Employee

A person employed by the organisation.

  • id
  • employeeNumber
  • fullName
  • email
  • nationalIdRef
  • departmentId
  • managerId
  • startDate
  • endDate
  • Belongs to one Department
  • Has many Contracts
  • Has many LeaveRequests
Contract

The terms an employee is engaged on, including pay.

  • id
  • employeeId
  • jobTitle
  • contractType
  • baseSalaryMinorUnits
  • currency
  • effectiveFrom
  • effectiveTo
  • Belongs to one Employee
LeaveRequest

A request for time off, with its approval state.

  • id
  • employeeId
  • leaveType
  • startDate
  • endDate
  • dayCount
  • status
  • approvedById
  • Belongs to one Employee
  • Approved by one Employee as manager
PayrollRun

One pay period processed for the whole organisation.

  • id
  • periodStart
  • periodEnd
  • status
  • runById
  • approvedAt
  • Has many Payslips
Payslip

One employee's pay for one period, with its breakdown.

  • id
  • payrollRunId
  • employeeId
  • grossMinorUnits
  • netMinorUnits
  • deductions
  • currency
  • Belongs to one PayrollRun
  • Belongs to one Employee