HR and workforce
Fariq
The daily people-work of a company in one system: employees, attendance, leave with real balances, document and visa expiry, and monthly payroll with Gulf end-of-service gratuity.
At a glance
- 4
- roles: admin, HR, manager, employee
- 4
- languages with Arabic RTL
- 1
- self-service page per employee
- 2
- databases: SQLite or MySQL
The goal
HR in many companies runs on spreadsheets and WhatsApp: balances are wrong, visas expire unseen and payroll takes days. Fariq calculates time, leave and pay from one set of data and warns before papers expire.
What it shows
- Employees
- Full record with contract, manager, salary parts, bank details and service length.
- Attendance
- Worked time, late minutes and overtime calculated from the working time.
- Leave
- Types, yearly balances, request and approval, a "who is off" calendar.
- Documents
- Passport, visa and permits with automatic expiry warnings.
- Payroll
- Monthly run with overtime and deductions, printable payslips and a bank file.
- Gratuity
- End-of-service benefit calculated by the Gulf rules.
Security controls
| Control | What it stops |
|---|---|
| Managers see only their team | People reading the data of other teams. |
| Employees see only themselves | Salary and documents of colleagues. |
| Prepared statements (PDO) | SQL injection. |
| CSRF token and login throttling | Forged actions and password guessing. |
| Locked approved payroll | Changes to a payroll that is already paid. |
Try it yourself
# PHP 8.1+ with pdo_sqlite (or MySQL). No framework, no Composer, no build step.
php -S 127.0.0.1:8080 # or upload the folder to any PHP hosting
# open http://127.0.0.1:8080/install.php → SQLite or MySQL → the first admin account
php seed.php # optional: demo data with users for every roleWhat I learned
- Payroll must be explainable: every number on a payslip comes from a rule you can show.
- Expiry warnings are the most loved feature: a late visa is a real problem.
- Self-service removes most HR questions.