API-only QR-based attendance system for schools with multiple roles: Admin, Waka (Student Affairs), Teachers, and Students. Highly optimized for performance and real-time interactions.
- Engine: Laravel Octane with FrankenPHP for high-concurrency.
- Real-time: Laravel Reverb for WebSocket broadcasting.
- Cache & Queue: Redis via
predis. - Monitoring: Laravel Horizon for queues & Laravel Telescope for debugging.
- Security: Laravel Sanctum (Tokens), Device Binding, and Role-Based Access Control (RBAC).
After cloning, you can set up the entire environment (including DB, dependencies, assets, and keys) with a single command:
Linux / macOS:
chmod +x setup.sh
./setup.shWindows (PowerShell):
.\setup.ps1- API Documentation (Scalar):
http://localhost:8000/docs - Queue Monitor (Horizon):
http://localhost:8000/horizon(Admin only) - Debug Tool (Telescope):
http://localhost:8000/telescope(Admin only) - Web Login:
http://localhost:8000/login
The project is optimized for Docker with low-resource Alpine images and memory limits:
# Start the stack
./vendor/bin/sail up -d
# Initial setup inside Docker
./vendor/bin/sail artisan migrate
./vendor/bin/sail artisan horizon:publishThe application includes a professional interactive manager for maintenance:
php artisan app:checkUse this to check system health, view statistics (Total Students/Teachers/Classes), clear cache, and manage feature flags interactively.
The API is 100% compatible with the Mobile and Webta frontend requirements:
- Status Support:
present,late,excused,sick,absent,dinas,izin, andpulang. - Special Aliases: Supports
PATCHfor attendance updates andPOST /documentfor attachments. - Class Officer Flow: Class officers can generate QR tokens for their class using
POST /api/me/class/qr-token. - Teacher Verification: Teachers scan student-held QRs to verify their presence in class.
- QR Cleanup: Expired QR codes are deactivated every minute.
- Auto-Alpha: Students who don't scan for their scheduled classes are automatically marked as "Absent" at 16:00 daily.
- WhatsApp Alerts: Instant notifications sent to students/teachers via WhatsApp when attendance is recorded.
- Local:
php artisan test(supports parallel testing). - CI/CD: Automated GitHub Actions pipeline (
.github/workflows/ci.yml) handles linting (Pint) and feature testing with Redis.
ยฉ 2026 QR Absence System