Skip to content

About

A modern Human Resource Information System (HRIS) built with Laravel 12, Blade, Tailwind CSS, and MySQL. The application provides employee management, attendance tracking, leave management, office management, and geolocation-based attendance with office radius validation through a secure role-based access system.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

12 Commits

Folders and files

Repository files navigation

Employee Attendance & HRIS

A modern Human Resource Information System (HRIS) and employee attendance management platform built with Laravel 12, Blade, Tailwind CSS, and MySQL.

The system is designed to help organizations manage employee information, departments, positions, attendance, leave requests, office locations, and location-based attendance validation through a secure role-based access control system.


๐Ÿš€ Project Overview

e-Absensi HRIS is a web-based HR management application focused on digitizing employee administration and attendance workflows.

The system supports three user roles:

  • Admin โ€” Full system and master-data management
  • HR โ€” Employee, attendance, leave, and reporting management
  • Employee โ€” Personal attendance, leave requests, and profile management

A key feature of this project is the geolocation-based attendance system, which validates an employee's location against a configured office radius using the Haversine formula.


๐Ÿ“Œ Current Release

Version: v1.1.0

What's New in v1.1.0

  • Office Management
  • Office Location Configuration
  • Configurable Attendance Radius
  • Browser Geolocation API
  • Haversine Distance Calculation
  • Geolocation Radius Validation
  • GPS Accuracy Recording
  • Latitude & Longitude Recording
  • Google Maps Location Integration
  • Improved Attendance Validation

โœจ Core Features

๐Ÿ” Authentication & Authorization

  • Manual authentication without Laravel Breeze
  • Login & Logout
  • Session-based authentication
  • Role-Based Access Control (RBAC)
  • Protected routes using middleware
  • Role-specific dashboards and features

User Roles

Role Access
Admin Full system management
HR HR & employee management
Employee Personal attendance & leave

๐Ÿ‘จโ€๐Ÿ’ผ Admin Features

Dashboard

  • Employee statistics
  • Attendance statistics
  • Leave request statistics
  • HR overview

Department Management

  • Create department
  • Edit department
  • Delete department
  • Search department
  • Pagination

Position Management

  • Create position
  • Edit position
  • Delete position
  • Search position
  • Pagination

Employee Management

  • Create employee
  • Edit employee
  • Delete employee
  • Employee search
  • Department filtering
  • Employee status management
  • Avatar upload
  • Pagination

Office Management

  • Create office
  • Edit office
  • Delete office
  • Search office
  • Configure office coordinates
  • Configure attendance radius

Office location and radius configuration are restricted to Admin.


๐Ÿ‘จโ€๐Ÿ’ผ HR Features

HR Dashboard

  • Employee overview
  • Attendance statistics
  • Leave request overview

Employee Management

  • View employees
  • Search employees
  • Filter by department
  • Manage employee information
  • Manage positions and departments

Attendance Management

  • View attendance records
  • Search attendance
  • Filter by date
  • Filter by department
  • Filter by attendance status
  • View attendance history
  • View employee location
  • View GPS accuracy
  • View distance from office
  • View attendance location status
  • Open attendance coordinates in Google Maps

Leave Management

  • View leave requests
  • Review leave requests
  • Approve leave requests
  • Reject leave requests
  • Manage leave status

Attendance Reports

  • Attendance summary
  • Date filtering
  • Department filtering
  • Attendance statistics

HR Personal Attendance

HR users can also perform their own:

  • Check In
  • Check Out
  • Attendance history
  • Geolocation validation

๐Ÿ‘จโ€๐Ÿ’ป Employee Features

Dashboard

  • Personal dashboard
  • Attendance summary
  • Leave request summary

Attendance

  • Check In
  • Check Out
  • Daily check-in validation
  • Daily check-out validation
  • Late attendance detection
  • Attendance history

๐Ÿ“ Geolocation Attendance

The attendance system uses the browser's Geolocation API to validate the employee's physical location.

Features

  • GPS permission request
  • Automatic latitude detection
  • Automatic longitude detection
  • GPS accuracy detection
  • Distance calculation
  • Office radius validation
  • Attendance location recording
  • Google Maps coordinate integration

Attendance Validation Flow

Employee
   โ”‚
   โ–ผ
Login
   โ”‚
   โ–ผ
Attendance Check In
   โ”‚
   โ–ผ
Request Browser GPS
   โ”‚
   โ–ผ
Get Latitude / Longitude
   โ”‚
   โ–ผ
Calculate Distance
   โ”‚
   โ–ผ
