# HRMS

Production-oriented human resources management for employee operations, approvals, time off, payroll, capacity, reporting, and audit history.

## Run & Operate

- `cd artifacts/hrms && bash scripts/start-hrms.sh` — start MySQL, run Laravel migrations/seeds, and serve the app
- `cd artifacts/hrms && php artisan test` — run Laravel tests
- `cd artifacts/hrms && php artisan migrate` — apply MySQL schema changes
- Production must provide the standard Laravel `DB_*` environment variables for a managed MySQL database.

## Stack

- PHP 8.2 and Laravel 12
- Server-rendered Laravel Blade views
- MySQL 8 with Eloquent ORM and Laravel migrations
- Laravel controllers, request validation, CSRF protection, and audit persistence
- Do not replace the primary HRMS runtime with React, Express, PostgreSQL, or another stack unless the user explicitly changes this requirement.

## Where things live

- `artifacts/hrms/app` — Eloquent models and HTTP controllers
- `artifacts/hrms/database` — MySQL migrations and seed data
- `artifacts/hrms/resources/views` — Blade pages and layouts
- `artifacts/hrms/public/css/hrms.css` — application visual system
- `artifacts/hrms/routes/web.php` — web routes

## Architecture decisions

- Laravel trusts Replit's HTTPS proxy so generated routes and form actions remain secure.
- Development uses a local MySQL 8 process; production must use a managed persistent MySQL service.

## Product

Employee directory and onboarding, multi-stage approvals, leave requests, payroll runs, compensation cycles, engineering capacity awareness, advanced workforce reporting, and audit history.

## User preferences

- The primary application must remain Laravel Blade with MySQL.

## Gotchas

- Keep Laravel's proxy trust configuration enabled or HTTPS previews will generate mixed-content links.
- The development startup script caches the managed MySQL environment before starting the Laravel HTTP server.

## Pointers

- Laravel application root: `artifacts/hrms`
