# Reflect Event Guest Management (PHP + MySQL)

Plain PHP 8+ + MySQL (PDO) application for generating guest QR invitation cards and scanning them at entry.

## Requirements

- PHP 8+
- MySQL
- PHP extensions:
  - `pdo_mysql`
  - `gd`
  - `zip`

## Setup

1. Create a database named `event_scanner` (or change in `connect.php`).
2. Import `database.sql` in phpMyAdmin or MySQL CLI.
3. Edit `connect.php` with your DB credentials.
4. Ensure the web server can write to the project root so it can create `/qr_cards/` automatically (created with `0755`).

## Seed Guests

Open:

`/seed.php?token=SEED_SECRET_2024`

- Creates 170 guests (`Guest 1` .. `Guest 170`) with UUID v4 and unique ticket codes.
- Idempotent: if guests already exist, it will not create duplicates.

## Default Credentials

- Dashboard admin:
  - Username: `admin`
  - Password: `admin123`

- Scanner user:
  - Username: `scanner`
  - Password: `scan123`

## URLs

- Dashboard: `/dashboard/login.php`
- Scanner: `/scanner/login.php`

## Notes

- QR cards are cached in `/qr_cards/{uid}.png`.
- QR cards are generated using `lib/phpqrcode` and composited onto a GD-drawn 700x1000 invitation card.
- All POST actions in the dashboard use CSRF tokens.
