This web app is for solving the problem of bad music at parties. The users can submit songs to a queue and like those songs, the song with the most likes gets played using a Spotify integration.
- Realtime ui with WebSockets
- Clean glassmorphic UI
- Spotify integration
- Quick joining, with QR code, and PFPs
- Rust
- Rust fronted, with Leptos(WASM)
- Rust backend
- Postgresql DB
- SCSS styling
There are two ways to run the app, in a docker container, or on you machine directly.
I would recommend the containered version if you are not planning on developing the app, because it's a lot easier to do, and there are no advantages as a user to not run in a container.
It's recommended to install docker for both options, since it's way easier to run the db in a container than on you local machine.
- Install Docker, see tutorial on dockers website
- Clone this repo
- Create a
.env
file in the root directory - Paste the contents of
.env.sample
into the newly created file - Fill it out with your own information
SPOTIFY_SECRET
andSPOTIFY_ID
you can find these by creating spotify developer account, than crating a new appPOSTGRES_PASSWORD
env is the password of the database that the app uses, changed this to a secure password, realistically you will never interact with the DB, but it's good practice to have a secure passwordSITE_URL
the url where the site will be deployed, for examplelocalhost:3000
, this is needed for the spotify oauth, make sure that you added this url in the spotify dashboard of your app as a redirect urlDATABASE_URL
the url of your database, you don't need this if you are using the container, usuallylocalhost
- The app runs on localhost:8080 by default, you can change this by going into the
compose.yml
file and enditing the exposed port under the ports section of the app service. If you are confused ask chatgpt. - Run
docker compose up -d
- And boom, the app should run on the port that you selected
- If it doesn't work, run
docker compose up
, so you can see where did things go wrong
- Install rust nightly, by running:
rustup install nightly
- Install
sqlx-cli
, by running:cargo install sqlx-cli
- Install
cargo-leptos
, by running:cargo install cargo-leptos
- Start up the db, by running:
docker compose up jam-db -d
- Run the migrations on the db (make sure you set the
DATABASE_URL
env, in.env
), by running:sqlx database reset --source ./db/migrations
- To start the app run:
cargo leptos serve