2.8 KiB
2.8 KiB
Tonehaus — Music Ratings (Symfony 7)
Discover albums via Last.fm, write and manage reviews, and administer your site. Built with Symfony 7, Twig, Doctrine, and Bootstrap.
Quick start (Docker Compose)
- Start the stack
docker compose up -d --build
- Open the app
- App URL:
http://localhost:8085 - Health:
http://localhost:8085/healthz
- Create your first admin
- Sign Up through Tonehaus
docker compose exec tonehaus php bin/console app:promote-admin you@example.com
- Configure Last.fm
- Go to
http://localhost:8085/admin/settingsand enter your Last.fm API key, or - Set env var in
.env:LASTFM_API_KEY
- (Optional) Seed demo data
docker compose exec tonehaus php bin/console app:seed-demo-users --count=50
docker compose exec tonehaus php bin/console app:seed-demo-albums --count=40 --attach-users
docker compose exec tonehaus php bin/console app:seed-demo-reviews --cover-percent=70 --max-per-album=8
Notes:
- The packaged image uses SQLite by default and runs Doctrine migrations on start (idempotent).
- To switch to Postgres, set
DATABASE_DRIVER=postgresand provideDATABASE_URL.
Features
- Last.fm-backed album search with advanced filters (album, artist, year range) and per‑album aggregates (avg/count)
- REST API under
/api/v1for albums/reviews with JSON responses and proper HTTP verbs - JWT authentication for protected API endpoints (
/api/v1/auth/login) via LexikJWTAuthenticationBundle - REST response handling via FOSRestBundle
- OpenAPI documentation via swagger-php at
/docs(/docs/openapi.json) - Album page with details, tracklist, reviews list, and inline new review (logged-in)
- Auth modal (Login/Sign up) with remember‑me; no separate pages
- Role-based access: authors manage their own reviews; moderators/admins can moderate content
- Admin Site Settings: manage Last.fm API key and public registration toggle
- User Dashboard: profile updates and password change
- Light/Dark theme toggle (cookie-backed)
Documentation
- Setup and configuration:
docs/setup.md - Feature overview:
docs/features.md - Authentication and users:
docs/auth-and-users.md - Last.fm integration:
docs/lastfm-integration.md - Reviews and albums:
docs/reviews-and-albums.md - Admin & site settings:
docs/admin-and-settings.md - Troubleshooting:
docs/troubleshooting.md - Architecture:
docs/architecture.md - Deployment:
docs/deployment.md
Environment overview
APP_ENV(dev|prod),APP_SECRET(required)LASTFM_API_KEYJWT_PASSPHRASE(used for JWT private key encryption)APP_ALLOW_REGISTRATION(1|0) — DB setting can be overridden by envDATABASE_DRIVER(sqlite|postgres),DATABASE_URL(when using Postgres)DATABASE_SQLITE_PATH(optional, defaults tovar/data/database.sqlite)RUN_MIGRATIONS_ON_START(1|0, defaults to 1)
License
MIT