Skip to content

mintopia/musicparty

Repository files navigation

Music Party

Introduction

Version 2 of Music Party - the amount of changes and new features meant a major refactor was in-order.

Social Provider Support

  • Discord
  • Steam (No authentication, just account linking)
  • Twitch
  • Laravel Passport

These are using Laravel Socialite, so any provider supported by Socialite can be integrated.

Setup

You will need to create a Discord application and have the Client ID and Client Secret available.

cp .env.example .env
docker compose up -d redis db
docker compose run --rm composer install
docker compose run --rm artisan key:generate
docker compose run --rm artisan migrate
docker compose run --rm artisan db:seed
docker compose run --rm artisan control:setup-discord
docker compose run --rm npm install
docker compose run --rm npm run build
docker compose up -d

Add the redirect URLs from the control:setup-discord step to your Discord OAuth2 configuration.

You should now be able to login. The first user will be given the admin role.

Production Deployment

In the example directory there is a docker compose file and some .env example files. These are for the setup I use. Just rename the .env files and edit them accordingly. You can get a random Laravel application key here. I'm running with an external docker network called frontend with Caddy running as HTTP/HTTPS ingress and the docker-compose supplied is built to use that.

You will need to make a logs directory and chmod it 777 as I still need to sort permissions out.

To bring up the site, run the following:

docker compose up -d redis database
docker compose run --rm artisan migrate
docker compose run --rm artisan db:seed
docker compose run --rm artisan setup:discord
docker compose up -d

You should now be able to visit the site and login. From here you can use the admin menu to configure the site.

Contributing

It's an open source project and I'm happy to accept pull requests. I am terrible at UI and UX, which is why this is entirely using server-side rendering. If someone wants to use Vue/Laravel Livewire - please go ahead!

Roadmap

The following features are on the roadmap:

  • Better UI/UX. I'm currently using tabler.io and mostly server-side rendering, with some Vue components.
  • Unit Tests. This was very rapidly developed, I'm sorry!
  • PHPCS and PHPStan. Should be aiming for PSR-12 and level 8 PHPStan.

Thanks

This would not exist without the support of the following:

  • UK LAN Techs
  • Moogle

License

The MIT License (MIT)

Copyright (c) 2024 Jessica Smith

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.