A web app with a local PostgreSQL database that can more or less sync with R4 and Matrix remotes.
- use a worker when using the db https://pglite.dev/examples/opfs
- maintain a local log of changes in a format that we can later apply to R4 supabase and/or Matrix
npm install
npm run dev
To create a production version of your app:
npm run build
npm run preview
- https://pglite.dev/docs/api
- https://github.com/hellogreg/firava
- https://icons.obra.studio/
sv
svelte cli
- Open the Firebase console, find the realtime database and export all channels to
/static/radio4000-channels-export.json
- Serialize the v1 channels into v2 schema using this
jq
command. It currently filters out channels with less than 10 tracks.
jq 'to_entries | .[0:99999] | map({firebase_id: .key, created_at: .value.created, updated_at: .value.updated, slug: .value.slug, name: .value.title, description: .value.body, image: .value.image, track_count: (.value.tracks | if . then length else 0 end), track_ids: (.value.tracks | if . then (to_entries | map(.key)) else [] end) }) | map(select(.track_count > 10)) ' static/radio4000-channels-export.json > static/r5-channels.json