# Frontend - Laravel Web Application

Laravel 12 web application providing the manager-facing UI for the monitoring system.
Front is a BFF only: authentication comes from Keycloak/OIDC and all customer, user, document, activity, and tenant data comes from backend APIs.

## Stack

- **PHP 8.2+** with Laravel 12
- **Vite 7** for asset bundling
- **Tailwind CSS 4** for styling
- **Flowbite** for UI components
- **ApexCharts** for data visualization

## Routes

- `/` - Dashboard (requires auth)
- `/events` - Events view
- `/investigate` - Investigation view
- `/recommendation` - Recommendations view
- `/login` - Authentication

## Build & Run

```bash
# Install dependencies and setup
composer setup

# Development (runs server, sync queue, logs, and vite concurrently)
composer dev

# Or individually:
php artisan serve          # HTTP server
npm run dev                # Vite dev server
php artisan queue:listen   # Optional worker if async queues are enabled
```

## Code Style

- Follow PSR-12 coding standard
- Use Laravel Pint for code formatting: `./vendor/bin/pint`
- Controllers in `app/Http/Controllers/`
- Middleware authentication via `hydrate-oidc` and `role`
- Do not add Eloquent models, migrations, seeders, or local auth/session persistence

## Testing

```bash
# Run tests with Pest
./vendor/bin/pest
```

## Directory Structure

```
app/
  Http/Controllers/     # Route controllers
  Services/             # Backend API and OIDC clients
  Providers/           # Service providers
resources/
  views/               # Blade templates
  js/                  # JavaScript assets
  css/                 # Stylesheets
routes/
  web.php              # Web routes
  console.php          # Artisan commands
```
