PeopleSync is a mobile & web-based employee attendance application designed as an HRIS MVP with a focus on data accuracy, auditability, and backend scalability.
| Menu | Description | Status |
|---|---|---|
| Data Karyawan | Employee CRUD with department assignment, soft delete support | โ |
| Menu | Description | Status |
|---|---|---|
| Kehadiran Harian | Daily attendance with manual entry, late/early detection | โ |
| Review Kehadiran (Harian) | Daily attendance review with permission-based access | โ |
| Review Kehadiran (Bulanan) | Monthly attendance review/recap | โ |
| Hari Libur | Holiday management for attendance calculation | โ |
| Jadwal Kerja | Work schedule per day of week (pre-seeded, edit only) | โ |
| Lokasi Kehadiran | Geofencing locations with interactive map & radius | โ |
| Menu | Description | Status |
|---|---|---|
| Department | Department hierarchy with parent-child structure | โ |
| Leave | Leave/time-off requests with approval workflow | โ |
| Overtime | Overtime requests with approval workflow | โ |
| Menu | Description | Status |
|---|---|---|
| Data Admin | Admin user management (role-based visibility) | โ |
| Feature | Description |
|---|---|
| Clock-in / Clock-out | GPS & photo-based attendance via mobile |
| Attendance History | View personal attendance records |
| Leave Request | Submit leave/time-off requests |
| Overtime Request | Submit overtime requests |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Flutter (Mobile App) โ
โ people-sync-mobile [Planned] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS + JWT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Laravel 12 API (JWT + Spatie RBAC) โ
โ /api/v1/* [Implemented] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Filament v4 Admin Panel โ
โ /admin [Implemented] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PostgreSQL โ
โ [Implemented] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Repository | Purpose | Status |
|---|---|---|
people-sync |
Backend API + Admin Panel (Laravel + Filament) | โ Current |
people-sync-mobile |
Mobile App for Employees (Flutter) | ๐ Planned |
Base URL: /api/v1
| Method | Endpoint | Description |
|---|---|---|
POST |
/auth/login |
Login with email & password |
GET |
/auth/me |
Get current user + employee data |
POST |
/auth/refresh |
Refresh JWT token |
POST |
/auth/logout |
Invalidate token |
| Method | Endpoint | Description |
|---|---|---|
GET |
/attendances |
List attendance history (paginated) |
GET |
/attendances/today |
Get today's attendance status |
GET |
/attendances/summary |
Monthly summary |
POST |
/attendances/clock-in |
Clock in with GPS + photo |
POST |
/attendances/clock-out |
Clock out with GPS + photo |
| Method | Endpoint | Description |
|---|---|---|
GET |
/leaves |
List my leave requests |
POST |
/leaves |
Submit new leave request |
GET |
/leaves/{id} |
Get leave detail |
DELETE |
/leaves/{id} |
Cancel pending leave |
| Method | Endpoint | Description |
|---|---|---|
GET |
/overtimes |
List my overtime requests |
POST |
/overtimes |
Submit new overtime request |
GET |
/overtimes/{id} |
Get overtime detail |
DELETE |
/overtimes/{id} |
Cancel pending overtime |
| Method | Endpoint | Description |
|---|---|---|
GET |
/locations |
Get active attendance locations |
GET |
/holidays |
Get holidays (for calendar) |
GET |
/work-schedules |
Get work schedule config |
๐ Full API specification: docs/api/api-spec.md
- Stateless JWT authentication โ Token-based API auth
- Server-side RBAC โ Roles & permissions resolved server-side using Spatie
- Separation of User vs Employee โ User for auth, Employee for business data
- Soft delete semantics โ With partial unique indexes for data integrity
- Strong database constraints โ Over application-level trust
- Geofencing support โ Haversine formula for location validation
| Aspect | Implementation |
|---|---|
| Auth Method | JWT (tymon/jwt-auth) |
| RBAC | Spatie Laravel Permission |
| Role Resolution | Server-side (not embedded in token) |
| Soft-deleted Users | Treated as inactive |
| Admin Panel Auth | Filament built-in |
users โโโโโโโโโโโ
โโโ employees โโโ departments (self-referential)
โ โ
โ โโโ attendances
โ โโโ leaves
โ โโโ overtimes
โ
permission_tables (Spatie)
| Table | Purpose |
|---|---|
work_schedules |
Work hours per day of week |
holidays |
Public holidays for attendance calculation |
locations |
Geofencing with lat/lng/radius |
-- Partial unique index for soft delete
CREATE UNIQUE INDEX users_email_unique ON users(email) WHERE deleted_at IS NULL;
CREATE UNIQUE INDEX employees_number_unique ON employees(employee_number) WHERE deleted_at IS NULL;
-- Attendance lookup optimization
CREATE INDEX attendances_employee_date ON attendances(employee_id, date);| Layer | Technology | Version |
|---|---|---|
| Backend | Laravel | 12.x |
| Database | PostgreSQL | - |
| Auth (API) | JWT (tymon/jwt-auth) | 2.x |
| Auth (Admin) | Filament | 4.x |
| RBAC | Spatie Laravel Permission | 6.x |
| Admin UI | Filament | 4.x |
| Mobile | Flutter | Planned |
| Cache | Redis | Planned |
- MapPicker โ Interactive Leaflet map with radius picker for geofencing locations
- Modern Schema patterns (
live(),visible(), dehydrate hooks) - Navigation groups with Indonesian labels
- Permission-based menu visibility
- Soft delete handling in queries
- Custom table filters with raw PostgreSQL queries
- One record per employee per day
- Tracks:
clock_in_at,clock_out_at,source,notes - Auto-calculated:
is_late,late_duration_minutes,is_early_leave
| Source | Description |
|---|---|
mobile |
Clock via mobile app (planned) |
manual |
Manual entry by HR/Admin |
| Status | Label | Color |
|---|---|---|
| Present | Hadir | Success |
| Absent | Tidak Hadir | Danger |
| On Leave | Cuti/Izin | Info |
| Weekend | Akhir Pekan | Gray |
| Holiday | Libur | Warning |
| Not Yet | Belum Tiba | Gray |
- Pre-seeded 7-day schedule (Sunday = 0, Saturday = 6)
- Configurable:
is_working_day,work_start_time,work_end_time - Used for late/early leave calculation
- Cannot create/delete โ Only edit existing schedules
- Interactive map picker with search
- Configurable radius (10m - 5000m)
- Haversine formula for distance calculation
- Active/inactive status
$location->isWithinRadius($lat, $lng); // Check if coordinate is within radius
$location->calculateDistance($lat, $lng); // Get distance in meters
Location::findNearest($lat, $lng); // Find nearest active location
Location::findContaining($lat, $lng); // Find all locations containing point- Authentication (JWT + Filament)
- RBAC with Spatie Laravel Permission
- Employee & Department management
- Daily attendance with manual entry
- Attendance review (daily & monthly)
- Leave & overtime management with approval
- Work schedule configuration
- Holiday management
- Geofencing locations with map picker
- Mobile app (Flutter) with clock-in/out
- Attendance Logs (immutable audit trail)
- Photo capture for attendance proof
- Push notifications
- Payroll integration
- Advanced shift scheduling
- Analytics dashboard
- Multi-tenant support
- Redis caching
This project demonstrates:
| Aspect | What It Shows |
|---|---|
| Backend Architecture | Clean separation of concerns, service patterns |
| Database Design | PostgreSQL-specific features, proper indexing |
| Security | JWT + RBAC, server-side permission resolution |
| Modern Stack | Laravel 12 + Filament v4 latest patterns |
| Business Logic | Real-world HR/attendance rules |
| Custom Components | Filament custom form components (MapPicker) |
people-sync/
โโโ backend/
โ โโโ app/
โ โ โโโ Enums/ # AttendanceSource, AttendanceStatus, DayOfWeek
โ โ โโโ Filament/
โ โ โ โโโ Forms/Components/ # Custom components (MapPicker)
โ โ โ โโโ Resources/ # Admin panel resources
โ โ โโโ Http/
โ โ โ โโโ Controllers/
โ โ โ โ โโโ Api/V1/ # Mobile API controllers
โ โ โ โโโ Middleware/ # JWT, ActiveUser, EmployeeOnly
โ โ โ โโโ Requests/Api/V1/ # Form request validation
โ โ โ โโโ Resources/Api/V1/ # API response transformers
โ โ โโโ Models/
โ โ โโโ Services/
โ โโโ database/migrations/
โ โโโ docs/api/ # API specification
โ โโโ routes/
โ โโโ api.php # Mobile API routes (/api/v1/*)
โ โโโ web.php # Admin panel routes
โโโ docs/
โโโ api/ # API documentation
โโโ v2/ # PRD & migration specs
# Clone & setup
cd backend
composer install
cp .env.example .env
php artisan key:generate
php artisan jwt:secret
# Database
php artisan migrate
php artisan db:seed
# Development
composer dev
# Running project
php artisan serve
# Access Filament Admin Panel
# Default: http://localhost:8000/adminPeopleSync is intentionally designed as a production-minded MVP, focusing on:
- โ Correctness โ Strong data validation & constraints
- โ Auditability โ Source tracking, soft deletes
- โ Extensibility โ Ready for payroll, multi-tenant, and more
Rather than feature count, the priority is real-world quality.