A comprehensive Laravel 10 + React (Inertia.js) application for managing student attendance and tardiness tracking with kiosk browser capabilities.
Developed by: Johcel Gene T. Bitara
- Tech Stack
- Features
- Prerequisites
- Installation
- Running Locally
- Docker Setup
- Kiosk Browser Setup
- Available Scripts
- Laravel 10 - Modern PHP framework
- PHP 8.1+ - Language runtime
- MySQL - Relational database
- Laravel Sanctum - API authentication
- Spatie Laravel Data - Data transfer objects
- React 18 - UI library
- Inertia.js - Server-driven SPA framework
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Material UI (MUI) - Component library
- Shadcn UI - Accessible UI components
- Radix UI - Unstyled, accessible components
- Axios - HTTP client
- TanStack React Table - Advanced data tables
- DOMPDF - PDF generation
- Barcode Generator - Barcode handling
- Log Viewer - Application logging dashboard
- π± Attendance Management - Track student attendance and tardiness
- π Grade Level Management - Organize students by grade levels
- π Reporting & Analytics - Generate tardiness summary reports
- π₯οΈ Kiosk Mode - Full-screen browser mode for public terminals
- π Role-Based Access Control - Secure authentication with different user roles
- π¨ Modern UI/UX - Responsive design with Tailwind CSS and Material UI
- π Real-time Updates - Server-driven updates via Inertia.js
Before you begin, ensure you have the following installed:
- PHP 8.1 or higher
- Composer - PHP package manager
- Node.js 16+ & npm - JavaScript runtime and package manager
- MySQL 8.0+ - Database server
- Docker & Docker Compose - (Optional, for containerized setup)
git clone <repository-url>
cd tardetectcomposer installcp .env.example .envThen edit .env with your database and application settings.
php artisan key:generatenpm installphp artisan migratephp artisan storage:link
php artisan log-viewer:publishStart both the Laravel backend and Vite dev server concurrently:
npm run devThis command runs:
- Laravel backend server:
http://localhost:8000 - Vite dev server for hot module replacement (HMR)
Terminal 1 - Start Laravel:
php artisan serve --host localhostTerminal 2 - Start Vite:
npm run dev:vitegit submodule init
git submodule update --recursive --remotedocker build -t laravel-react:latest .
docker compose up -d
# Seed the application
docker compose exec app php artisan db:seed --forceTerminal 2 - Start Vite:
npm run dev:vitedocker compose build
docker compose up -d- Application:
http://localhost - Database: MySQL on port
3306
docker compose logs -fdocker compose downThis application supports dedicated kiosk mode for public access terminals.
-
Launch Firefox in kiosk mode:
firefox.exe -kiosk "http://your-app-url.com" -
Configure Firefox settings:
- Access
about:configin Firefox - Set
print.always_print_silenttotrue(for silent printing) - Disable auto-updates to prevent interruptions
- Access
firefox --kiosk "http://your-app-url.com"- Use
F11orF5to toggle fullscreen - Disable keyboard shortcuts to prevent user exit
- Consider using a dedicated user account with limited permissions
- Set up automatic restart scripts for reliability
npm run dev # Run Laravel + Vite dev servers concurrently
npm run build # Compile TypeScript and build assets for productionnpm run production # Build + cache configuration + optimize Laravel
npm run cache # Clear and rebuild caches
npm run optimize # Optimize Laravel for production
npm run clear # Clear all caches and compiled filesapp/
βββ Console/ # Artisan console commands
βββ Http/
β βββ Controllers/ # API & web controllers
β βββ Requests/ # Form request validation
β βββ Resources/ # API response resources
β βββ Middleware/ # HTTP middleware
βββ Models/ # Eloquent models
βββ Services/ # Business logic services
βββ Repositories/ # Data access layer
βββ DTOs/ # Data transfer objects
βββ Exceptions/ # Custom exceptions
resources/
βββ js/ # React components
βββ css/ # Tailwind CSS
βββ views/ # Blade templates
database/
βββ migrations/ # Database migrations
βββ seeders/ # Database seeders
βββ factories/ # Model factories
tests/
βββ Feature/ # Feature tests
βββ Unit/ # Unit tests
Key configuration files:
.env- Environment variablesconfig/app.php- Application configurationconfig/database.php- Database configurationconfig/auth.php- Authentication settingstailwind.config.js- Tailwind CSS configurationvite.config.js- Vite bundler configurationtsconfig.json- TypeScript configuration
Populate database with sample data:
php artisan db:seed- Uses Laravel Sanctum for API authentication
- CORS middleware for cross-origin requests
- SQL injection protection via Eloquent ORM
- CSRF protection on all forms
- Role-based access control for different user types
The application includes Laravel Debugbar for development debugging:
# Debugbar is enabled in development by default
# Visit http://localhost:8000 and check the bottom of the page# Access log viewer dashboard
php artisan tinker
# Then visit http://localhost:8000/log-viewerThis is a development project. For contributions or issues, please contact the project developer.
This project is licensed under the MIT License. See the LICENSE file for details.
Johcel Gene T. Bitara
Full Stack Developer
Port 8000 already in use:
php artisan serve --port 8001Composer autoload issues:
composer dump-autoloadNode modules corrupted:
rm -rf node_modules package-lock.json
npm installDatabase connection error:
- Verify
.envDATABASE_* variables - Ensure MySQL service is running
- Check database user permissions