Skip to content

A kiosk and web system that automates student attendance tracking and violation monitoring for faster, error-free school discipline management at NCF.

Notifications You must be signed in to change notification settings

genebit/tardetect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

166 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š TarDetect - Attendance & Tardiness Detection System

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


πŸ“‹ Table of Contents


πŸ›  Tech Stack

Backend

  • Laravel 10 - Modern PHP framework
  • PHP 8.1+ - Language runtime
  • MySQL - Relational database
  • Laravel Sanctum - API authentication
  • Spatie Laravel Data - Data transfer objects

Frontend

  • 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

Additional Libraries

  • Axios - HTTP client
  • TanStack React Table - Advanced data tables
  • DOMPDF - PDF generation
  • Barcode Generator - Barcode handling
  • Log Viewer - Application logging dashboard

✨ Features

  • πŸ“± 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

πŸ“¦ Prerequisites

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)

πŸš€ Installation

1. Clone the repository

git clone <repository-url>
cd tardetect

2. Install PHP dependencies

composer install

3. Set up environment configuration

cp .env.example .env

Then edit .env with your database and application settings.

4. Generate application key

php artisan key:generate

5. Install JavaScript dependencies

npm install

6. Run database migrations

php artisan migrate

7. Set up storage and publish vendor files

php artisan storage:link
php artisan log-viewer:publish

πŸƒ Running Locally

Development Environment

Start both the Laravel backend and Vite dev server concurrently:

npm run dev

This command runs:

  • Laravel backend server: http://localhost:8000
  • Vite dev server for hot module replacement (HMR)

Alternative: Running Services Separately

Terminal 1 - Start Laravel:

php artisan serve --host localhost

Terminal 2 - Start Vite:

npm run dev:vite

Pull Submodules

git submodule init
git submodule update --recursive --remote

πŸ‹ Running with Docker

docker build -t laravel-react:latest .
docker compose up -d

# Seed the application
docker compose exec app php artisan db:seed --force

Terminal 2 - Start Vite:

npm run dev:vite

πŸ‹ Running with Docker

Build and Start Containers

docker compose build
docker compose up -d

Access the Application

  • Application: http://localhost
  • Database: MySQL on port 3306

View Logs

docker compose logs -f

Stop Containers

docker compose down

πŸ–₯️ Kiosk Browser Setup

This application supports dedicated kiosk mode for public access terminals.

Windows Setup

  1. Launch Firefox in kiosk mode:

    firefox.exe -kiosk "http://your-app-url.com"
  2. Configure Firefox settings:

    • Access about:config in Firefox
    • Set print.always_print_silent to true (for silent printing)
    • Disable auto-updates to prevent interruptions

Linux Setup

firefox --kiosk "http://your-app-url.com"

Additional Kiosk Tips

  • Use F11 or F5 to 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

πŸ“œ Available Scripts

Development

npm run dev           # Run Laravel + Vite dev servers concurrently
npm run build         # Compile TypeScript and build assets for production

Production

npm 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 files

πŸ“ Project Structure

app/
β”œβ”€β”€ 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

πŸ”§ Configuration

Key configuration files:

  • .env - Environment variables
  • config/app.php - Application configuration
  • config/database.php - Database configuration
  • config/auth.php - Authentication settings
  • tailwind.config.js - Tailwind CSS configuration
  • vite.config.js - Vite bundler configuration
  • tsconfig.json - TypeScript configuration

πŸ“ Database

Seeding

Populate database with sample data:

php artisan db:seed

πŸ›‘οΈ Security

  • 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

πŸ“Š Debugging

Using Laravel Debugbar

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

Viewing Logs

# Access log viewer dashboard
php artisan tinker
# Then visit http://localhost:8000/log-viewer

🀝 Contributing

This is a development project. For contributions or issues, please contact the project developer.


πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ‘€ Author

Johcel Gene T. Bitara
Full Stack Developer


πŸ†˜ Troubleshooting

Common Issues

Port 8000 already in use:

php artisan serve --port 8001

Composer autoload issues:

composer dump-autoload

Node modules corrupted:

rm -rf node_modules package-lock.json
npm install

Database connection error:

  • Verify .env DATABASE_* variables
  • Ensure MySQL service is running
  • Check database user permissions

About

A kiosk and web system that automates student attendance tracking and violation monitoring for faster, error-free school discipline management at NCF.

Topics

Resources

Stars

Watchers

Forks