Simple PHP 8 webapp that mimics an LG webOS-style launcher and “app card” experience. QwikStar is the platform shell, and Mango OS is the currently available OS UI. Includes Live TV + Movies playback (HLS/MP4) and JSON REST endpoints.
- PHP 8+
- A web server (XAMPP/Apache) or PHP built-in dev server
- Optional: MySQL (only if you want channels from a database)
Place this folder under your web root and open:
http://localhost/virtual-tv-platform/
From the project directory:
php -S 127.0.0.1:8000 -t .Open:
http://127.0.0.1:8000/
- Left/Right: move across the bottom launcher
- Up: open the selected app (focus channels in Live TV)
- Enter: open / play the selected channel
- Backspace: stop playback
- Esc: log out (only when PIN lock is enabled)
All configuration is via environment variables (no hard-coded secrets).
TVOS_NAME(optional): OS display name (default:Mango OS)TVOS_PIN(optional): if set (non-empty), enables PIN lock and requires login for/api/appsand/api/channelsTVOS_SESSION_PATH(optional): session storage directory (useful if PHP cannot write to the default temp path)
If all of these are set, channels are loaded from MySQL; otherwise demo streams are used.
DB_HOSTDB_PORT(optional, default:3306)DB_NAMEDB_USERDB_PASS(optional)
Create a channels table:
CREATE TABLE channels (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
logo_url TEXT NULL,
stream_url TEXT NOT NULL
);Example rows:
INSERT INTO channels (name, logo_url, stream_url) VALUES
('Demo Channel (HLS)', NULL, 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8'),
('Big Buck Bunny (MP4)', NULL, 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4');All endpoints return JSON with the shape:
- Success:
{"ok": true, "data": {...}} - Error:
{"ok": false, "error": {"code": "...", "message": "..."}}
Endpoints:
GET /api/healthGET /api/mePOST /api/loginbody:{"pin":"1234"}(only required ifTVOS_PINis set)POST /api/logoutGET /api/appsGET /api/channelsGET /api/moviesGET /api/server
Each user gets a unique OS ID stored in a cookie (mango_os_id) and also available via GET /api/me as data.osId.
- HLS playback uses open-source
hls.jsin browsers that do not natively support.m3u8. - MP4 playback uses the browser’s native video support.