Runbook
This runbook starts the cloud API, dashboard web views, and mobile web view for manual testing.
Ports
For the browser demo, open these TCP ports on the Vultr firewall:
80- redirects to HTTPS443- HTTPS web views using the existing Let's Encrypt certificate
Keep these ports private/local only:
3000- Fastify cloud API, proxied publicly athttps://www.pinball.cv/api/8081- Expo mobile web view, proxied publicly athttps://www.pinball.cv/mobile/3306- MySQL
Start Services
Use two terminal sessions from the repo root. The normal nginx site serves the
landing page and dashboard HTML on port 443.
Terminal 1:
npm run api:start
Terminal 2:
npm run mobile:web
Open Web Views
Dashboard URLs under /apps/web/ use HTTP Basic Auth:
Username: admin
Password: apple29
- Landing page: https://www.pinball.cv/
- Runbook: https://www.pinball.cv/runbook.php
- Raw runbook markdown: https://www.pinball.cv/docs/DEMO.md
- Dashboard launcher: https://www.pinball.cv/apps/web/
- Operator dashboard: https://www.pinball.cv/apps/web/operator-dashboard.html
- Admin dashboard: https://www.pinball.cv/apps/web/admin-dashboard.html
- Admin API Lab: https://www.pinball.cv/apps/web/admin-console.html
- Mobile app web view: https://www.pinball.cv/mobile/
Each dashboard has a Cloud API base URL field. It should default to:
https://www.pinball.cv/api
If it shows localhost from your browser, replace it manually with
https://www.pinball.cv/api.
The runbook page also includes an embedded Cloud API Test Console with preloaded demo values. Use that first when you want to exercise the API without opening the standalone Admin API Lab.
Click an endpoint name in the embedded console to load its request path and
payload into the Selected API Payload panel. Click Execute selected API call
to run the loaded request. Generated claim, device, user, and score IDs are
shown in the console state readout.
Test API Health
- Open the runbook page.
- Scroll to Cloud API Test Console.
- Confirm API base URL is
https://www.pinball.cv/api. - Click
GET /health. - Expected response:
{
"ok": true,
"service": "pinballcv-api"
}
Test Device Boot and QR Claim
Use either the Operator dashboard or the Cloud API Test Console embedded on the runbook page.
- Open the Operator dashboard.
- Confirm Cloud API base URL.
- Leave the test MAC address as
b8:27:eb:12:34:56, or enter another valid MAC. - Click
Boot test Pi. - Expected: the Claim token field fills in.
- Click
Claim device. - Expected: Selected device ID fills in and the fleet list shows a device.
This simulates an unassigned Pi booting, receiving a QR claim token, and being claimed by the operator profile.
Test Operator Fleet
- Open the Operator dashboard.
- Click
Load fleet. - Click a device in the Fleet list.
- Expected: Selected device ID updates to that device.
Test Custom Playfield Message
- Open the Operator dashboard.
- Select a device.
- Edit Custom playfield message.
- Click
Save message. - Click
Load fleet. - Expected: the saved message appears in the last API response and persists in the database.
Test Score Submission
- Open the Operator dashboard.
- Select a claimed device.
- Click
Submit demo score. - Expected: last API response includes
scoreId,localRank, andglobalRank.
Test Local Leaderboard Button
- Open the Operator dashboard.
- Select a claimed device.
- Click
Local leaderboard. - Expected: leaderboard table shows scores submitted from that selected device.
Test Global Leaderboard Button
- Open the Operator dashboard.
- Click
Global leaderboard. - Expected: leaderboard table shows scores across all devices.
Test Admin Users and Devices
- Open the Admin dashboard.
- Click
Load users. - Expected: operator users appear in the Users list.
- Click a user.
- Expected: that user's devices appear in the Devices list.
- Click a device to select it.
Test Admin Subscription Override
- Open the Admin dashboard.
- Click
Load devices. - Select a device.
- Click
Set Pro. - Expected: selected device tier changes to
pro. - Click
Set free. - Expected: selected device tier changes back to
free.
Test Admin Username Moderation
- Open the Admin dashboard.
- Leave Banned Stern username as
luna_spin, or enter another username. - Click
Ban username. - Open the Operator dashboard.
- Select a device and click
Submit demo score. - Expected: score submission for the banned username fails.
- Return to the Admin dashboard and click
Unban usernameto remove the test ban.
Test Every API From Runbook Page
- Open the runbook page.
- Scroll to Cloud API Test Console.
- Click
Run full demo flow. - Expected: the response log shows successful calls for health, device boot, claim, heartbeat, score submission, local leaderboard, global leaderboard, operator fleet, users, user devices, subscription overrides, ban, and unban.
- Click
New demo identitybefore re-running the full flow if you want a fresh unclaimed device and operator email.
Test Admin Delete APIs
- Open the runbook page.
- Scroll to Cloud API Test Console.
- Click
New demo identity. - Click
Run full demo flowto create a demo user and device. - Click
DELETE device. - Expected: the response log shows
deleted: truefor the selected device. - Click
New demo identity, thenRun full demo flowagain. - Click
DELETE user. - Expected: the response log shows
deleted: trueandreleasedDevicesfor the selected demo user.
Test Mobile App Web View
- Open the Mobile app web view.
- Confirm Cloud API base URL is
https://www.pinball.cv/api; edit it if needed. - On the Claim tab, click
Boot test Pi. - Click
Claim device. - Go to Fleet and click
Refresh fleet. - Go to Scores.
- Click
Submit demo score. - Click
Local leaderboard. - Click
Global leaderboard.
On a real phone running the Expo app, use the camera scanner instead of pasting the claim token. In web view, use the token field because browser camera support for Expo Camera is limited.
Cloud API Test Console
Select an endpoint, review or edit the JSON request, then execute it against the live cloud API.
How to run endpoints
Selected API Payload
Request / Response Log
Click "Run full demo flow" or any individual endpoint button.