Symfony 8 application for local music playback (library, playlists, radios, audio file scanning).
- PHP
>= 8.4 - Composer 2
- Node.js + npm
- MariaDB/MySQL (recommended)
composer install
npm installConfigure local environment values in .env.local (not committed), especially:
DATABASE_URL(dev database, e.g.soonic)DEFAULT_URI(e.g.http://127.0.0.1:8000)
Example:
APP_ENV=dev
DATABASE_URL="mysql://user:[email protected]:3306/soonic?serverVersion=11.8.3-MariaDB&charset=utf8mb4"
DEFAULT_URI="http://127.0.0.1:8000"Initialize with migrations:
php bin/console doctrine:migrations:migrate
php bin/console doctrine:fixtures:load --no-interactionOr run a full reset with the project command:
php bin/console soonic:reset --forceNotes:
- in
dev,soonic:resetrefuses to run unlessDATABASE_URLpoints tosoonic - in
test, it requiressoonic_test
symfony server:startBuild CSS:
npm run build:scssWatch mode:
npm run build:scss:watchLint SCSS:
npm run lint:scssScan library:
php bin/console soonic:scanAdd one radio:
php bin/console soonic:add:radio "Radio Name" "https://stream.example/live" "https://site.example"Import radios from .csv or .m3u:
php bin/console soonic:add:radios path/to/radios.csv
php bin/console soonic:add:radios path/to/radios.m3u --format=m3u
php bin/console soonic:add:radios path/to/radios.csv --dry-runRun all project checks:
bin/checkFast mode (without PHPUnit suites):
bin/check --fastCI mode (no DB checks, no PHPUnit suites):
bin/check --ciPHPUnit suites:
php bin/phpunit --testsuite no-music
php bin/phpunit --testsuite with-music
php bin/phpunit --testsuite scanImportant notes:
with-musicprepares its own test DB and injects a dedicated music dataset- tests run with
APP_ENV=testand targetsoonic_test - controller suites rebuild the test database before seeding (drop/create/schema/fixtures)
composer validate --no-check-publish
vendor/bin/phpstan analyse --configuration=phpstan.neon.dist
php bin/console lint:twig templates
php bin/console lint:yaml config
php bin/console lint:container
php bin/console doctrine:schema:validate
php bin/console doctrine:migrations:statusA GitHub Actions workflow is available in .github/workflows/ci.yml.
It runs dependency installation and bin/check --ci on pushes and pull requests.
This project is licensed under the MIT License. See LICENSE.
src/Controller: HTTP controllerssrc/Command: console commands (soonic:*)src/Entity/src/Repository: domain model and DB accesstemplates: Twig viewsassets/styles: SCSS sourcespublic/js: frontend scriptstests: PHPUnit suites