Haversine Formula
   โ”‚
   โ–ผ
Compare With Office Radius
   โ”‚
   โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚               โ”‚
   โ–ผ               โ–ผ
Inside Radius   Outside Radius
   โ”‚               โ”‚
   โ–ผ               โ–ผ
Attendance       Attendance
Recorded         Rejected

๐Ÿ“ Leave Management

Employees can submit:

  • Vacation leave
  • Sick leave
  • Other leave requests

Employees can also:

  • View submitted requests
  • Check request status
  • View leave history

Leave Workflow

Employee
   โ”‚
   โ–ผ
Submit Leave Request
   โ”‚
   โ–ผ
Pending
   โ”‚
   โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚               โ”‚
   โ–ผ               โ–ผ
Approved         Rejected

๐Ÿ“Š Attendance Management

Attendance records contain important information such as:

  • Employee
  • Office
  • Attendance date
  • Check-in time
  • Check-out time
  • Attendance status
  • Late minutes
  • Latitude
  • Longitude
  • GPS accuracy
  • Distance from office
  • Notes

This allows HR and Admin users to review attendance history and verify whether an attendance record was submitted from an authorized office location.


๐Ÿข Office Management

Each office can have a configured:

  • Office name
  • Latitude
  • Longitude
  • Attendance radius

Example:

Office
 โ”œโ”€โ”€ Name
 โ”œโ”€โ”€ Latitude
 โ”œโ”€โ”€ Longitude
 โ””โ”€โ”€ Radius

The office coordinates act as the reference point for geolocation attendance validation.


๐Ÿงฎ Haversine Distance Calculation

The system uses the Haversine formula to calculate the distance between:

Employee GPS Location
        โ”‚
        โ–ผ
Latitude + Longitude
        โ”‚
        โ–ผ
Office Coordinates
        โ”‚
        โ–ผ
Haversine Calculation
        โ”‚
        โ–ผ
Distance in Meters

The calculated distance is then compared with the configured office attendance radius.


๐Ÿ“ˆ Reporting

The system provides attendance reporting with:

  • Date filtering
  • Department filtering
  • Attendance status filtering
  • Attendance summary
  • Attendance statistics

This allows HR and Admin users to monitor attendance patterns and generate useful operational information.


๐Ÿ›  Tech Stack

Backend

  • Laravel 12
  • PHP 8.2+
  • Eloquent ORM

Frontend

  • Blade
  • Tailwind CSS
  • JavaScript

Database

  • MySQL

Browser API

  • Geolocation API

Architecture

  • MVC Architecture
  • Role-Based Access Control
  • RESTful Resource Controllers
  • Form Request Validation
  • Eloquent Relationships

๐Ÿ“‚ Project Structure

e-Absensi/
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ Http/
โ”‚   โ”‚   โ”œโ”€โ”€ Controllers/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Admin/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Employee/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ HR/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Report/
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ Middleware/
โ”‚   โ”‚   โ””โ”€โ”€ Requests/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Models/
โ”‚   โ””โ”€โ”€ Services/
โ”‚
โ”œโ”€โ”€ database/
โ”‚   โ”œโ”€โ”€ factories/
โ”‚   โ”œโ”€โ”€ migrations/
โ”‚   โ””โ”€โ”€ seeders/
โ”‚
โ”œโ”€โ”€ resources/
โ”‚   โ””โ”€โ”€ views/
โ”‚       โ”œโ”€โ”€ admin/
โ”‚       โ”œโ”€โ”€ employee/
โ”‚       โ”œโ”€โ”€ hr/
โ”‚       โ”œโ”€โ”€ layouts/
โ”‚       โ””โ”€โ”€ reports/
โ”‚
โ”œโ”€โ”€ routes/
โ”‚   โ”œโ”€โ”€ web.php
โ”‚   โ”œโ”€โ”€ auth.php
โ”‚   โ”œโ”€โ”€ profile.php
โ”‚   โ”œโ”€โ”€ admin.php
โ”‚   โ”œโ”€โ”€ hr.php
โ”‚   โ”œโ”€โ”€ employee.php
โ”‚   โ”œโ”€โ”€ management.php
โ”‚   โ””โ”€โ”€ reports.php
โ”‚
โ”œโ”€โ”€ public/
โ”œโ”€โ”€ storage/
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ artisan
โ”œโ”€โ”€ composer.json
โ””โ”€โ”€ README.md

๐Ÿ—„ Database

Main Tables

users
departemens
positions
offices
attendances
leave_requests

Main Relationships

