TIFNJK_E41222887/README.md

84 lines
3.8 KiB
Markdown

# HR Management System (HRIS) - PT Zhanhui Jaya Indonesia
A web-based Human Resource Information System (HRIS) built to facilitate employee data management, attendance tracking, and leave requests.
## Technology Stack
- **Backend:** Laravel 12 (PHP Framework)
- **Frontend:** React.js
- **Full-stack Adapter:** Inertia.js
- **Database:** MySQL
- **Styling:** Tailwind CSS
- **Testing:** Pest PHP
## System Requirements
Before running the application, ensure the following are installed:
- PHP >= 8.2
- Composer
- Node.js & NPM
- MySQL (via XAMPP/Laragon)
## Installation Guide
Follow these steps if moving the project to a new machine:
1. **Clone Repository / Extract Files**
Open a terminal inside the project folder.
2. **Install Backend Dependencies**
```bash
composer install
```
3. **Install Frontend Dependencies**
```bash
npm install
```
4. **Setup Environment**
Copy the configuration file `.env`:
```bash
cp .env.example .env
```
5. **Generate Application Key**
```bash
php artisan key:generate
```
6. **Database Configuration**
- Create a new database in phpMyAdmin (e.g., `hris_db`).
- Open the `.env` file and configure the database connection:
```env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=hris_db
DB_USERNAME=root
DB_PASSWORD=
```
*(Remove or comment out the line `DB_CONNECTION=sqlite` if present)*.
7. **Database Migration**
Run this command to create the tables in the database:
```bash
php artisan migrate
```
## Running the Application
To start the local development server (Backend & Frontend), simply run:
```bash
composer run dev
```
---
## Running Tests
To run automated tests (Unit & Feature Tests):
```bash
php artisan test
```