# Mixpad

A responsive, installable web soundboard for OBS with phone/tablet remote control. The OBS Browser Source is the only playback surface; signed-in controllers send sound commands to the shared PHP/MySQL service. The bundled pads are synthetic sample tones labelled `DEMO`.

## What is included

- Responsive soundboard with custom banks, add/rename/delete pads, demo tones, and uploaded audio.
- Remote sound triggers, individual/Stop All controls, shared master volume, live player status, and a recent-trigger list.
- A separate OBS playback URL protected by a random player key.
- Password-protected controller login, hashed owner password, CSRF checks, prepared SQL statements, and protected uploaded files.
- PWA manifest and static offline cache for the interface shell. Triggering sounds still requires a network connection to the host.

## Deploy on cPanel or compatible PHP/MySQL hosting

1. Create a MySQL database and database user in cPanel. Grant that user full access to the new database.
2. Upload this folder to its own HTTPS-protected directory. The hosting account must provide PHP 8.1 or later, PDO MySQL, `fileinfo`, `mbstring`, sessions, and Apache `.htaccess` support. Set the PHP upload limit to at least 26 MB if you plan to add 25 MB audio files.
3. Copy `config.example.php` to `config.php`. Enter the database host, database name, database user, and database password. Replace `setup_key` with a new random value at least 32 characters long. Keep `config.php` private; `.htaccess` blocks web access to it.
4. Open `https://your-domain.example/mixpad/setup.php?key=YOUR_SETUP_KEY`. Create an owner password with at least 12 characters. The OBS player URL is shown once in that setup session.
5. Copy the OBS player URL. Delete `setup.php` from the hosted directory after setup. Set the `uploads` directory so PHP can write files there; keep the included `.htaccess` in place.
6. In OBS, add a Browser Source using the player URL. Enable **Control audio via OBS**. Open the source’s **Interact** window and click **Enable audio** once. Keep the source active. In the OBS mixer, verify that the browser source responds to a pad before streaming.
7. Open the normal Mixpad address on each controller device and sign in with the owner password. Install it from the browser menu if the device offers that option. The OBS player URL is private: anyone with it can trigger audio on the stream. Use **Rotate player key** in Mixpad if you need to invalidate an old URL, then update the OBS Browser Source.

The same host must be reachable from every controller and the OBS computer. Remote triggering uses short HTTP polling, so allow the host to answer the controller and player requests. If the stream computer cannot reach the public internet, this hosted design will not provide remote control over the local network.

## Customization

Rename the working Mixpad brand and translate the English labels in `index.php`, `setup.php`, `assets/app.js`, and `README.md`. Replace or edit demo pads from the soundboard, upload your own audio, and create banks for your show. The selected Cassette J-Card design direction is recorded in `DESIGN.md`.

## Local source status

This project folder currently has no PHP runtime or MySQL database available for a local preview. The PHP app and its cPanel setup package are prepared here, but the account-specific database, secure HTTPS domain, OBS configuration, audio folder permissions, and real device/stream audio route still need to be set up and checked on the destination host.
