# Installation & Setup Guide

## Requirements

- **PHP**: 8.2 or higher (with `gd`, `fileinfo`, `pdo_mysql`, `openssl`, `mbstring`, `zip`)
- **Composer**: 2.x
- **Node.js**: 18+ & **npm**
- **MySQL**: 5.7+ or MariaDB 10.3+ (e.g., via XAMPP)
- **Web Server**: Apache / Nginx or built-in `php artisan serve`

---

## Step-by-Step Installation

### 1. Database Setup
Ensure MySQL is running in XAMPP, then create the database:
```sql
CREATE DATABASE document_authentication CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
```

### 2. Environment Configuration
Copy `.env.example` to `.env` (or verify existing `.env`):
```ini
APP_NAME=DocValidator
APP_ENV=local
APP_KEY=base64:2v1s2ST4Ju4UA4IbbVRV66m+Mo9hXDNLj4sdPAisfRM=
APP_DEBUG=true
APP_URL=http://localhost:8000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=document_authentication
DB_USERNAME=root
DB_PASSWORD=

DOCUMENT_MAX_SIZE_MB=20
DOCUMENT_ALLOWED_TYPES=pdf,jpg,jpeg,png
```

### 3. Install Dependencies
```bash
# Composer PHP packages
composer install

# Node.js frontend packages
npm install
npm run build
```

### 4. Database Migrations & Seeders
```bash
php artisan migrate --force
php artisan db:seed --force
```

### 5. Start the Application
```bash
php artisan serve --port=8000
```
Open **[http://localhost:8000](http://localhost:8000)** in your browser.

---

## Default Login Credentials

| Portal | Email | Password |
|---|---|---|
| **Super Admin** | `superadmin@docvalidator.local` | `SuperAdmin@2024` |
| **Administrator** | `admin@docvalidator.local` | `Admin@2024` |
| **Client** | `client@docvalidator.local` | `Client@2024` |

---

## Public Verification

- **QR Scan URL**: `http://localhost:8000/verify/{token}`
- **Manual Verification & File Hash Portal**: `http://localhost:8000/verify`

