# Equipment Maintenance System - Project Structure

## 1. Overview
The Equipment Maintenance System (EMS) is a comprehensive web application designed to manage, track, and streamline IT equipment complaints, repairs, and service requests. The system digitizes the manual workflow of filing complaints, generating minute sheets, acquiring multi-level approvals, assigning technicians, and maintaining history logs for IT assets across various directorates and branches.

## 2. Technology Stack
- **Backend Framework**: Laravel (PHP)
- **Frontend Framework**: Vue 3 (Composition API)
- **Bridging / Routing**: Inertia.js (Provides a single-page application experience without building a separate API)
- **Styling**: Tailwind CSS (Utility-first CSS framework)
- **Database**: MySQL / SQLite (via Eloquent ORM)
- **Build Tool**: Vite

## 3. Directory Structure
The project follows standard Laravel conventions with Inertia/Vue integrated on the frontend:

### Backend Structure (`app/`)
- `app/Models/`: Contains Eloquent models representing database tables (e.g., `Ticket`, `User`, `Asset`, `Employee`).
- `app/Http/Controllers/`: Contains the logic handling HTTP requests. Major controllers include `TicketController`, `SuperAdminWorkflowController`, `AssetController`, and role-specific dashboard controllers.
- `app/Http/Requests/`: Form request classes for validation (e.g., `StoreTicketRequest`).
- `app/Traits/`: Reusable logic like `LogsActivity` to track changes in models automatically.
- `app/Constants/`: Enums or constant classes defining fixed states like `AssetStatus`.

### Frontend Structure (`resources/js/`)
- `resources/js/Pages/`: Contains the Vue views mapped to routes. These are organized by role:
  - `/Clerk/`: Clerk dashboards and ticket creation views.
  - `/ItAdmin/`: IT Admin interfaces for managing assignments, assets, workflows, and viewing history/reports.
  - `/Approver/`: Dashboards for Directors, Addl Dir IT, Secy, etc.
  - `/SuperAdmin/`: Complete system control and workflow overrides.
  - `/Technician/`: Technician dashboard for updating ticket progress and resolving issues.
- `resources/js/Components/`: Reusable Vue components (`Modal.vue`, `SearchableSelect.vue`, `Pagination.vue`, `SignaturesBox.vue`, etc.).
- `resources/js/Layouts/`: Layout wrappers (e.g., `AuthenticatedLayout.vue` which houses the dynamic sidebar navigation).

### Configuration & Routes
- `routes/web.php`: Defines all web routes. The application uses middleware (`auth`, `role:xyz`) to protect routes and ensure users are redirected to their appropriate role-based dashboards upon login.
- `database/migrations/`: Database schema definitions.
- `database/seeders/`: Seeders for populating default data (Roles, Permissions, Sequences, and Admin users).
