# Freebuff Image Host - Preview Run Doc

## Reproduce uncommitted artifacts

1. Copy `.env` from the main checkout if missing (it's already present in this worktree)
2. No `composer.json` or dependencies to install — the project uses a hand-rolled PSR-4 autoloader

## Database setup

1. Start MySQL (WAMP: `C:\wamp64\bin\mysql\mysql8.4.7\bin\mysql.exe`)
2. Create database and user:
   ```sql
   CREATE DATABASE IF NOT EXISTS freebuff_images CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
   CREATE USER IF NOT EXISTS 'freebuff_user'@'localhost' IDENTIFIED BY 'freebuff_dev_pass';
   GRANT ALL PRIVILEGES ON freebuff_images.* TO 'freebuff_user'@'localhost';
   FLUSH PRIVILEGES;
   ```
3. Import schema: `mysql -u root freebuff_images < schema.sql`

## Run the server

```bash
php -S localhost:8080 -t public/
```

- Port: 8080 (configured in `.env` as `APP_URL`)
- Document root: `public/`
- No external dependencies — uses PHP built-in dev server
