Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Rewrite #187

Draft
wants to merge 38 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
873e28a
stylesheet tweaks, code tweaks
snuffyDev Jan 14, 2023
6fdd7fb
`app` - fix queue/search not working
snuffyDev Jan 20, 2023
0e314b5
`app` - fix safari/webkit audio duration
snuffyDev Jan 21, 2023
60d806f
`app` - cleanup and simplify some things
snuffyDev Jan 28, 2023
d46452a
rm unneeded console.count
snuffyDev Jan 28, 2023
2178a38
refactor SessionListService
snuffyDev Feb 11, 2023
88bf4f9
start implementing Music player redesign #87
snuffyDev Feb 11, 2023
6f03307
Bigger image for the player (#145)
BrightDV Feb 14, 2023
c7af7c3
`app` - mobile menu fixes
snuffyDev Feb 27, 2023
0126f2e
`app` -
snuffyDev Mar 3, 2023
4f1ea83
`browseRequest` -> `browseAPIRequest`
snuffyDev Mar 11, 2023
993dbef
Merge branch 'master' into dev
snuffyDev Mar 11, 2023
aa2e614
`app` -
snuffyDev Apr 7, 2023
94d2ff7
`app` -
snuffyDev Apr 8, 2023
8f4b4cd
start standardizing backend
snuffyDev Apr 30, 2023
186d927
improved type safety n more
snuffyDev May 3, 2023
4a4b85d
move most endpoints to async/await
snuffyDev May 6, 2023
ba32d9b
refactor player.ts
snuffyDev May 7, 2023
fe937cc
fix group sessions (partial)
snuffyDev May 11, 2023
d6e71ae
[UNFINISHED] update some things
snuffyDev May 22, 2023
bb9a7d7
[UNFINISHED] update some things
snuffyDev May 22, 2023
1d422a5
fix group sessions
snuffyDev May 30, 2023
972c105
fix group sessions
snuffyDev Jun 3, 2023
8a28af2
UI upgrades
snuffyDev Jun 24, 2023
d3b6806
finish svelte 4 migration
snuffyDev Jun 24, 2023
8d1d24b
ui & styles changes
snuffyDev Aug 5, 2023
1074b98
update rust proxy
snuffyDev Aug 6, 2023
91ec77b
more settings configurable with docker compose
snuffyDev Sep 9, 2023
cd748d2
`/listen` -> `/listen` & `/watch`
snuffyDev Sep 14, 2023
a499db3
`/artist/` -> add support for user profiles
snuffyDev Sep 14, 2023
40b4703
update README
snuffyDev Sep 16, 2023
ebba88d
Fix a really small typo (#197)
BrightDV Sep 17, 2023
90163b8
fix playlists starting from index >= 50
snuffyDev Sep 18, 2023
cdb7757
fix iframes
snuffyDev Sep 24, 2023
33f536b
video support
snuffyDev Oct 24, 2023
9227d14
reliability/fixes
snuffyDev Nov 5, 2023
664829b
tweaks
snuffyDev Nov 12, 2023
85b2939
fixes,
snuffyDev Dec 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
PORT=3000
VITE_DOMAIN="beatbump.io"
VITE_SITE_URL="https://beatbump.io"
VITE_DONATION_URL="https://www.paypal.com/donate/?hosted_button_id=E6YRHKS2H2KP2"
ALLOW_IFRAME="true"
PUBLIC_ALLOW_THUMBNAIL_PROXY="true"
PORT=3000
6 changes: 6 additions & 0 deletions .env.EXAMPLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_DOMAIN="beatbump.io"
VITE_SITE_URL="https://beatbump.io"
VITE_DONATION_URL="https://www.paypal.com/donate/?hosted_button_id=E6YRHKS2H2KP2"
ALLOW_IFRAME="false"
PUBLIC_ALLOW_THUMBNAIL_PROXY="false"
PORT=3000
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ node_modules
/app/.svelte-kit/cloudflare*
/app/.svelte-kit/adapter*
/packages/proxy-server/rust/target
/app/.svelte-kit/*
app/.svelte-kit/ambient.d.ts
app/build/**/*
5 changes: 3 additions & 2 deletions .vscode/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
"type": "object",
"description": "",
"properties": {
"edge": {
"type": "boolean",
"runtime": {
"type": "string",
"oneOf": [{ "const": "edge" }, { "const": "nodejs16.x" }, { "const": "nodejs18.x" }],
"default": false
},
"split": {
Expand Down
29 changes: 21 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"svg.preview.background": "custom",
"eslint.probe": ["javascript", "typescript", "html", "markdown", "svelte"],
"eslint.enable": true,
"editor.formatOnSave": true,
"deno.enable": false,
"npm.autoDetect": "on",
Expand All @@ -9,24 +9,37 @@
"json.schemas": [
{
"url": "./.vscode/schema.json",
"fileMatch": [
"/app/beatbump.conf.json"
]
"fileMatch": ["/app/beatbump.conf.json"]
}
],
"typescript.format.enable": true,
"prettier.enable": true,
"prettier.configPath": ".prettierrc",
"editor.formatOnSaveMode": "modificationsIfAvailable",
"editor.formatOnSaveMode": "file",
"[typescript]": {
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"eslint.nodePath": "app/node_modules",
"[svelte]": {
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.defaultFormatter": "svelte.svelte-vscode",

"editor.defaultFormatter": "svelte.svelte-vscode"
},
"typescript.tsdk": "./app/node_modules/typescript/lib"
"typescript.tsdk": "./app/node_modules/typescript/lib",
"search.exclude": {
".cloudflare/**": true,
"**/.cloudflare": true,
"**/.cloudflare/*": true,
"build/**": true
},
"diffEditor.codeLens": true,
"diffEditor.experimental.showMoves": true,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.svelte": "+${capture}.css.scss.js.ts"
},
"diffEditor.hideUnchangedRegions.enabled": true
}
46 changes: 43 additions & 3 deletions Beatbump.code-workspace
Original file line number Diff line number Diff line change
@@ -1,16 +1,56 @@
{
"folders": [
{
"path": "."
"path": "app"
},
{
"path": "packages/proxy-server/rust"
},
{
"path": "."
}
],
"settings": {
"svg.preview.background": "custom",
"npm-intellisense.recursivePackageJsonLookup": true,
"typescript.format.enable": true,
"typescript.tsdk": "Beatbump/app/node_modules/typescript/lib"
"typescript.tsdk": "Beatbump/app/node_modules/typescript/lib",
"svelte.enable-ts-plugin": true,
"svelte.plugin.svelte.defaultScriptLanguage": "ts",
"eslint.lintTask.enable": true,
"eslint.useESLintClass": true,
"eslint.enable": true,
"eslint.probe": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"svelte",
"vue",
"markdown"
],
// "eslint.lintTask.enable": true,
"eslint.run": "onType",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"svelte",
"vue",
"markdown"
],
"eslint.workingDirectories": [],
"css.validate": false,
"scss.validate": false,
"stylelint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"eslint.format.enable": false,
"eslint.codeActionsOnSave.mode": "all",
"stylelint.validate": ["css", "less", "postcss"]
}
}
233 changes: 124 additions & 109 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,109 +1,124 @@
<img align="right" src=".repo/images/logo-header.png" width="128px" height="128px" />

# Beatbump

A privacy-respecting alternative frontend for YouTube Music. Built with SvelteKit, official instance hosted with Cloudflare Workers.

> NOTE: Beatbump is going through a major rewrite, so errors, bugs, and other problems may happen at random.

<div align="center">

| <img src=".repo/images/playlist.jpeg" width=""/> | <img src=".repo/images/m_artist.png" width="" height="auto"/> | <img src=".repo/images/m_queue.png" width=""/> |
| ------------------------------------------------ | ------------------------------------------------------------- | ---------------------------------------------- |

</div>
<p align="center">
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html">
<img alt="License: AGPLv3" src="https://shields.io/badge/License-AGPL%20v3-blue.svg">
</a>
<a href="https://github.com/humanetech-community/awesome-humane-tech">
<img alt="Awesome Humane Tech" src="https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true">
</a>
</p>

## Why Beatbump?

Beatbump is a fully-featured music listening experience, while helping to ease your privacy concerns associated with other platforms.

Some of Beatbump's features includes:

- Automix for continued listening
- No ads
- Background play on mobile devices\*
- Search for artists, playlists, songs, and albums
- Note that all playback is audio only (for now)
- Local playlist management
- Stored in-browser with IndexedDB
- Can save songs individually under 'Favorites'
- Peer-to-Peer data synchronization (using WebRTC)
- Group Sessions
- Achieved using a WebRTC [mesh](https://en.wikipedia.org/wiki/Mesh_networking)
- Uses a custom wrapper around the YouTube Music API

...and so much more!

> [1] iOS updates may break this from time to time, but works as of iOS 15.6

## Repo Structure

| Directory | Description |
| ----------------------------- | ----------------------------------------------------- |
| `app` | Beatbump web app |
| `packages/hls-proxy-rewriter` | Proxy server used for Beatbump's music playback (WIP) |


## Instances

> Service Uptime Monitoring: https://stats.uptimerobot.com/9PnmRfz6Gm

| Name | URL
| --- | --- |
| Beatbump (Official Instance) | https://beatbump.ml |
| ~Vern (clearnet) | https://bb.vern.cc/ |
| ~Vern (Onion) | http://bb.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/ |
| ~Vern (I2P) | http://vern6inmbjzqpecx4kpkq5sln3cqqrfuxfzh4au3tpxbsfbwbnta.b32.i2p/ |
| Project Segfault (GeoDNS) | https://bb.projectsegfau.lt/ |
| Project Segfault (EU) | https://bb.eu.projectsegfau.lt/ |
| Project Segfault (US) | https://bb.us.projectsegfau.lt/ |
| Project Segfault (Tor) | http://beatbump.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion/ |


## Donations

Want to support Beatbump financially to aid with future development/hosting?

[Donate with PayPal!](https://www.paypal.com/donate/?hosted_button_id=E6YRHKS2H2KP2)

Donations of any amount are very much appreciated, so thank you if you choose to donate!

_(Other ways to donate coming soon!)_

## Docker

> Note: Still figuring out how to use Docker! Got a suggestion? Open an issue, thanks!

[DockerHub](https://hub.docker.com/r/snuffydev/beatbump)

### docker-compose (production)
The quickest way to host a Beatbump instance is with [Docker](https://www.docker.com/get-started). Once you have it installed, you can run:

```
docker-compose up
```

The app will now be accessible from `https://localhost:443 / http://localhost:3000`.

### docker-compose (development)


(More details coming soon!)

## Documentation

You can find (temporary, incomplete, and in-progress) API documentation here: https://beatbump-docs.vercel.app/

> It's recommended (and appreciated) to host your own instance of Beatbump for public projects that want to use the data -- especially if you anticipate you will be making a large amount of requests. Thanks!

## Project Inspirations

- [Invidious](https://github.com/iv-org/invidious) - a privacy focused alternative YouTube front end.
<img align="right" src=".repo/images/logo-header.png" width="128px" height="128px" />

# Beatbump

A privacy-respecting alternative frontend for YouTube Music. Built with SvelteKit, official instance hosted with
Cloudflare Workers.

> NOTE: Beatbump is going through a major rewrite, so errors, bugs, and other problems may happen at random.

<div align="center">

| <img src=".repo/images/playlist.jpeg" width=""/> | <img src=".repo/images/m_artist.png" width="" height="auto"/> | <img src=".repo/images/m_queue.png" width=""/> |
| ------------------------------------------------ | ------------------------------------------------------------- | ---------------------------------------------- |

</div>
<p align="center">
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html">
<img alt="License: AGPLv3" src="https://shields.io/badge/License-AGPL%20v3-blue.svg">
</a>
<a href="https://github.com/humanetech-community/awesome-humane-tech">
<img alt="Awesome Humane Tech" src="https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true">
</a>
</p>

## Why Beatbump?

Beatbump is a fully-featured music listening experience, while helping to ease your privacy concerns associated with
other platforms.

Some of Beatbump's features includes:

- Automix for continued listening
- No ads
- Background play on mobile devices\*
- Search for artists, playlists, songs, and albums
- Note that all playback is audio only (for now)
- Local playlist management
- Stored in-browser with IndexedDB
- Can save songs individually under 'Favorites'
- Peer-to-Peer data synchronization (using WebRTC)
- Group Sessions
- Achieved using a WebRTC [mesh](https://en.wikipedia.org/wiki/Mesh_networking)
- Uses a custom wrapper around the YouTube Music API
- Minimizes requests made to YouTube/Google's servers
- Thumbails are proxied through Beatbump by default
- Audio proxying can be enabled within the user settings

...and so much more!

> [1] iOS updates may break this from time to time, but works as of iOS 15.6

## Repo Structure

| Directory | Description |
| ----------------------------- | ----------------------------------------------------- |
| `app` | Beatbump web app |
| `packages/hls-proxy-rewriter` | Proxy server used for Beatbump's music playback (WIP) |

## Instances

> Service Uptime Monitoring: https://stats.uptimerobot.com/9PnmRfz6Gm

| Name | URL |
| -------------------------------- | ------------------------------------------------------------------------- |
| Beatbump (Official) | https://beatbump.ml |
| ~Vern (Clearnet) | https://bb.vern.cc/ |
| ~Vern (Onion) | http://bb.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/ |
| ~Vern (I2P) | http://vern6inmbjzqpecx4kpkq5sln3cqqrfuxfzh4au3tpxbsfbwbnta.b32.i2p/ |
| btb.frail.duckdns.org (Clearnet) | https://btb.frail.duckdns.org/ |

## Donations

Want to support Beatbump financially to aid with future development/hosting?

[Donate with PayPal!](https://www.paypal.com/donate/?hosted_button_id=E6YRHKS2H2KP2)

Donations of any amount are very much appreciated, so thank you if you choose to donate!

_(Other ways to donate coming soon!)_

## Docker

Beatbump is available as a Docker image: [DockerHub](https://hub.docker.com/r/snuffydev/beatbump)

The pre-built image uses the following configuration:

| Environment Variable | Default Value | Description |
| ------------------------------ | --------------------- | ----------------------------------------- |
| `PORT` | `3000` | Port to listen on |
| `ALLOW_IFRAME` | `false` | Allow the app to be embedded in an iframe |
| `PUBLIC_ALLOW_THUMBNAIL_PROXY` | `false` | Allow the thumbnail proxy to be used |
| `VITE_DOMAIN` | `beatbump.io` | The domain of the instance |
| `VITE_SITE_URL` | `https://beatbump.io` | The URL of the instance |

### docker-compose (production)

The quickest way to host a Beatbump instance is with [Docker](https://www.docker.com/get-started). Once you have it
installed, you can run:

```
docker-compose up
```

The app will now be accessible from `https://localhost:443 / http://localhost:3000`.

### Customizing your instance

In order to customize your Beatbump instance, you must build your own container. This process is very simple and only
requires a few extra steps.

1. Clone the repository
2. Rename the `.env.EXAMPLE` file (found at the root of the repository) to `.env`
3. Make any changes to the values of the environment variables

You can now run `docker-compose up` to start your instance. The app will now be accessible on the port specified in
`.env` (`3000` by default)

## Project Inspirations

- [Invidious](https://github.com/iv-org/invidious) - a privacy focused alternative YouTube front end.

## License

Beatbump is licensed under the [AGPLv3](LICENSE).
12 changes: 12 additions & 0 deletions app/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
Loading