b866845b6ad84b6b6118328774747181a676d242
RadioPlayer
RadioPlayer is a Vite + React web app for browsing, playing, and casting radio stations. It loads its station catalog from public/stations.json, supports custom stations, and includes a built-in updater for refreshing that list from the live Radio.si feed.
Features
- Station browser with search, categories, favourites, and recent stations
- Audio playback with previous/next station controls
- Cast support
- Production service worker for app-shell caching, offline launch support, and faster repeat visits
- App install prompt for supported browsers
- Custom station editor
- Live station metadata and artwork rendering
Requirements
- Node.js 18 or newer
- npm
Getting Started
Install dependencies:
npm install
Start the development server:
npm run dev
Build for production:
npm run build
Preview the production build:
npm run preview
Station Data
The app reads station data from public/stations.json.
To refresh the file from the remote source, run:
npm run update:stations
That command fetches the latest station list from:
https://data.radio.si/api/radiostations?857df78efd094abcb98c7bbb53303c3d
and rewrites public/stations.json while preserving the existing JSON structure used by the app.
You can also pass a custom source URL or a custom output path if needed:
node scripts/update-stations.mjs <source-url> <output-path>
Project Structure
index.html
package.json
public/
manifest.json
stations.json
sw.js
src/
App.jsx
main.jsx
player.js
styles.css
scripts/
update-stations.mjs
Notes
- The app uses a module-based frontend build, so
src/main.jsxis the browser entry point. - The service worker is registered only in production builds. During development, existing service workers and caches are cleared automatically to avoid stale assets while iterating.
- The updater script uses the remote feed as the source of truth for the station list and writes the merged result into
public/stations.json. - If you add or edit stations manually, re-run
npm run update:stationswhen you want to sync back to the remote catalog.
Description
Languages
JavaScript
61.8%
CSS
19.3%
TypeScript
11.9%
HTML
5.3%
Shell
1.4%
Other
0.3%