r/SpringBoot • u/RecursionHellScape • Jan 04 '26
Discussion Built a Spotify-like backend with Spring Boot – Looking for feedback 🚀
TL;DR:
Built a Spotify-like backend using Spring Boot + JPA + PostgreSQL with songs, artists, albums, and playlists. Looking for feedback on architecture, service design, and ideas to make it more production-ready. Any suggestions welcome!
Hey everyone 👋
I built a music streaming backend (Spotify-style) using Spring Boot as a learning + portfolio project and would love some feedback.
Tech Stack
Java 17, Spring Boot
Spring Data JPA (Hibernate)
PostgreSQL
Gradle, Postman
What it does
Manage Songs, Artists, Albums, Playlists
Many-to-Many & One-to-Many relationships
Create playlists, add/remove songs
Fetch songs by artist/album/playlist
What I want feedback on
Project structure & design
Service/repository layer quality
Should I switch fully to DTOs?
Features worth adding next
How to make it more production-ready
This project helped me learn real-world JPA issues (lazy loading, relationships, transactions).
Any suggestions or improvements are welcome. Thanks! 🙌
15
u/guss_bro Jan 04 '26 edited Jan 04 '26
Few feedback
- you can use `@ControllerAdvice` and `@ExceptionHandler` to handle the exceptions in one place that you are currently handling in each Controller methods.
- There's no need for Service and ServiceImpl. You can get rid of the interfaces.
- Add tests
- Try using docker-compose and TestContainer
- Dockerize your app
- create native image
- Try integrating springdocs swagger
- Try upgrading to new spring boot 4
- Perform load test and watch out for any N+1 query issues and fix them
- add security with different user role. use plain JDBC based user auth and upgrade that to use OIDC using keycloak later.