Add player functionality with HLS support and API integration

- Implemented a new Player class in player.js to handle audio playback, including HLS support using hls.js.
- Created a shared API module in api.js for making HTTP requests with proper error handling.
- Added DOM utility functions in dom.js for creating and clearing elements.
- Introduced WebSocket connection handling in ws.js for real-time updates.
- Developed a comprehensive CSS stylesheet for styling the application, including a high-contrast theme.
This commit is contained in:
Marco Mooren
2026-05-10 14:43:00 +02:00
commit e0a60f7b64
51 changed files with 9022 additions and 0 deletions

34
README.md Normal file
View File

@@ -0,0 +1,34 @@
# Online Radio Explorer
Touchscreen kiosk + admin for exploring and playing internet radio in the office.
## Quick start
```powershell
cp .env.example .env
npm install
npm run dev
```
- Kiosk: http://localhost:5173/
- Admin: http://localhost:5173/admin/
- API: http://localhost:4173/api
First boot creates the SQLite DB at `DB_PATH`, runs the seed, and provisions the
bootstrap admin from `ADMIN_BOOTSTRAP_USER` / `ADMIN_BOOTSTRAP_PASSWORD`.
## Production
```powershell
npm run build
npm start
```
The built kiosk is served from `/`, admin from `/admin/`, API from `/api`.
## Layout
- `server/` — Express, SQLite, WebSocket hub, source adapters, stream resolver.
- `web/` — Vanilla JS kiosk (`web/`) and admin (`web/admin/`) bundled by Vite.
- `data/seed/stations.json` — curated starter pack.
- `deploy/` — systemd unit + Pi setup notes.