π’ HLS HRMS Kiosk
ONLINE
--:--:--
Tap any employee card to simulate camera face capture & attendance punch
Loading staff roster from database...
Employee Name
Designation β’ Department
Dashboard Overview
Live metrics of today's attendance, on-time arrivals, late arrivals, half-days, and pending leaves.
Daily Attendance Ledger
Master facial photo comparison against check-in live snaps, punch logs timeline, break durations.
Employee Directory
CRUD management of staff profiles, registration photos for facial recognition, department codes.
Shift & Policy Engine
Configure office opening hours, 15-minute grace period, half-day min thresholds, and overtime rules.
Holidays & Leaves
Manage public calendar holidays and approved employee leaves (Casual, Sick, Paid, Unpaid).
Monthly Payroll & Reports
Audit monthly payable days formula (3 late = 0.5 day deduction) with instant PDF and CSV exports.
Live Endpoint & Integration Diagnostics
Runs real HTTP requests against backend PHP APIs, MySQL database, and mPDF rendering engine.
π Project File Architecture
Complete directory mapping explaining which file and folder performs which role:
hrms-hailp/
βββ database/
β βββ schema.sql # 8 MySQL tables (admins, employees, attendance, punch_logs, shift_settings, holidays, leaves, authorized_devices)
β
βββ backend/
β βββ .htaccess # Security headers, deny direct directory listings, block config/helpers
β βββ composer.json # mPDF dependency for high-resolution A4 PDF payroll audits
β βββ config/
β β βββ database.php # PDO MySQL singleton connection with utf8mb4 & error mode
β β βββ constants.php # JWT secrets, directory paths (uploads, exports), punch types
β βββ helpers/
β β βββ jwt.php # HMAC-SHA256 JWT encoder, decoder & verification
β β βββ response.php # JSON responses, CORS headers, device token & admin auth guards
β βββ api/
β β βββ kiosk/
β β β βββ bootstrap.php # GET: Initial sync of active employees, shift rules, holidays
β β β βββ punch.php # POST: Records attendance punch, auto-computes late/on-time/hours
β β β βββ sync_offline.php# POST: Batch synchronizes punches stored during network drops
β β βββ admin/
β β βββ auth/
β β β βββ login.php # POST: Admin login, password_verify() -> signed JWT
β β βββ employees.php # GET/POST/PUT/DELETE: Employee profiles & registration photos
β β βββ shift.php # GET/POST: Office timings, grace periods, OT thresholds
β β βββ holidays.php # GET/POST/DELETE: Public and company holidays
β β βββ leaves.php # GET/POST/DELETE: Employee leave applications & approvals
β β βββ attendance/
β β β βββ daily.php # GET: Daily ledger with master vs live face photo comparison
β β βββ reports/
β β βββ monthly.php # GET: Aggregates monthly payable days, lates, hours
β β βββ export_pdf.php # GET: Streams mPDF generated executive PDF attendance sheet
β β βββ export_csv.php # GET: Generates payroll CSV spreadsheet export
β βββ uploads/ # Local storage for photos (registered/ and punches/YYYY/MM/DD/)
β βββ exports/ # Local storage for generated PDF & CSV payroll reports
β
βββ admin/ # Vanilla HTML5/CSS3/ES6 Administration UI
β βββ login.html # JWT sign-in page
β βββ dashboard.html # Today's attendance counters & staff status summary
β βββ attendance.html # Daily audit table with modal punch timeline & face comparison
β βββ employees.html # Employee CRUD table with photo upload dialog
β βββ shift.html # Shift policy editor form
β βββ leaves.html # Holiday calendar & leave tracker
β βββ reports.html # Monthly payroll summary table with 1-click PDF/CSV export
β βββ assets/
β βββ css/admin.css # Modern CSS styles for sidebar, tables, cards & badges
β βββ js/admin.js # Auth guards, apiFetch wrapper, clocks, modals, toast
β βββ img/placeholder.png # Default avatar for staff without profile pictures
β
βββ kiosk/ # React Native / Expo Tablet Kiosk App
βββ App.js # Navigation container (Stack navigation: Home -> Camera)
βββ app.json # Expo configuration (landscape tablet orientation, permissions)
βββ src/
βββ constants.js # API URLs, device tokens, color palette
βββ services/
β βββ db.js # Expo-SQLite local storage for offline punch queuing
β βββ api.js # API calls: bootstrap, punch upload, offline batch sync
βββ screens/
βββ HomeScreen.js # Staff roster grid, search filter, online/offline status
βββ CameraScreen.js # Face capture, countdown, liveness, punch submission
β‘ Business Rules & Mathematical Engine
1. Punch State Machine
CHECK_IN β BREAK_OUT β BREAK_IN β CHECK_OUT
The system automatically identifies the required punch step based on prior punches logged for the day.
2. Punctuality & Grace Period
Office Open: 09:30 AM | Grace Period: 15 Minutes (until 09:45 AM). Arrival after 09:45 AM marks the employee as LATE.
3. Monthly Payable Days Calculation
Payable = Present + Holidays + PaidLeaves - βLate / 3β Γ 0.5 - 0.5 Γ HalfDays
- Every 3 late arrivals penalize 0.5 day of salary.
- Working under 4.5 hours qualifies as Half-Day (0.5 day deduction).
- Approved paid leaves and recognized holidays count towards payable days.
4. Anti-Proxy Facial Audit
Every single punch takes a live snapshot. In the Admin Daily Ledger, HR managers can instantly compare the registered profile photo side-by-side with the check-in and check-out photos to prevent buddy-punching.