User
 โ”‚
 โ”œโ”€โ”€ Department
 โ”œโ”€โ”€ Position
 โ”œโ”€โ”€ Attendances
 โ””โ”€โ”€ Leave Requests

Department
 โ”‚
 โ”œโ”€โ”€ Users
 โ””โ”€โ”€ Positions

Office
 โ”‚
 โ””โ”€โ”€ Attendances

๐Ÿ”‘ Role-Based Access

The application separates access based on user roles.

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚     USER     โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚             โ”‚             โ”‚
             โ–ผ             โ–ผ             โ–ผ
          ADMIN            HR         EMPLOYEE
             โ”‚             โ”‚             โ”‚
             โ–ผ             โ–ผ             โ–ผ
       Full Access     HR Access    Personal Access

Backend authorization is enforced using role middleware to prevent unauthorized access even when users manually access protected URLs.


โš™๏ธ Installation

1. Clone Repository

git clone https://github.com/MasMuham24/e-absensi.git

2. Enter Project Directory

cd e-absensi

3. Install PHP Dependencies

composer install

4. Create Environment File

cp .env.example .env

For Windows PowerShell, you can use:

Copy-Item .env.example .env

5. Generate Application Key

php artisan key:generate

6. Configure Database

Update the .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=e_absensi
DB_USERNAME=root
DB_PASSWORD=

7. Run Migration & Seeder

php artisan migrate --seed

8. Create Storage Link

php artisan storage:link

9. Start Development Server

php artisan serve

Application:

http://127.0.0.1:8000

๐Ÿงช Development

Clear Laravel caches when necessary:

php artisan optimize:clear

Check registered routes:

php artisan route:list

Run tests:

php artisan test

๐Ÿ”„ Business Workflow

                    LOGIN
                      โ”‚
                      โ–ผ
                Role Validation
                      โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚             โ”‚             โ”‚
        โ–ผ             โ–ผ             โ–ผ
      ADMIN           HR         EMPLOYEE
        โ”‚             โ”‚             โ”‚
        โ”‚             โ”‚             โ–ผ
        โ”‚             โ”‚         Attendance
        โ”‚             โ”‚             โ”‚
        โ”‚             โ–ผ             โ–ผ
        โ”‚         HR Management   Leave Request
        โ”‚             โ”‚             โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
        Attendance & Leave
             Reports

๐ŸŽฏ Learning Objectives

This project demonstrates practical implementation of:

  • Laravel MVC architecture
  • Manual authentication
  • Role-Based Access Control
  • Middleware authorization
  • CRUD operations
  • Eloquent ORM
  • Model relationships
  • Form Request validation
  • Search & filtering
  • Pagination
  • File upload
  • Attendance business logic
  • Leave management workflow
  • Office management
  • Browser Geolocation API
  • Haversine distance calculation
  • Radius-based validation
  • GPS accuracy handling
  • Reporting system
  • Modular route architecture
  • Service-based business logic

๐Ÿ“ Changelog

v1.1.0 โ€” Office & Geolocation

Added

  • Office Management
  • Office Location Configuration
  • Attendance Radius Configuration
  • Browser Geolocation Integration
  • Haversine Distance Calculation
  • Radius Validation
  • GPS Accuracy Recording
  • Latitude & Longitude Recording
  • Google Maps Coordinate Integration

Improved

  • Attendance validation
  • Attendance workflow
  • Database structure
  • Role-based access control
  • Management route separation

v1.0.0 โ€” Initial Release

Added

  • Authentication
  • Role-Based Access Control
  • Employee Management
  • Department Management
  • Position Management
  • Attendance Management
  • Leave Management
  • Attendance Reporting

๐Ÿ”ฎ Future Development

Planned improvements may include:

  • Payroll Management
  • Overtime Management
  • Shift Management
  • Work Schedule Management
  • Holiday Calendar
  • Employee Performance Management
  • Notification System
  • Export Attendance Reports
  • Advanced Analytics Dashboard
  • Audit Logs
  • API Integration
  • Mobile Application

๐Ÿ“„ License

This project is intended for educational purposes and portfolio demonstration.


๐Ÿ‘ค Author

Muhammad Syafi'i

GitHub: MasMuham24


โญ Project Status

Active Development

This project is continuously being improved with new HR management features, attendance capabilities, security improvements, and production-oriented architecture.

About

A modern Human Resource Information System (HRIS) built with Laravel 12, Blade, Tailwind CSS, and MySQL. The application provides employee management, attendance tracking, leave management, office management, and geolocation-based attendance with office radius validation through a secure role-based access system.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages