# Vault Display — Unified Platform Build

This package merges:

- Step 01 Foundation
- Step 02 Display Player
- Step 03 Admin Dashboard starter layer

## What was fixed during merge

- Step 01 and Step 02 are now in one coherent project tree.
- Added unified installer SQL: `install/install-all.sql`.
- Updated playlist API so matrix screens can switch effective playlist by matrix mode.
- Updated screen ping API so screens report:
  - current playlist
  - current playlist item
  - current mode
  - resolution
  - fullscreen state
- Added admin authentication wrapper.
- Added admin dashboard and management pages.

## Install

```bash
mysql -u root -p < install/install-all.sql
```

Set database details in:

```text
config/database.php
```

Optional environment variable for admin PIN:

```text
VAULT_DISPLAY_ADMIN_PIN=your-pin
```

Default admin PIN:

```text
1234
```

## Main URLs

Admin:

```text
/public/admin/
```

Display examples:

```text
/public/display.php?screen=matrix-1
/public/display.php?screen=matrix-2
/public/display.php?screen=matrix-3
/public/display.php?screen=matrix-4
/public/display.php?screen=counter
/public/display.php?screen=tv
/public/display.php?screen=window
```

APIs:

```text
/api/screens.php
/api/screen-config.php?screen=counter
/api/playlist.php?screen=counter
/api/matrix-state.php
```

## Current Features

- 7-screen configuration
- 4-screen matrix group
- Screen-specific playlists
- Display player
- Playlist rotation
- Local fallback cache
- Health pings
- Admin dashboard
- Screen assignment UI
- Playlist creation
- Playlist item management
- Content library
- Media upload support
- Matrix mode controls
- Basic preview frames

## Still To Build

- Full matrix canvas rendering/cropping
- Schedule engine
- Emergency override propagation to all screens
- Kiosk launcher script
- Browser window positioning script
- Fusion API sync
- Arkwright visibility endpoints
- Better QR generation
- Advanced slide templates
- Permissions/users beyond simple admin PIN
- Backup/export/import


## Step 04 Added

Matrix canvas rendering, crop positioning, emergency override, admin emergency control, and runtime stability fixes. See README_STEP_04.md.
