dhruvlathia/hr-management
Human Resources Management for Employees and Their Attendance Management
HR Management Website Documentation
Overview
This is a web-based HR management system built with Bootstrap 5.3 and MySQL. The platform supports two types of users: employees and admins. It facilitates time tracking, task management, leave requests, and employee management.
Features
For Employees
-
Index
- Landing page of the website.
-
Login
- Endpoint:
login.php - Fields:
email,password
- Endpoint:
-
Dashboard
- Endpoint:
dashboard.php - Actions:
- Punch In
- Punch Out
- Display total time worked for today.
- Endpoint:
-
Task Management
- Endpoint:
task.php - Functionality: Allows employees to record their daily work by providing a title and description.
- Endpoint:
-
Leave Management
- Endpoint:
leave.php - Functionality: Displays leave details, including paid leave and emergency leave.
- Endpoint:
-
Profile Completion
- Endpoint:
profile.php - Functionality: Allows employees to complete or update their profile.
- Endpoint:
For Admins
-
Dashboard
- Endpoint:
/admin/dashboard.php
- Endpoint:
-
Employee List
- Endpoint:
/admin/employees.php - Functionality: Displays all employees in a table with their name, number, and a button to view more details.
- Endpoint:
-
Employee Details
- Endpoint:
/admin/emp.php?id=[id] - Functionality: Shows detailed information about a specific employee.
- Endpoint:
-
Add New Employee
- Endpoint:
/admin/newemployee.php - Functionality: Form for adding new employees.
- Endpoint:
-
Task Management
- Endpoint:
/admin/tasks.php - Functionality: Admins can view a list of all tasks submitted by employees.
- Endpoint:
-
Leave Management
- Endpoint:
/admin/leaves.php - Functionality: Allows admins to view and manage all leave requests submitted by employees.
- Endpoint:
Components
-
Header
- File:
/components/header.php
- File:
-
Footer
- File:
/components/footer.php
- File:
Database Structure
Tables
users
| Column | Type | Description |
|---|---|---|
| id | INT | Primary key |
| username | VARCHAR(255) | Employee's username |
| VARCHAR(255) | Employee's email | |
| password | VARCHAR(255) | Employee's hashed password |
| mobile | VARCHAR(15) | Employee's mobile number |
| age | INT | Employee's age |
| type | ENUM | admin or employee |
| joining_date | DATE | Joining date of the employee |
| salary | FLOAT | Salary (per month) |
| social_media | JSON | Social media links (array object) |
| created_at | TIMESTAMP | Record creation time |
| updated_at | TIMESTAMP | Record update time |
leaves
| Column | Type | Description |
|---|---|---|
| id | INT | Primary key |
| uid | INT | User ID (foreign key) |
| start_date | DATE | Leave start date |
| end_date | DATE | Leave end date |
| reason | TEXT | Reason for leave |
| status | ENUM | pending, approved, rejected |
task
| Column | Type | Description |
|---|---|---|
| id | INT | Primary key |
| uid | INT | User ID (foreign key) |
| title | VARCHAR | Title of the task |
| description | TEXT | Task description |
| date | DATE | Date of the task |
time
| Column | Type | Description |
|---|---|---|
| id | INT | Primary key |
| uid | INT | User ID (foreign key) |
| time | JSON | Array of punch-in and punch-out times |
| date | DATE | Date of the recorded time |
Installation
-
Clone the repository:
git clone https://github.com/dhruvlathia/hr-management
-
Set up the database:
- Import the provided SQL file (
database.sql) into your MySQL server.
- Import the provided SQL file (
-
Configure database connection:
- Update database credentials in the
config.phpfile.
- Update database credentials in the
-
Start the server:
php -S localhost:8000
-
Open the application:
- Navigate to
http://localhost:8000in your web browser.
- Navigate to
Usage
- Employees log in and manage their tasks, time, and leave requests.
- Admins log in to manage employees, tasks, and leave requests.
Credits
This project was developed by Dhruv Lathia.
GitHub: Dhruv Lathia
LinkedIn: Dhruv Lathia
If you use this project or find it helpful, don't forget to give it a ⭐ on GitHub!
License
This project is licensed under the MIT License. Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
ADDITIONAL REQUIREMENT: If you use this software in your project, you must give
appropriate credit by mentioning the author and linking back to this repository.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License Overview:
- Permission: Commercial use, modification, distribution, and private use.
- Limitation: No liability, warranty, or guarantee.
- Requirement: Include the original license in all copies or substantial portions of the software.
For more information, refer to the full license text in the LICENSE file.